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_RENDER_SURFACE_IMPL_H_ | 5 #ifndef CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
6 #define CC_LAYERS_RENDER_SURFACE_IMPL_H_ | 6 #define CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "cc/base/cc_export.h" | 15 #include "cc/base/cc_export.h" |
16 #include "cc/layers/layer_collections.h" | 16 #include "cc/layers/layer_collections.h" |
17 #include "cc/quads/render_pass.h" | 17 #include "cc/quads/render_pass.h" |
18 #include "cc/quads/shared_quad_state.h" | 18 #include "cc/quads/shared_quad_state.h" |
19 #include "cc/trees/occlusion.h" | 19 #include "cc/trees/occlusion.h" |
20 #include "cc/trees/property_tree.h" | 20 #include "cc/trees/property_tree.h" |
21 #include "ui/gfx/geometry/rect.h" | 21 #include "ui/gfx/geometry/rect.h" |
22 #include "ui/gfx/geometry/rect_f.h" | 22 #include "ui/gfx/geometry/rect_f.h" |
23 #include "ui/gfx/transform.h" | 23 #include "ui/gfx/transform.h" |
24 | 24 |
25 namespace cc { | 25 namespace cc { |
26 | 26 |
27 class DamageTracker; | 27 class DamageTracker; |
28 class FilterOperations; | 28 class FilterOperations; |
29 class Occlusion; | 29 class Occlusion; |
30 class RenderPassSink; | |
31 class LayerImpl; | 30 class LayerImpl; |
32 class LayerIterator; | 31 class LayerIterator; |
33 class LayerTreeImpl; | 32 class LayerTreeImpl; |
34 | 33 |
35 struct AppendQuadsData; | 34 struct AppendQuadsData; |
36 | 35 |
37 class CC_EXPORT RenderSurfaceImpl { | 36 class CC_EXPORT RenderSurfaceImpl { |
38 public: | 37 public: |
39 RenderSurfaceImpl(LayerTreeImpl* layer_tree_impl, int stable_effect_id); | 38 RenderSurfaceImpl(LayerTreeImpl* layer_tree_impl, int stable_effect_id); |
40 virtual ~RenderSurfaceImpl(); | 39 virtual ~RenderSurfaceImpl(); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 bool SurfacePropertyChanged() const; | 139 bool SurfacePropertyChanged() const; |
141 bool SurfacePropertyChangedOnlyFromDescendant() const; | 140 bool SurfacePropertyChangedOnlyFromDescendant() const; |
142 bool AncestorPropertyChanged() const; | 141 bool AncestorPropertyChanged() const; |
143 void NoteAncestorPropertyChanged(); | 142 void NoteAncestorPropertyChanged(); |
144 | 143 |
145 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } | 144 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } |
146 gfx::Rect GetDamageRect(); | 145 gfx::Rect GetDamageRect(); |
147 | 146 |
148 int GetRenderPassId(); | 147 int GetRenderPassId(); |
149 | 148 |
150 void AppendRenderPasses(RenderPassSink* pass_sink); | 149 std::unique_ptr<RenderPass> CreateRenderPass(); |
151 void AppendQuads(RenderPass* render_pass, AppendQuadsData* append_quads_data); | 150 void AppendQuads(RenderPass* render_pass, AppendQuadsData* append_quads_data); |
152 | 151 |
153 int TransformTreeIndex() const; | 152 int TransformTreeIndex() const; |
154 int ClipTreeIndex() const; | 153 int ClipTreeIndex() const; |
155 | 154 |
156 void set_effect_tree_index(int index) { effect_tree_index_ = index; } | 155 void set_effect_tree_index(int index) { effect_tree_index_ = index; } |
157 int EffectTreeIndex() const; | 156 int EffectTreeIndex() const; |
158 | 157 |
159 private: | 158 private: |
160 void SetContentRect(const gfx::Rect& content_rect); | 159 void SetContentRect(const gfx::Rect& content_rect); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 int target_render_surface_layer_index_history_; | 213 int target_render_surface_layer_index_history_; |
215 size_t current_layer_index_history_; | 214 size_t current_layer_index_history_; |
216 | 215 |
217 friend class LayerIterator; | 216 friend class LayerIterator; |
218 | 217 |
219 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); | 218 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); |
220 }; | 219 }; |
221 | 220 |
222 } // namespace cc | 221 } // namespace cc |
223 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ | 222 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
OLD | NEW |