| 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/quads/render_pass.h" | 15 #include "cc/quads/render_pass.h" |
| 15 #include "cc/quads/shared_quad_state.h" | 16 #include "cc/quads/shared_quad_state.h" |
| 16 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 17 #include "ui/gfx/rect_f.h" | 18 #include "ui/gfx/rect_f.h" |
| 18 #include "ui/gfx/transform.h" | 19 #include "ui/gfx/transform.h" |
| 19 | 20 |
| 20 namespace cc { | 21 namespace cc { |
| 21 | 22 |
| 22 class DamageTracker; | 23 class DamageTracker; |
| 23 class DelegatedRendererLayerImpl; | 24 class DelegatedRendererLayerImpl; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 bool is_clipped() const { return is_clipped_; } | 103 bool is_clipped() const { return is_clipped_; } |
| 103 | 104 |
| 104 void SetClipRect(gfx::Rect clip_rect); | 105 void SetClipRect(gfx::Rect clip_rect); |
| 105 gfx::Rect clip_rect() const { return clip_rect_; } | 106 gfx::Rect clip_rect() const { return clip_rect_; } |
| 106 | 107 |
| 107 bool ContentsChanged() const; | 108 bool ContentsChanged() const; |
| 108 | 109 |
| 109 void SetContentRect(gfx::Rect content_rect); | 110 void SetContentRect(gfx::Rect content_rect); |
| 110 gfx::Rect content_rect() const { return content_rect_; } | 111 gfx::Rect content_rect() const { return content_rect_; } |
| 111 | 112 |
| 112 std::vector<LayerImpl*>& layer_list() { return layer_list_; } | 113 LayerImplList& layer_list() { return layer_list_; } |
| 113 void AddContributingDelegatedRenderPassLayer(LayerImpl* layer); | 114 void AddContributingDelegatedRenderPassLayer(LayerImpl* layer); |
| 114 void ClearLayerLists(); | 115 void ClearLayerLists(); |
| 115 | 116 |
| 116 int OwningLayerId() const; | 117 int OwningLayerId() const; |
| 117 | 118 |
| 118 void ResetPropertyChangedFlag() { surface_property_changed_ = false; } | 119 void ResetPropertyChangedFlag() { surface_property_changed_ = false; } |
| 119 bool SurfacePropertyChanged() const; | 120 bool SurfacePropertyChanged() const; |
| 120 bool SurfacePropertyChangedOnlyFromDescendant() const; | 121 bool SurfacePropertyChangedOnlyFromDescendant() const; |
| 121 | 122 |
| 122 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } | 123 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 143 gfx::Transform replica_draw_transform_; | 144 gfx::Transform replica_draw_transform_; |
| 144 gfx::Transform replica_screen_space_transform_; | 145 gfx::Transform replica_screen_space_transform_; |
| 145 bool target_surface_transforms_are_animating_; | 146 bool target_surface_transforms_are_animating_; |
| 146 bool screen_space_transforms_are_animating_; | 147 bool screen_space_transforms_are_animating_; |
| 147 | 148 |
| 148 bool is_clipped_; | 149 bool is_clipped_; |
| 149 | 150 |
| 150 // Uses the space of the surface's target surface. | 151 // Uses the space of the surface's target surface. |
| 151 gfx::Rect clip_rect_; | 152 gfx::Rect clip_rect_; |
| 152 | 153 |
| 153 std::vector<LayerImpl*> layer_list_; | 154 LayerImplList layer_list_; |
| 154 std::vector<DelegatedRendererLayerImpl*> | 155 std::vector<DelegatedRendererLayerImpl*> |
| 155 contributing_delegated_render_pass_layer_list_; | 156 contributing_delegated_render_pass_layer_list_; |
| 156 | 157 |
| 157 // The nearest ancestor target surface that will contain the contents of this | 158 // The nearest ancestor target surface that will contain the contents of this |
| 158 // surface, and that is going to move pixels within the surface (such as with | 159 // surface, and that is going to move pixels within the surface (such as with |
| 159 // a blur). This can point to itself. | 160 // a blur). This can point to itself. |
| 160 RenderSurfaceImpl* nearest_ancestor_that_moves_pixels_; | 161 RenderSurfaceImpl* nearest_ancestor_that_moves_pixels_; |
| 161 | 162 |
| 162 scoped_ptr<DamageTracker> damage_tracker_; | 163 scoped_ptr<DamageTracker> damage_tracker_; |
| 163 | 164 |
| 164 // For LayerIteratorActions | 165 // For LayerIteratorActions |
| 165 int target_render_surface_layer_index_history_; | 166 int target_render_surface_layer_index_history_; |
| 166 int current_layer_index_history_; | 167 int current_layer_index_history_; |
| 167 | 168 |
| 168 friend struct LayerIteratorActions; | 169 friend struct LayerIteratorActions; |
| 169 | 170 |
| 170 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); | 171 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); |
| 171 }; | 172 }; |
| 172 | 173 |
| 173 } // namespace cc | 174 } // namespace cc |
| 174 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ | 175 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
| OLD | NEW |