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 | 5 |
6 #ifndef CC_LAYERS_RENDER_SURFACE_H_ | 6 #ifndef CC_LAYERS_RENDER_SURFACE_H_ |
7 #define CC_LAYERS_RENDER_SURFACE_H_ | 7 #define CC_LAYERS_RENDER_SURFACE_H_ |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
14 #include "cc/layers/layer_lists.h" | 14 #include "cc/layers/layer_lists.h" |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 #include "ui/gfx/rect_f.h" | 16 #include "ui/gfx/rect_f.h" |
17 #include "ui/gfx/transform.h" | 17 #include "ui/gfx/transform.h" |
18 | 18 |
19 namespace cc { | 19 namespace cc { |
20 | 20 |
21 class Layer; | 21 class Layer; |
| 22 template <typename LayerType> |
| 23 class LayerIterator; |
22 | 24 |
23 class CC_EXPORT RenderSurface { | 25 class CC_EXPORT RenderSurface { |
24 public: | 26 public: |
25 explicit RenderSurface(Layer* owning_layer); | 27 explicit RenderSurface(Layer* owning_layer); |
26 ~RenderSurface(); | 28 ~RenderSurface(); |
27 | 29 |
28 // Returns the rect that encloses the RenderSurfaceImpl including any | 30 // Returns the rect that encloses the RenderSurfaceImpl including any |
29 // reflection. | 31 // reflection. |
30 gfx::RectF DrawableContentRect() const; | 32 gfx::RectF DrawableContentRect() const; |
31 | 33 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 void AddContributingDelegatedRenderPassLayer(Layer* layer) {} | 107 void AddContributingDelegatedRenderPassLayer(Layer* layer) {} |
106 | 108 |
107 void SetNearestOcclusionImmuneAncestor(RenderSurface* surface) { | 109 void SetNearestOcclusionImmuneAncestor(RenderSurface* surface) { |
108 nearest_occlusion_immune_ancestor_ = surface; | 110 nearest_occlusion_immune_ancestor_ = surface; |
109 } | 111 } |
110 const RenderSurface* nearest_occlusion_immune_ancestor() const { | 112 const RenderSurface* nearest_occlusion_immune_ancestor() const { |
111 return nearest_occlusion_immune_ancestor_; | 113 return nearest_occlusion_immune_ancestor_; |
112 } | 114 } |
113 | 115 |
114 private: | 116 private: |
115 friend struct LayerIteratorActions; | 117 friend class LayerIterator<Layer>; |
116 | 118 |
117 Layer* owning_layer_; | 119 Layer* owning_layer_; |
118 | 120 |
119 // Uses this surface's space. | 121 // Uses this surface's space. |
120 gfx::Rect content_rect_; | 122 gfx::Rect content_rect_; |
121 | 123 |
122 float draw_opacity_; | 124 float draw_opacity_; |
123 bool draw_opacity_is_animating_; | 125 bool draw_opacity_is_animating_; |
124 gfx::Transform draw_transform_; | 126 gfx::Transform draw_transform_; |
125 gfx::Transform screen_space_transform_; | 127 gfx::Transform screen_space_transform_; |
(...skipping 16 matching lines...) Expand all Loading... |
142 | 144 |
143 // For LayerIteratorActions | 145 // For LayerIteratorActions |
144 int target_render_surface_layer_index_history_; | 146 int target_render_surface_layer_index_history_; |
145 int current_layer_index_history_; | 147 int current_layer_index_history_; |
146 | 148 |
147 DISALLOW_COPY_AND_ASSIGN(RenderSurface); | 149 DISALLOW_COPY_AND_ASSIGN(RenderSurface); |
148 }; | 150 }; |
149 | 151 |
150 } // namespace cc | 152 } // namespace cc |
151 #endif // CC_LAYERS_RENDER_SURFACE_H_ | 153 #endif // CC_LAYERS_RENDER_SURFACE_H_ |
OLD | NEW |