| 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/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
| 18 #include "ui/gfx/geometry/rect_f.h" | 18 #include "ui/gfx/geometry/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 class Occlusion; |
| 26 class OcclusionTracker; | |
| 27 class RenderPassId; | 26 class RenderPassId; |
| 28 class RenderPassSink; | 27 class RenderPassSink; |
| 29 class LayerImpl; | 28 class LayerImpl; |
| 30 template <typename LayerType> | 29 template <typename LayerType> |
| 31 class LayerIterator; | 30 class LayerIterator; |
| 32 | 31 |
| 33 struct AppendQuadsData; | 32 struct AppendQuadsData; |
| 34 | 33 |
| 35 class CC_EXPORT RenderSurfaceImpl { | 34 class CC_EXPORT RenderSurfaceImpl { |
| 36 public: | 35 public: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 53 } | 52 } |
| 54 const RenderSurfaceImpl* nearest_occlusion_immune_ancestor() const { | 53 const RenderSurfaceImpl* nearest_occlusion_immune_ancestor() const { |
| 55 return nearest_occlusion_immune_ancestor_; | 54 return nearest_occlusion_immune_ancestor_; |
| 56 } | 55 } |
| 57 | 56 |
| 58 void SetDrawOpacityIsAnimating(bool draw_opacity_is_animating) { | 57 void SetDrawOpacityIsAnimating(bool draw_opacity_is_animating) { |
| 59 draw_opacity_is_animating_ = draw_opacity_is_animating; | 58 draw_opacity_is_animating_ = draw_opacity_is_animating; |
| 60 } | 59 } |
| 61 bool draw_opacity_is_animating() const { return draw_opacity_is_animating_; } | 60 bool draw_opacity_is_animating() const { return draw_opacity_is_animating_; } |
| 62 | 61 |
| 62 SkColor GetDebugBorderColor() const; |
| 63 SkColor GetReplicaDebugBorderColor() const; |
| 64 |
| 65 float GetDebugBorderWidth() const; |
| 66 float GetReplicaDebugBorderWidth() const; |
| 67 |
| 63 void SetDrawTransform(const gfx::Transform& draw_transform) { | 68 void SetDrawTransform(const gfx::Transform& draw_transform) { |
| 64 draw_transform_ = draw_transform; | 69 draw_transform_ = draw_transform; |
| 65 } | 70 } |
| 66 const gfx::Transform& draw_transform() const { return draw_transform_; } | 71 const gfx::Transform& draw_transform() const { return draw_transform_; } |
| 67 | 72 |
| 68 void SetScreenSpaceTransform(const gfx::Transform& screen_space_transform) { | 73 void SetScreenSpaceTransform(const gfx::Transform& screen_space_transform) { |
| 69 screen_space_transform_ = screen_space_transform; | 74 screen_space_transform_ = screen_space_transform; |
| 70 } | 75 } |
| 71 const gfx::Transform& screen_space_transform() const { | 76 const gfx::Transform& screen_space_transform() const { |
| 72 return screen_space_transform_; | 77 return screen_space_transform_; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 void ResetPropertyChangedFlag() { surface_property_changed_ = false; } | 134 void ResetPropertyChangedFlag() { surface_property_changed_ = false; } |
| 130 bool SurfacePropertyChanged() const; | 135 bool SurfacePropertyChanged() const; |
| 131 bool SurfacePropertyChangedOnlyFromDescendant() const; | 136 bool SurfacePropertyChangedOnlyFromDescendant() const; |
| 132 | 137 |
| 133 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } | 138 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } |
| 134 | 139 |
| 135 RenderPassId GetRenderPassId(); | 140 RenderPassId GetRenderPassId(); |
| 136 | 141 |
| 137 void AppendRenderPasses(RenderPassSink* pass_sink); | 142 void AppendRenderPasses(RenderPassSink* pass_sink); |
| 138 void AppendQuads(RenderPass* render_pass, | 143 void AppendQuads(RenderPass* render_pass, |
| 139 const OcclusionTracker<LayerImpl>& occlusion_tracker, | 144 const gfx::Transform& draw_transform, |
| 145 const Occlusion& occlusion_in_content_space, |
| 146 SkColor debug_border_color, |
| 147 float debug_border_width, |
| 148 LayerImpl* mask_layer, |
| 140 AppendQuadsData* append_quads_data, | 149 AppendQuadsData* append_quads_data, |
| 141 bool for_replica, | |
| 142 RenderPassId render_pass_id); | 150 RenderPassId render_pass_id); |
| 143 | 151 |
| 144 private: | 152 private: |
| 145 LayerImpl* owning_layer_; | 153 LayerImpl* owning_layer_; |
| 146 | 154 |
| 147 // Uses this surface's space. | 155 // Uses this surface's space. |
| 148 gfx::Rect content_rect_; | 156 gfx::Rect content_rect_; |
| 149 bool surface_property_changed_ : 1; | 157 bool surface_property_changed_ : 1; |
| 150 bool draw_opacity_is_animating_ : 1; | 158 bool draw_opacity_is_animating_ : 1; |
| 151 bool target_surface_transforms_are_animating_ : 1; | 159 bool target_surface_transforms_are_animating_ : 1; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 177 int target_render_surface_layer_index_history_; | 185 int target_render_surface_layer_index_history_; |
| 178 int current_layer_index_history_; | 186 int current_layer_index_history_; |
| 179 | 187 |
| 180 friend class LayerIterator<LayerImpl>; | 188 friend class LayerIterator<LayerImpl>; |
| 181 | 189 |
| 182 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); | 190 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); |
| 183 }; | 191 }; |
| 184 | 192 |
| 185 } // namespace cc | 193 } // namespace cc |
| 186 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ | 194 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
| OLD | NEW |