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