| 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 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // RenderSurface that is being drawn for the current frame. It could still be | 94 // RenderSurface that is being drawn for the current frame. It could still be |
| 95 // drawn to as a target, but its output will not be a part of any other | 95 // drawn to as a target, but its output will not be a part of any other |
| 96 // surface. | 96 // surface. |
| 97 bool contributes_to_drawn_surface() const { | 97 bool contributes_to_drawn_surface() const { |
| 98 return contributes_to_drawn_surface_; | 98 return contributes_to_drawn_surface_; |
| 99 } | 99 } |
| 100 void set_contributes_to_drawn_surface(bool contributes_to_drawn_surface) { | 100 void set_contributes_to_drawn_surface(bool contributes_to_drawn_surface) { |
| 101 contributes_to_drawn_surface_ = contributes_to_drawn_surface; | 101 contributes_to_drawn_surface_ = contributes_to_drawn_surface; |
| 102 } | 102 } |
| 103 | 103 |
| 104 RenderSurfaceLayerList& layer_list() { return layer_list_; } | 104 LayerList& layer_list() { return layer_list_; } |
| 105 // A no-op since DelegatedRendererLayers on the main thread don't have any | 105 // A no-op since DelegatedRendererLayers on the main thread don't have any |
| 106 // RenderPasses so they can't contribute to a surface. | 106 // RenderPasses so they can't contribute to a surface. |
| 107 void AddContributingDelegatedRenderPassLayer(Layer* layer) {} | 107 void AddContributingDelegatedRenderPassLayer(Layer* layer) {} |
| 108 | 108 |
| 109 void SetNearestOcclusionImmuneAncestor(RenderSurface* surface) { | 109 void SetNearestOcclusionImmuneAncestor(RenderSurface* surface) { |
| 110 nearest_occlusion_immune_ancestor_ = surface; | 110 nearest_occlusion_immune_ancestor_ = surface; |
| 111 } | 111 } |
| 112 const RenderSurface* nearest_occlusion_immune_ancestor() const { | 112 const RenderSurface* nearest_occlusion_immune_ancestor() const { |
| 113 return nearest_occlusion_immune_ancestor_; | 113 return nearest_occlusion_immune_ancestor_; |
| 114 } | 114 } |
| 115 | 115 |
| 116 void ClearLayerLists(); |
| 117 |
| 116 private: | 118 private: |
| 117 friend class LayerIterator<Layer>; | 119 friend class LayerIterator<Layer>; |
| 118 | 120 |
| 119 Layer* owning_layer_; | 121 Layer* owning_layer_; |
| 120 | 122 |
| 121 // Uses this surface's space. | 123 // Uses this surface's space. |
| 122 gfx::Rect content_rect_; | 124 gfx::Rect content_rect_; |
| 123 | 125 |
| 124 float draw_opacity_; | 126 float draw_opacity_; |
| 125 bool draw_opacity_is_animating_; | 127 bool draw_opacity_is_animating_; |
| 126 gfx::Transform draw_transform_; | 128 gfx::Transform draw_transform_; |
| 127 gfx::Transform screen_space_transform_; | 129 gfx::Transform screen_space_transform_; |
| 128 gfx::Transform replica_draw_transform_; | 130 gfx::Transform replica_draw_transform_; |
| 129 gfx::Transform replica_screen_space_transform_; | 131 gfx::Transform replica_screen_space_transform_; |
| 130 bool target_surface_transforms_are_animating_; | 132 bool target_surface_transforms_are_animating_; |
| 131 bool screen_space_transforms_are_animating_; | 133 bool screen_space_transforms_are_animating_; |
| 132 | 134 |
| 133 bool is_clipped_; | 135 bool is_clipped_; |
| 134 bool contributes_to_drawn_surface_; | 136 bool contributes_to_drawn_surface_; |
| 135 | 137 |
| 136 // Uses the space of the surface's target surface. | 138 // Uses the space of the surface's target surface. |
| 137 gfx::Rect clip_rect_; | 139 gfx::Rect clip_rect_; |
| 138 | 140 |
| 139 RenderSurfaceLayerList layer_list_; | 141 LayerList layer_list_; |
| 140 | 142 |
| 141 // The nearest ancestor target surface that will contain the contents of this | 143 // The nearest ancestor target surface that will contain the contents of this |
| 142 // surface, and that ignores outside occlusion. This can point to itself. | 144 // surface, and that ignores outside occlusion. This can point to itself. |
| 143 RenderSurface* nearest_occlusion_immune_ancestor_; | 145 RenderSurface* nearest_occlusion_immune_ancestor_; |
| 144 | 146 |
| 145 // For LayerIteratorActions | 147 // For LayerIteratorActions |
| 146 int target_render_surface_layer_index_history_; | 148 int target_render_surface_layer_index_history_; |
| 147 int current_layer_index_history_; | 149 int current_layer_index_history_; |
| 148 | 150 |
| 149 DISALLOW_COPY_AND_ASSIGN(RenderSurface); | 151 DISALLOW_COPY_AND_ASSIGN(RenderSurface); |
| 150 }; | 152 }; |
| 151 | 153 |
| 152 } // namespace cc | 154 } // namespace cc |
| 153 #endif // CC_LAYERS_RENDER_SURFACE_H_ | 155 #endif // CC_LAYERS_RENDER_SURFACE_H_ |
| OLD | NEW |