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 #include <vector> | 10 #include <vector> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 class ConvertableToTraceFormat; | 48 class ConvertableToTraceFormat; |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 namespace cc { | 52 namespace cc { |
53 | 53 |
54 class Animation; | 54 class Animation; |
55 class AnimationDelegate; | 55 class AnimationDelegate; |
56 struct AnimationEvent; | 56 struct AnimationEvent; |
57 class CopyOutputRequest; | 57 class CopyOutputRequest; |
58 class LayerAnimationDelegate; | |
59 class LayerAnimationEventObserver; | 58 class LayerAnimationEventObserver; |
60 class LayerClient; | 59 class LayerClient; |
61 class LayerImpl; | 60 class LayerImpl; |
62 class LayerTreeHost; | 61 class LayerTreeHost; |
63 class LayerTreeHostCommon; | 62 class LayerTreeHostCommon; |
64 class LayerTreeImpl; | 63 class LayerTreeImpl; |
65 class PriorityCalculator; | 64 class PriorityCalculator; |
66 class RenderingStatsInstrumentation; | 65 class RenderingStatsInstrumentation; |
67 class ResourceUpdateQueue; | 66 class ResourceUpdateQueue; |
68 class ScrollbarLayerInterface; | 67 class ScrollbarLayerInterface; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
270 return draw_properties_.num_unclipped_descendants; | 269 return draw_properties_.num_unclipped_descendants; |
271 } | 270 } |
272 | 271 |
273 RenderSurface* render_surface() const { return render_surface_.get(); } | 272 RenderSurface* render_surface() const { return render_surface_.get(); } |
274 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset); | 273 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset); |
275 void SetScrollCompensationAdjustment( | 274 void SetScrollCompensationAdjustment( |
276 const gfx::Vector2dF& scroll_compensation_adjustment); | 275 const gfx::Vector2dF& scroll_compensation_adjustment); |
277 gfx::Vector2dF ScrollCompensationAdjustment() const; | 276 gfx::Vector2dF ScrollCompensationAdjustment() const; |
278 | 277 |
279 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } | 278 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } |
280 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset); | 279 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset, |
280 LayerTreeHost* host); | |
281 | 281 |
282 void SetScrollClipLayerId(int clip_layer_id); | 282 void SetScrollClipLayerId(int clip_layer_id); |
283 bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; } | 283 bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; } |
284 | 284 |
285 void SetUserScrollable(bool horizontal, bool vertical); | 285 void SetUserScrollable(bool horizontal, bool vertical); |
286 bool user_scrollable_horizontal() const { | 286 bool user_scrollable_horizontal() const { |
287 return user_scrollable_horizontal_; | 287 return user_scrollable_horizontal_; |
288 } | 288 } |
289 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } | 289 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } |
290 | 290 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
540 // These SetNeeds functions are in order of severity of update: | 540 // These SetNeeds functions are in order of severity of update: |
541 // | 541 // |
542 // Called when this layer has been modified in some way, but isn't sure | 542 // Called when this layer has been modified in some way, but isn't sure |
543 // that it needs a commit yet. It needs CalcDrawProperties and UpdateLayers | 543 // that it needs a commit yet. It needs CalcDrawProperties and UpdateLayers |
544 // before it knows whether or not a commit is required. | 544 // before it knows whether or not a commit is required. |
545 void SetNeedsUpdate(); | 545 void SetNeedsUpdate(); |
546 // Called when a property has been modified in a way that the layer | 546 // Called when a property has been modified in a way that the layer |
547 // knows immediately that a commit is required. This implies SetNeedsUpdate | 547 // knows immediately that a commit is required. This implies SetNeedsUpdate |
548 // as well as SetNeedsPushProperties to push that property. | 548 // as well as SetNeedsPushProperties to push that property. |
549 void SetNeedsCommit(); | 549 void SetNeedsCommit(); |
550 void SetNeedsCommitNoRebuild(); | |
ajuma
2015/04/16 14:52:14
Please add a comment here that explains how this i
| |
550 // Called when there's been a change in layer structure. Implies both | 551 // Called when there's been a change in layer structure. Implies both |
551 // SetNeedsUpdate and SetNeedsCommit, but not SetNeedsPushProperties. | 552 // SetNeedsUpdate and SetNeedsCommit, but not SetNeedsPushProperties. |
552 void SetNeedsFullTreeSync(); | 553 void SetNeedsFullTreeSync(); |
553 | 554 |
554 // Called when the next commit should wait until the pending tree is activated | 555 // Called when the next commit should wait until the pending tree is activated |
555 // before finishing the commit and unblocking the main thread. Used to ensure | 556 // before finishing the commit and unblocking the main thread. Used to ensure |
556 // unused resources on the impl thread are returned before commit completes. | 557 // unused resources on the impl thread are returned before commit completes. |
557 void SetNextCommitWaitsForActivation(); | 558 void SetNextCommitWaitsForActivation(); |
558 | 559 |
559 // Will recalculate whether the layer draws content and set draws_content_ | 560 // Will recalculate whether the layer draws content and set draws_content_ |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
728 | 729 |
729 std::vector<FrameTimingRequest> frame_timing_requests_; | 730 std::vector<FrameTimingRequest> frame_timing_requests_; |
730 bool frame_timing_requests_dirty_; | 731 bool frame_timing_requests_dirty_; |
731 | 732 |
732 DISALLOW_COPY_AND_ASSIGN(Layer); | 733 DISALLOW_COPY_AND_ASSIGN(Layer); |
733 }; | 734 }; |
734 | 735 |
735 } // namespace cc | 736 } // namespace cc |
736 | 737 |
737 #endif // CC_LAYERS_LAYER_H_ | 738 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |