| 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 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 class CC_EXPORT RenderSurface { | 23 class CC_EXPORT RenderSurface { |
| 24 public: | 24 public: |
| 25 explicit RenderSurface(Layer* owning_layer); | 25 explicit RenderSurface(Layer* owning_layer); |
| 26 ~RenderSurface(); | 26 ~RenderSurface(); |
| 27 | 27 |
| 28 // Returns the rect that encloses the RenderSurfaceImpl including any | 28 // Returns the rect that encloses the RenderSurfaceImpl including any |
| 29 // reflection. | 29 // reflection. |
| 30 gfx::RectF DrawableContentRect() const; | 30 gfx::RectF DrawableContentRect() const; |
| 31 | 31 |
| 32 void SetContentRect(gfx::Rect content_rect) { content_rect_ = content_rect; } | 32 void SetContentRect(const gfx::Rect& content_rect) { |
| 33 content_rect_ = content_rect; |
| 34 } |
| 33 gfx::Rect content_rect() const { return content_rect_; } | 35 gfx::Rect content_rect() const { return content_rect_; } |
| 34 | 36 |
| 35 void SetDrawOpacity(float opacity) { draw_opacity_ = opacity; } | 37 void SetDrawOpacity(float opacity) { draw_opacity_ = opacity; } |
| 36 float draw_opacity() const { return draw_opacity_; } | 38 float draw_opacity() const { return draw_opacity_; } |
| 37 | 39 |
| 38 void SetDrawOpacityIsAnimating(bool draw_opacity_is_animating) { | 40 void SetDrawOpacityIsAnimating(bool draw_opacity_is_animating) { |
| 39 draw_opacity_is_animating_ = draw_opacity_is_animating; | 41 draw_opacity_is_animating_ = draw_opacity_is_animating; |
| 40 } | 42 } |
| 41 bool draw_opacity_is_animating() const { return draw_opacity_is_animating_; } | 43 bool draw_opacity_is_animating() const { return draw_opacity_is_animating_; } |
| 42 | 44 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 screen_space_transforms_are_animating_ = animating; | 79 screen_space_transforms_are_animating_ = animating; |
| 78 } | 80 } |
| 79 bool screen_space_transforms_are_animating() const { | 81 bool screen_space_transforms_are_animating() const { |
| 80 return screen_space_transforms_are_animating_; | 82 return screen_space_transforms_are_animating_; |
| 81 } | 83 } |
| 82 | 84 |
| 83 bool is_clipped() const { return is_clipped_; } | 85 bool is_clipped() const { return is_clipped_; } |
| 84 void SetIsClipped(bool is_clipped) { is_clipped_ = is_clipped; } | 86 void SetIsClipped(bool is_clipped) { is_clipped_ = is_clipped; } |
| 85 | 87 |
| 86 gfx::Rect clip_rect() const { return clip_rect_; } | 88 gfx::Rect clip_rect() const { return clip_rect_; } |
| 87 void SetClipRect(gfx::Rect clip_rect) { clip_rect_ = clip_rect; } | 89 void SetClipRect(const gfx::Rect& clip_rect) { clip_rect_ = clip_rect; } |
| 88 | 90 |
| 89 // When false, the RenderSurface does not contribute to another target | 91 // When false, the RenderSurface does not contribute to another target |
| 90 // RenderSurface that is being drawn for the current frame. It could still be | 92 // RenderSurface that is being drawn for the current frame. It could still be |
| 91 // drawn to as a target, but its output will not be a part of any other | 93 // drawn to as a target, but its output will not be a part of any other |
| 92 // surface. | 94 // surface. |
| 93 bool contributes_to_drawn_surface() const { | 95 bool contributes_to_drawn_surface() const { |
| 94 return contributes_to_drawn_surface_; | 96 return contributes_to_drawn_surface_; |
| 95 } | 97 } |
| 96 void set_contributes_to_drawn_surface(bool contributes_to_drawn_surface) { | 98 void set_contributes_to_drawn_surface(bool contributes_to_drawn_surface) { |
| 97 contributes_to_drawn_surface_ = contributes_to_drawn_surface; | 99 contributes_to_drawn_surface_ = contributes_to_drawn_surface; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 142 |
| 141 // For LayerIteratorActions | 143 // For LayerIteratorActions |
| 142 int target_render_surface_layer_index_history_; | 144 int target_render_surface_layer_index_history_; |
| 143 int current_layer_index_history_; | 145 int current_layer_index_history_; |
| 144 | 146 |
| 145 DISALLOW_COPY_AND_ASSIGN(RenderSurface); | 147 DISALLOW_COPY_AND_ASSIGN(RenderSurface); |
| 146 }; | 148 }; |
| 147 | 149 |
| 148 } // namespace cc | 150 } // namespace cc |
| 149 #endif // CC_LAYERS_RENDER_SURFACE_H_ | 151 #endif // CC_LAYERS_RENDER_SURFACE_H_ |
| OLD | NEW |