| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 // was lost and that a new one has been created. Won't be called | 447 // was lost and that a new one has been created. Won't be called |
| 448 // until the new surface has been created successfully. | 448 // until the new surface has been created successfully. |
| 449 virtual void DidLoseOutputSurface(); | 449 virtual void DidLoseOutputSurface(); |
| 450 | 450 |
| 451 ScrollbarAnimationController* scrollbar_animation_controller() const { | 451 ScrollbarAnimationController* scrollbar_animation_controller() const { |
| 452 return scrollbar_animation_controller_.get(); | 452 return scrollbar_animation_controller_.get(); |
| 453 } | 453 } |
| 454 | 454 |
| 455 void SetScrollbarOpacity(float opacity); | 455 void SetScrollbarOpacity(float opacity); |
| 456 | 456 |
| 457 void SetHorizontalScrollbarLayer(PaintedScrollbarLayerImpl* scrollbar_layer); | 457 void SetHorizontalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer); |
| 458 PaintedScrollbarLayerImpl* horizontal_scrollbar_layer() { | 458 ScrollbarLayerImplBase* horizontal_scrollbar_layer() { |
| 459 return horizontal_scrollbar_layer_; | 459 return horizontal_scrollbar_layer_; |
| 460 } | 460 } |
| 461 | 461 |
| 462 void SetVerticalScrollbarLayer(PaintedScrollbarLayerImpl* scrollbar_layer); | 462 void SetVerticalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer); |
| 463 PaintedScrollbarLayerImpl* vertical_scrollbar_layer() { | 463 ScrollbarLayerImplBase* vertical_scrollbar_layer() { |
| 464 return vertical_scrollbar_layer_; | 464 return vertical_scrollbar_layer_; |
| 465 } | 465 } |
| 466 | 466 |
| 467 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; | 467 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; |
| 468 | 468 |
| 469 virtual skia::RefPtr<SkPicture> GetPicture(); | 469 virtual skia::RefPtr<SkPicture> GetPicture(); |
| 470 | 470 |
| 471 virtual bool CanClipSelf() const; | 471 virtual bool CanClipSelf() const; |
| 472 | 472 |
| 473 virtual bool AreVisibleResourcesReady() const; | 473 virtual bool AreVisibleResourcesReady() const; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 gfx::RectF update_rect_; | 611 gfx::RectF update_rect_; |
| 612 | 612 |
| 613 // Manages animations for this layer. | 613 // Manages animations for this layer. |
| 614 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 614 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
| 615 | 615 |
| 616 // Manages scrollbars for this layer | 616 // Manages scrollbars for this layer |
| 617 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; | 617 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; |
| 618 | 618 |
| 619 // Weak pointers to this layer's scrollbars, if it has them. Updated during | 619 // Weak pointers to this layer's scrollbars, if it has them. Updated during |
| 620 // tree synchronization. | 620 // tree synchronization. |
| 621 PaintedScrollbarLayerImpl* horizontal_scrollbar_layer_; | 621 ScrollbarLayerImplBase* horizontal_scrollbar_layer_; |
| 622 PaintedScrollbarLayerImpl* vertical_scrollbar_layer_; | 622 ScrollbarLayerImplBase* vertical_scrollbar_layer_; |
| 623 | 623 |
| 624 ScopedPtrVector<CopyOutputRequest> copy_requests_; | 624 ScopedPtrVector<CopyOutputRequest> copy_requests_; |
| 625 | 625 |
| 626 // Group of properties that need to be computed based on the layer tree | 626 // Group of properties that need to be computed based on the layer tree |
| 627 // hierarchy before layers can be drawn. | 627 // hierarchy before layers can be drawn. |
| 628 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; | 628 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; |
| 629 | 629 |
| 630 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 630 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 631 }; | 631 }; |
| 632 | 632 |
| 633 } // namespace cc | 633 } // namespace cc |
| 634 | 634 |
| 635 #endif // CC_LAYERS_LAYER_IMPL_H_ | 635 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |