| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_LAYERS_LAYER_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
| 6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 } | 304 } |
| 305 | 305 |
| 306 void SetDrawCheckerboardForMissingTiles(bool checkerboard); | 306 void SetDrawCheckerboardForMissingTiles(bool checkerboard); |
| 307 bool draw_checkerboard_for_missing_tiles() const { | 307 bool draw_checkerboard_for_missing_tiles() const { |
| 308 return draw_checkerboard_for_missing_tiles_; | 308 return draw_checkerboard_for_missing_tiles_; |
| 309 } | 309 } |
| 310 | 310 |
| 311 void SetForceRenderSurface(bool force_render_surface); | 311 void SetForceRenderSurface(bool force_render_surface); |
| 312 bool force_render_surface() const { return force_render_surface_; } | 312 bool force_render_surface() const { return force_render_surface_; } |
| 313 | 313 |
| 314 gfx::Vector2dF ScrollDelta() const { return gfx::Vector2dF(); } | 314 gfx::ScrollOffset ScrollDelta() const { return gfx::ScrollOffset(); } |
| 315 gfx::ScrollOffset TotalScrollOffset() const { | 315 gfx::ScrollOffset CurrentScrollOffset() const { return scroll_offset_; } |
| 316 return ScrollOffsetWithDelta(scroll_offset(), ScrollDelta()); | |
| 317 } | |
| 318 | 316 |
| 319 void SetDoubleSided(bool double_sided); | 317 void SetDoubleSided(bool double_sided); |
| 320 bool double_sided() const { return double_sided_; } | 318 bool double_sided() const { return double_sided_; } |
| 321 | 319 |
| 322 void SetShouldFlattenTransform(bool flatten); | 320 void SetShouldFlattenTransform(bool flatten); |
| 323 bool should_flatten_transform() const { return should_flatten_transform_; } | 321 bool should_flatten_transform() const { return should_flatten_transform_; } |
| 324 | 322 |
| 325 bool Is3dSorted() const { return sorting_context_id_ != 0; } | 323 bool Is3dSorted() const { return sorting_context_id_ != 0; } |
| 326 | 324 |
| 327 void set_use_parent_backface_visibility(bool use) { | 325 void set_use_parent_backface_visibility(bool use) { |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 // trigger a Commit. | 590 // trigger a Commit. |
| 593 void SetHasRenderSurface(bool has_render_surface); | 591 void SetHasRenderSurface(bool has_render_surface); |
| 594 | 592 |
| 595 // Returns the index of the child or -1 if not found. | 593 // Returns the index of the child or -1 if not found. |
| 596 int IndexOfChild(const Layer* reference); | 594 int IndexOfChild(const Layer* reference); |
| 597 | 595 |
| 598 // This should only be called from RemoveFromParent(). | 596 // This should only be called from RemoveFromParent(). |
| 599 void RemoveChildOrDependent(Layer* child); | 597 void RemoveChildOrDependent(Layer* child); |
| 600 | 598 |
| 601 // LayerAnimationValueProvider implementation. | 599 // LayerAnimationValueProvider implementation. |
| 602 gfx::ScrollOffset ScrollOffsetForAnimation() const override; | 600 gfx::ScrollOffset ScrollOffsetForAnimation() override; |
| 603 | 601 |
| 604 // LayerAnimationValueObserver implementation. | 602 // LayerAnimationValueObserver implementation. |
| 605 void OnFilterAnimated(const FilterOperations& filters) override; | 603 void OnFilterAnimated(const FilterOperations& filters) override; |
| 606 void OnOpacityAnimated(float opacity) override; | 604 void OnOpacityAnimated(float opacity) override; |
| 607 void OnTransformAnimated(const gfx::Transform& transform) override; | 605 void OnTransformAnimated(const gfx::Transform& transform) override; |
| 608 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; | 606 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; |
| 609 void OnAnimationWaitingForDeletion() override; | 607 void OnAnimationWaitingForDeletion() override; |
| 610 bool IsActive() const override; | 608 bool IsActive() const override; |
| 611 | 609 |
| 612 // If this layer has a scroll parent, it removes |this| from its list of | 610 // If this layer has a scroll parent, it removes |this| from its list of |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 // and should get removed once it is no longer needed on main thread. | 694 // and should get removed once it is no longer needed on main thread. |
| 697 scoped_ptr<RenderSurface> render_surface_; | 695 scoped_ptr<RenderSurface> render_surface_; |
| 698 | 696 |
| 699 gfx::Rect visible_rect_from_property_trees_; | 697 gfx::Rect visible_rect_from_property_trees_; |
| 700 DISALLOW_COPY_AND_ASSIGN(Layer); | 698 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 701 }; | 699 }; |
| 702 | 700 |
| 703 } // namespace cc | 701 } // namespace cc |
| 704 | 702 |
| 705 #endif // CC_LAYERS_LAYER_H_ | 703 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |