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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 class DictionaryValue; | 37 class DictionaryValue; |
38 } | 38 } |
39 | 39 |
40 namespace cc { | 40 namespace cc { |
41 | 41 |
42 class LayerTreeHostImpl; | 42 class LayerTreeHostImpl; |
43 class LayerTreeImpl; | 43 class LayerTreeImpl; |
44 class QuadSink; | 44 class QuadSink; |
45 class Renderer; | 45 class Renderer; |
46 class ScrollbarAnimationController; | 46 class ScrollbarAnimationController; |
47 class ScrollbarLayerImpl; | 47 class ScrollbarLayerImplBase; |
48 class Layer; | 48 class Layer; |
49 | 49 |
50 struct AppendQuadsData; | 50 struct AppendQuadsData; |
51 | 51 |
52 enum DrawMode { | 52 enum DrawMode { |
53 DRAW_MODE_NONE, | 53 DRAW_MODE_NONE, |
54 DRAW_MODE_HARDWARE, | 54 DRAW_MODE_HARDWARE, |
55 DRAW_MODE_SOFTWARE, | 55 DRAW_MODE_SOFTWARE, |
56 DRAW_MODE_RESOURCELESS_SOFTWARE | 56 DRAW_MODE_RESOURCELESS_SOFTWARE |
57 }; | 57 }; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 virtual ResourceProvider::ResourceId ContentsResourceId() const; | 122 virtual ResourceProvider::ResourceId ContentsResourceId() const; |
123 | 123 |
124 virtual bool HasDelegatedContent() const; | 124 virtual bool HasDelegatedContent() const; |
125 virtual bool HasContributingDelegatedRenderPasses() const; | 125 virtual bool HasContributingDelegatedRenderPasses() const; |
126 virtual RenderPass::Id FirstContributingRenderPassId() const; | 126 virtual RenderPass::Id FirstContributingRenderPassId() const; |
127 virtual RenderPass::Id NextContributingRenderPassId(RenderPass::Id id) const; | 127 virtual RenderPass::Id NextContributingRenderPassId(RenderPass::Id id) const; |
128 | 128 |
129 virtual void UpdateTilePriorities() {} | 129 virtual void UpdateTilePriorities() {} |
130 | 130 |
131 virtual ScrollbarLayerImpl* ToScrollbarLayer(); | 131 virtual ScrollbarLayerImplBase* ToScrollbarLayer(); |
132 | 132 |
133 // Returns true if this layer has content to draw. | 133 // Returns true if this layer has content to draw. |
134 void SetDrawsContent(bool draws_content); | 134 void SetDrawsContent(bool draws_content); |
135 bool DrawsContent() const { return draws_content_; } | 135 bool DrawsContent() const { return draws_content_; } |
136 | 136 |
137 void SetHideLayerAndSubtree(bool hide); | 137 void SetHideLayerAndSubtree(bool hide); |
138 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } | 138 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } |
139 | 139 |
140 bool force_render_surface() const { return force_render_surface_; } | 140 bool force_render_surface() const { return force_render_surface_; } |
141 void SetForceRenderSurface(bool force) { force_render_surface_ = force; } | 141 void SetForceRenderSurface(bool force) { force_render_surface_ = force; } |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 // was lost and that a new one has been created. Won't be called | 408 // was lost and that a new one has been created. Won't be called |
409 // until the new surface has been created successfully. | 409 // until the new surface has been created successfully. |
410 virtual void DidLoseOutputSurface(); | 410 virtual void DidLoseOutputSurface(); |
411 | 411 |
412 ScrollbarAnimationController* scrollbar_animation_controller() const { | 412 ScrollbarAnimationController* scrollbar_animation_controller() const { |
413 return scrollbar_animation_controller_.get(); | 413 return scrollbar_animation_controller_.get(); |
414 } | 414 } |
415 | 415 |
416 void SetScrollbarOpacity(float opacity); | 416 void SetScrollbarOpacity(float opacity); |
417 | 417 |
418 void SetHorizontalScrollbarLayer(ScrollbarLayerImpl* scrollbar_layer); | 418 void SetHorizontalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer); |
419 ScrollbarLayerImpl* horizontal_scrollbar_layer() { | 419 ScrollbarLayerImplBase* horizontal_scrollbar_layer() { |
420 return horizontal_scrollbar_layer_; | 420 return horizontal_scrollbar_layer_; |
421 } | 421 } |
422 | 422 |
423 void SetVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbar_layer); | 423 void SetVerticalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer); |
424 ScrollbarLayerImpl* vertical_scrollbar_layer() { | 424 ScrollbarLayerImplBase* vertical_scrollbar_layer() { |
425 return vertical_scrollbar_layer_; | 425 return vertical_scrollbar_layer_; |
426 } | 426 } |
427 | 427 |
428 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; | 428 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; |
429 | 429 |
430 virtual skia::RefPtr<SkPicture> GetPicture(); | 430 virtual skia::RefPtr<SkPicture> GetPicture(); |
431 | 431 |
432 virtual bool CanClipSelf() const; | 432 virtual bool CanClipSelf() const; |
433 | 433 |
434 virtual bool AreVisibleResourcesReady() const; | 434 virtual bool AreVisibleResourcesReady() const; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 gfx::RectF update_rect_; | 560 gfx::RectF update_rect_; |
561 | 561 |
562 // Manages animations for this layer. | 562 // Manages animations for this layer. |
563 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 563 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
564 | 564 |
565 // Manages scrollbars for this layer | 565 // Manages scrollbars for this layer |
566 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; | 566 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; |
567 | 567 |
568 // Weak pointers to this layer's scrollbars, if it has them. Updated during | 568 // Weak pointers to this layer's scrollbars, if it has them. Updated during |
569 // tree synchronization. | 569 // tree synchronization. |
570 ScrollbarLayerImpl* horizontal_scrollbar_layer_; | 570 ScrollbarLayerImplBase* horizontal_scrollbar_layer_; |
571 ScrollbarLayerImpl* vertical_scrollbar_layer_; | 571 ScrollbarLayerImplBase* vertical_scrollbar_layer_; |
572 | 572 |
573 ScopedPtrVector<CopyOutputRequest> copy_requests_; | 573 ScopedPtrVector<CopyOutputRequest> copy_requests_; |
574 | 574 |
575 // Group of properties that need to be computed based on the layer tree | 575 // Group of properties that need to be computed based on the layer tree |
576 // hierarchy before layers can be drawn. | 576 // hierarchy before layers can be drawn. |
577 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; | 577 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; |
578 | 578 |
579 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 579 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
580 }; | 580 }; |
581 | 581 |
582 } // namespace cc | 582 } // namespace cc |
583 | 583 |
584 #endif // CC_LAYERS_LAYER_IMPL_H_ | 584 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |