OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "ui/gfx/transform.h" | 35 #include "ui/gfx/transform.h" |
36 | 36 |
37 namespace base { | 37 namespace base { |
38 class DictionaryValue; | 38 class DictionaryValue; |
39 } | 39 } |
40 | 40 |
41 namespace cc { | 41 namespace cc { |
42 | 42 |
43 class LayerTreeHostImpl; | 43 class LayerTreeHostImpl; |
44 class LayerTreeImpl; | 44 class LayerTreeImpl; |
45 class PaintedScrollbarLayerImpl; | |
46 class QuadSink; | 45 class QuadSink; |
47 class Renderer; | 46 class Renderer; |
48 class ScrollbarAnimationController; | 47 class ScrollbarAnimationController; |
| 48 class ScrollbarLayerImplBase; |
49 class Layer; | 49 class Layer; |
50 | 50 |
51 struct AppendQuadsData; | 51 struct AppendQuadsData; |
52 | 52 |
53 enum DrawMode { | 53 enum DrawMode { |
54 DRAW_MODE_NONE, | 54 DRAW_MODE_NONE, |
55 DRAW_MODE_HARDWARE, | 55 DRAW_MODE_HARDWARE, |
56 DRAW_MODE_SOFTWARE, | 56 DRAW_MODE_SOFTWARE, |
57 DRAW_MODE_RESOURCELESS_SOFTWARE | 57 DRAW_MODE_RESOURCELESS_SOFTWARE |
58 }; | 58 }; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 virtual ResourceProvider::ResourceId ContentsResourceId() const; | 155 virtual ResourceProvider::ResourceId ContentsResourceId() const; |
156 | 156 |
157 virtual bool HasDelegatedContent() const; | 157 virtual bool HasDelegatedContent() const; |
158 virtual bool HasContributingDelegatedRenderPasses() const; | 158 virtual bool HasContributingDelegatedRenderPasses() const; |
159 virtual RenderPass::Id FirstContributingRenderPassId() const; | 159 virtual RenderPass::Id FirstContributingRenderPassId() const; |
160 virtual RenderPass::Id NextContributingRenderPassId(RenderPass::Id id) const; | 160 virtual RenderPass::Id NextContributingRenderPassId(RenderPass::Id id) const; |
161 | 161 |
162 virtual void UpdateTilePriorities() {} | 162 virtual void UpdateTilePriorities() {} |
163 | 163 |
164 virtual PaintedScrollbarLayerImpl* ToScrollbarLayer(); | 164 virtual ScrollbarLayerImplBase* ToScrollbarLayer(); |
165 | 165 |
166 // Returns true if this layer has content to draw. | 166 // Returns true if this layer has content to draw. |
167 void SetDrawsContent(bool draws_content); | 167 void SetDrawsContent(bool draws_content); |
168 bool DrawsContent() const { return draws_content_; } | 168 bool DrawsContent() const { return draws_content_; } |
169 | 169 |
170 void SetHideLayerAndSubtree(bool hide); | 170 void SetHideLayerAndSubtree(bool hide); |
171 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } | 171 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } |
172 | 172 |
173 bool force_render_surface() const { return force_render_surface_; } | 173 bool force_render_surface() const { return force_render_surface_; } |
174 void SetForceRenderSurface(bool force) { force_render_surface_ = force; } | 174 void SetForceRenderSurface(bool force) { force_render_surface_ = force; } |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 // was lost and that a new one has been created. Won't be called | 444 // was lost and that a new one has been created. Won't be called |
445 // until the new surface has been created successfully. | 445 // until the new surface has been created successfully. |
446 virtual void DidLoseOutputSurface(); | 446 virtual void DidLoseOutputSurface(); |
447 | 447 |
448 ScrollbarAnimationController* scrollbar_animation_controller() const { | 448 ScrollbarAnimationController* scrollbar_animation_controller() const { |
449 return scrollbar_animation_controller_.get(); | 449 return scrollbar_animation_controller_.get(); |
450 } | 450 } |
451 | 451 |
452 void SetScrollbarOpacity(float opacity); | 452 void SetScrollbarOpacity(float opacity); |
453 | 453 |
454 void SetHorizontalScrollbarLayer(PaintedScrollbarLayerImpl* scrollbar_layer); | 454 void SetHorizontalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer); |
455 PaintedScrollbarLayerImpl* horizontal_scrollbar_layer() { | 455 ScrollbarLayerImplBase* horizontal_scrollbar_layer() { |
456 return horizontal_scrollbar_layer_; | 456 return horizontal_scrollbar_layer_; |
457 } | 457 } |
458 | 458 |
459 void SetVerticalScrollbarLayer(PaintedScrollbarLayerImpl* scrollbar_layer); | 459 void SetVerticalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer); |
460 PaintedScrollbarLayerImpl* vertical_scrollbar_layer() { | 460 ScrollbarLayerImplBase* vertical_scrollbar_layer() { |
461 return vertical_scrollbar_layer_; | 461 return vertical_scrollbar_layer_; |
462 } | 462 } |
463 | 463 |
464 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; | 464 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; |
465 | 465 |
466 virtual skia::RefPtr<SkPicture> GetPicture(); | 466 virtual skia::RefPtr<SkPicture> GetPicture(); |
467 | 467 |
468 virtual bool CanClipSelf() const; | 468 virtual bool CanClipSelf() const; |
469 | 469 |
470 virtual bool AreVisibleResourcesReady() const; | 470 virtual bool AreVisibleResourcesReady() const; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 gfx::RectF update_rect_; | 608 gfx::RectF update_rect_; |
609 | 609 |
610 // Manages animations for this layer. | 610 // Manages animations for this layer. |
611 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 611 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
612 | 612 |
613 // Manages scrollbars for this layer | 613 // Manages scrollbars for this layer |
614 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; | 614 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; |
615 | 615 |
616 // Weak pointers to this layer's scrollbars, if it has them. Updated during | 616 // Weak pointers to this layer's scrollbars, if it has them. Updated during |
617 // tree synchronization. | 617 // tree synchronization. |
618 PaintedScrollbarLayerImpl* horizontal_scrollbar_layer_; | 618 ScrollbarLayerImplBase* horizontal_scrollbar_layer_; |
619 PaintedScrollbarLayerImpl* vertical_scrollbar_layer_; | 619 ScrollbarLayerImplBase* vertical_scrollbar_layer_; |
620 | 620 |
621 ScopedPtrVector<CopyOutputRequest> copy_requests_; | 621 ScopedPtrVector<CopyOutputRequest> copy_requests_; |
622 | 622 |
623 // Group of properties that need to be computed based on the layer tree | 623 // Group of properties that need to be computed based on the layer tree |
624 // hierarchy before layers can be drawn. | 624 // hierarchy before layers can be drawn. |
625 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; | 625 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; |
626 | 626 |
627 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 627 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
628 }; | 628 }; |
629 | 629 |
630 } // namespace cc | 630 } // namespace cc |
631 | 631 |
632 #endif // CC_LAYERS_LAYER_IMPL_H_ | 632 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |