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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
| 14 #include "cc/layers/layer_lists.h" |
14 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
15 #include "ui/gfx/rect_f.h" | 16 #include "ui/gfx/rect_f.h" |
16 #include "ui/gfx/transform.h" | 17 #include "ui/gfx/transform.h" |
17 | 18 |
18 namespace cc { | 19 namespace cc { |
19 | 20 |
20 class Layer; | 21 class Layer; |
21 | 22 |
22 class CC_EXPORT RenderSurface { | 23 class CC_EXPORT RenderSurface { |
23 public: | 24 public: |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 bool screen_space_transforms_are_animating() const { | 79 bool screen_space_transforms_are_animating() const { |
79 return screen_space_transforms_are_animating_; | 80 return screen_space_transforms_are_animating_; |
80 } | 81 } |
81 | 82 |
82 bool is_clipped() const { return is_clipped_; } | 83 bool is_clipped() const { return is_clipped_; } |
83 void SetIsClipped(bool is_clipped) { is_clipped_ = is_clipped; } | 84 void SetIsClipped(bool is_clipped) { is_clipped_ = is_clipped; } |
84 | 85 |
85 gfx::Rect clip_rect() const { return clip_rect_; } | 86 gfx::Rect clip_rect() const { return clip_rect_; } |
86 void SetClipRect(gfx::Rect clip_rect) { clip_rect_ = clip_rect; } | 87 void SetClipRect(gfx::Rect clip_rect) { clip_rect_ = clip_rect; } |
87 | 88 |
88 typedef std::vector<scoped_refptr<Layer> > LayerList; | |
89 LayerList& layer_list() { return layer_list_; } | 89 LayerList& layer_list() { return layer_list_; } |
90 // A no-op since DelegatedRendererLayers on the main thread don't have any | 90 // A no-op since DelegatedRendererLayers on the main thread don't have any |
91 // RenderPasses so they can't contribute to a surface. | 91 // RenderPasses so they can't contribute to a surface. |
92 void AddContributingDelegatedRenderPassLayer(Layer* layer) {} | 92 void AddContributingDelegatedRenderPassLayer(Layer* layer) {} |
93 void ClearLayerLists() { layer_list_.clear(); } | 93 void ClearLayerLists() { layer_list_.clear(); } |
94 | 94 |
95 void SetNearestAncestorThatMovesPixels(RenderSurface* surface) { | 95 void SetNearestAncestorThatMovesPixels(RenderSurface* surface) { |
96 nearest_ancestor_that_moves_pixels_ = surface; | 96 nearest_ancestor_that_moves_pixels_ = surface; |
97 } | 97 } |
98 const RenderSurface* nearest_ancestor_that_moves_pixels() const { | 98 const RenderSurface* nearest_ancestor_that_moves_pixels() const { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 // For LayerIteratorActions | 131 // For LayerIteratorActions |
132 int target_render_surface_layer_index_history_; | 132 int target_render_surface_layer_index_history_; |
133 int current_layer_index_history_; | 133 int current_layer_index_history_; |
134 | 134 |
135 DISALLOW_COPY_AND_ASSIGN(RenderSurface); | 135 DISALLOW_COPY_AND_ASSIGN(RenderSurface); |
136 }; | 136 }; |
137 | 137 |
138 } // namespace cc | 138 } // namespace cc |
139 #endif // CC_LAYERS_RENDER_SURFACE_H_ | 139 #endif // CC_LAYERS_RENDER_SURFACE_H_ |
OLD | NEW |