diff options
Diffstat (limited to 'chromium/cc/layers/layer_impl.h')
-rw-r--r-- | chromium/cc/layers/layer_impl.h | 60 |
1 files changed, 6 insertions, 54 deletions
diff --git a/chromium/cc/layers/layer_impl.h b/chromium/cc/layers/layer_impl.h index 6f8ae9d41bf..b054f7f196e 100644 --- a/chromium/cc/layers/layer_impl.h +++ b/chromium/cc/layers/layer_impl.h @@ -25,7 +25,6 @@ #include "cc/layers/draw_mode.h" #include "cc/layers/draw_properties.h" #include "cc/layers/layer_collections.h" -#include "cc/layers/layer_impl_test_properties.h" #include "cc/layers/performance_properties.h" #include "cc/layers/render_surface_impl.h" #include "cc/layers/touch_action_region.h" @@ -113,14 +112,6 @@ class CC_EXPORT LayerImpl { return offset_to_transform_parent_; } - void SetShouldFlattenScreenSpaceTransformFromPropertyTree( - bool should_flatten) { - should_flatten_screen_space_transform_from_property_tree_ = should_flatten; - } - bool should_flatten_screen_space_transform_from_property_tree() const { - return should_flatten_screen_space_transform_from_property_tree_; - } - bool is_clipped() const { return draw_properties_.is_clipped; } LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } @@ -174,12 +165,6 @@ class CC_EXPORT LayerImpl { void SetHitTestable(bool should_hit_test); bool HitTestable() const; - LayerImplTestProperties* test_properties() { - if (!test_properties_) - test_properties_.reset(new LayerImplTestProperties(this)); - return test_properties_.get(); - } - void SetBackgroundColor(SkColor background_color); SkColor background_color() const { return background_color_; } void SetSafeOpaqueBackgroundColor(SkColor background_color); @@ -213,9 +198,6 @@ class CC_EXPORT LayerImpl { return use_parent_backface_visibility_; } - bool IsResizedByBrowserControls() const; - void SetIsResizedByBrowserControls(bool resized); - void SetShouldCheckBackfaceVisibility(bool should_check_backface_visibility) { should_check_backface_visibility_ = should_check_backface_visibility; } @@ -269,29 +251,9 @@ class CC_EXPORT LayerImpl { void SetBounds(const gfx::Size& bounds); gfx::Size bounds() const; - // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions - // of pixels) due to use of single precision float. - gfx::SizeF BoundsForScrolling() const; - - // Viewport bounds delta are only used for viewport layers and account for - // changes in the viewport layers from browser controls and page scale - // factors. These deltas are only set on the active tree. - // TODO(bokan): These methods should be unneeded now that LTHI sets these - // directly on the property trees. - void SetViewportBoundsDelta(const gfx::Vector2dF& bounds_delta); - gfx::Vector2dF ViewportBoundsDelta() const; - - void SetViewportLayerType(ViewportLayerType type) { - // Once set as a viewport layer type, the viewport type should not change. - DCHECK(viewport_layer_type() == NOT_VIEWPORT_LAYER || - viewport_layer_type() == type); - viewport_layer_type_ = type; - } - ViewportLayerType viewport_layer_type() const { - return static_cast<ViewportLayerType>(viewport_layer_type_); - } - bool is_viewport_layer_type() const { - return viewport_layer_type() != NOT_VIEWPORT_LAYER; + + void set_is_inner_viewport_scroll_layer() { + is_inner_viewport_scroll_layer_ = true; } void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); @@ -348,9 +310,6 @@ class CC_EXPORT LayerImpl { virtual gfx::Rect GetDamageRect() const; virtual std::unique_ptr<base::DictionaryValue> LayerAsJson() const; - // TODO(pdr): This should be removed because there is no longer a tree - // of layers, only a list. - std::unique_ptr<base::DictionaryValue> LayerTreeAsJson(); // This includes |layer_property_changed_not_from_property_trees_| and // property_trees changes. @@ -474,6 +433,8 @@ class CC_EXPORT LayerImpl { // TODO(sunxd): Remove this function and replace it with visitor pattern. virtual bool is_surface_layer() const; + int CalculateJitter(); + protected: // When |will_always_push_properties| is true, the layer will not itself set // its SetNeedsPushProperties() state, as it expects to be always pushed to @@ -505,8 +466,6 @@ class CC_EXPORT LayerImpl { LayerTreeImpl* const layer_tree_impl_; const bool will_always_push_properties_ : 1; - std::unique_ptr<LayerImplTestProperties> test_properties_; - // Properties synchronized from the associated Layer. gfx::Size bounds_; @@ -520,8 +479,6 @@ class CC_EXPORT LayerImpl { // |scroll_container_bounds|). bool scrollable_ : 1; - bool should_flatten_screen_space_transform_from_property_tree_ : 1; - // Tracks if drawing-related properties have changed since last redraw. // TODO(wutao): We want to distinquish the sources of change so that we can // reuse the cache of render pass. For example, we can reuse the cache when @@ -542,13 +499,8 @@ class CC_EXPORT LayerImpl { // Tracks if this layer should participate in hit testing. bool hit_testable_ : 1; - bool is_resized_by_browser_controls_ : 1; - // TODO(bokan): This can likely be removed after blink-gen-property-trees - // is shipped. https://crbug.com/836884. - static_assert(LAST_VIEWPORT_LAYER_TYPE < (1u << 3), - "enough bits for ViewportLayerType (viewport_layer_type_)"); - uint8_t viewport_layer_type_ : 3; // ViewportLayerType + bool is_inner_viewport_scroll_layer_ : 1; Region non_fast_scrollable_region_; TouchActionRegion touch_action_region_; |