| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.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 "cc/quads/render_pass.h" | 15 #include "cc/quads/render_pass.h" |
| 16 #include "cc/quads/shared_quad_state.h" | 16 #include "cc/quads/shared_quad_state.h" |
| 17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 18 #include "ui/gfx/rect_f.h" | 18 #include "ui/gfx/rect_f.h" |
| 19 #include "ui/gfx/transform.h" | 19 #include "ui/gfx/transform.h" |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 | 22 |
| 23 class DamageTracker; | 23 class DamageTracker; |
| 24 class DelegatedRendererLayerImpl; | 24 class DelegatedRendererLayerImpl; |
| 25 template <typename LayerType> | 25 template <typename LayerType> |
| 26 class OcclusionTracker; | 26 class OcclusionTracker; |
| 27 class RenderPassId; |
| 27 class RenderPassSink; | 28 class RenderPassSink; |
| 28 class LayerImpl; | 29 class LayerImpl; |
| 29 template <typename LayerType> | 30 template <typename LayerType> |
| 30 class LayerIterator; | 31 class LayerIterator; |
| 31 | 32 |
| 32 struct AppendQuadsData; | 33 struct AppendQuadsData; |
| 33 | 34 |
| 34 class CC_EXPORT RenderSurfaceImpl { | 35 class CC_EXPORT RenderSurfaceImpl { |
| 35 public: | 36 public: |
| 36 explicit RenderSurfaceImpl(LayerImpl* owning_layer); | 37 explicit RenderSurfaceImpl(LayerImpl* owning_layer); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void ClearLayerLists(); | 125 void ClearLayerLists(); |
| 125 | 126 |
| 126 int OwningLayerId() const; | 127 int OwningLayerId() const; |
| 127 | 128 |
| 128 void ResetPropertyChangedFlag() { surface_property_changed_ = false; } | 129 void ResetPropertyChangedFlag() { surface_property_changed_ = false; } |
| 129 bool SurfacePropertyChanged() const; | 130 bool SurfacePropertyChanged() const; |
| 130 bool SurfacePropertyChangedOnlyFromDescendant() const; | 131 bool SurfacePropertyChangedOnlyFromDescendant() const; |
| 131 | 132 |
| 132 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } | 133 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } |
| 133 | 134 |
| 134 RenderPass::Id RenderPassId(); | 135 RenderPassId GetRenderPassId(); |
| 135 | 136 |
| 136 void AppendRenderPasses(RenderPassSink* pass_sink); | 137 void AppendRenderPasses(RenderPassSink* pass_sink); |
| 137 void AppendQuads(RenderPass* render_pass, | 138 void AppendQuads(RenderPass* render_pass, |
| 138 const OcclusionTracker<LayerImpl>& occlusion_tracker, | 139 const OcclusionTracker<LayerImpl>& occlusion_tracker, |
| 139 AppendQuadsData* append_quads_data, | 140 AppendQuadsData* append_quads_data, |
| 140 bool for_replica, | 141 bool for_replica, |
| 141 RenderPass::Id render_pass_id); | 142 RenderPassId render_pass_id); |
| 142 | 143 |
| 143 private: | 144 private: |
| 144 LayerImpl* owning_layer_; | 145 LayerImpl* owning_layer_; |
| 145 | 146 |
| 146 // Uses this surface's space. | 147 // Uses this surface's space. |
| 147 gfx::Rect content_rect_; | 148 gfx::Rect content_rect_; |
| 148 bool surface_property_changed_ : 1; | 149 bool surface_property_changed_ : 1; |
| 149 bool draw_opacity_is_animating_ : 1; | 150 bool draw_opacity_is_animating_ : 1; |
| 150 bool target_surface_transforms_are_animating_ : 1; | 151 bool target_surface_transforms_are_animating_ : 1; |
| 151 bool screen_space_transforms_are_animating_ : 1; | 152 bool screen_space_transforms_are_animating_ : 1; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 176 int target_render_surface_layer_index_history_; | 177 int target_render_surface_layer_index_history_; |
| 177 int current_layer_index_history_; | 178 int current_layer_index_history_; |
| 178 | 179 |
| 179 friend class LayerIterator<LayerImpl>; | 180 friend class LayerIterator<LayerImpl>; |
| 180 | 181 |
| 181 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); | 182 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); |
| 182 }; | 183 }; |
| 183 | 184 |
| 184 } // namespace cc | 185 } // namespace cc |
| 185 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ | 186 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
| OLD | NEW |