Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: cc/layers/render_surface_impl.h

Issue 1868003002: cc: Move RenderTarget Information to Effect Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 19 matching lines...) Expand all
30 class LayerImpl; 30 class LayerImpl;
31 class LayerIterator; 31 class LayerIterator;
32 32
33 struct AppendQuadsData; 33 struct AppendQuadsData;
34 34
35 class CC_EXPORT RenderSurfaceImpl { 35 class CC_EXPORT RenderSurfaceImpl {
36 public: 36 public:
37 explicit RenderSurfaceImpl(LayerImpl* owning_layer); 37 explicit RenderSurfaceImpl(LayerImpl* owning_layer);
38 virtual ~RenderSurfaceImpl(); 38 virtual ~RenderSurfaceImpl();
39 39
40 // Returns the RenderSurfaceImpl that this render surface contributes to. Root
41 // render surface's render_target is itself.
42 RenderSurfaceImpl* render_target();
43 const RenderSurfaceImpl* render_target() const;
44
40 gfx::PointF ContentRectCenter() const { 45 gfx::PointF ContentRectCenter() const {
41 return gfx::RectF(content_rect()).CenterPoint(); 46 return gfx::RectF(content_rect()).CenterPoint();
42 } 47 }
43 48
44 // Returns the rect that encloses the RenderSurfaceImpl including any 49 // Returns the rect that encloses the RenderSurfaceImpl including any
45 // reflection. 50 // reflection.
46 gfx::RectF DrawableContentRect() const; 51 gfx::RectF DrawableContentRect() const;
47 52
48 void SetDrawOpacity(float opacity) { 53 void SetDrawOpacity(float opacity) {
49 draw_properties_.draw_opacity = opacity; 54 draw_properties_.draw_opacity = opacity;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 bool contributes_to_drawn_surface() const { 113 bool contributes_to_drawn_surface() const {
109 return contributes_to_drawn_surface_; 114 return contributes_to_drawn_surface_;
110 } 115 }
111 void set_contributes_to_drawn_surface(bool contributes_to_drawn_surface) { 116 void set_contributes_to_drawn_surface(bool contributes_to_drawn_surface) {
112 contributes_to_drawn_surface_ = contributes_to_drawn_surface; 117 contributes_to_drawn_surface_ = contributes_to_drawn_surface;
113 } 118 }
114 119
115 void SetContentRect(const gfx::Rect& content_rect); 120 void SetContentRect(const gfx::Rect& content_rect);
116 gfx::Rect content_rect() const { return draw_properties_.content_rect; } 121 gfx::Rect content_rect() const { return draw_properties_.content_rect; }
117 122
118 void SetAccumulatedContentRect(const gfx::Rect& content_rect); 123 void ClearAccumulatedContentRect();
124 void AccumulateContentRectFromContributingLayer(
125 LayerImpl* contributing_layer);
126 void AccumulateContentRectFromContributingRenderSurface(
127 RenderSurfaceImpl* contributing_surface);
128
119 gfx::Rect accumulated_content_rect() const { 129 gfx::Rect accumulated_content_rect() const {
120 return accumulated_content_rect_; 130 return accumulated_content_rect_;
121 } 131 }
122 132
123 const Occlusion& occlusion_in_content_space() const { 133 const Occlusion& occlusion_in_content_space() const {
124 return occlusion_in_content_space_; 134 return occlusion_in_content_space_;
125 } 135 }
126 void set_occlusion_in_content_space(const Occlusion& occlusion) { 136 void set_occlusion_in_content_space(const Occlusion& occlusion) {
127 occlusion_in_content_space_ = occlusion; 137 occlusion_in_content_space_ = occlusion;
128 } 138 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 int target_render_surface_layer_index_history_; 219 int target_render_surface_layer_index_history_;
210 size_t current_layer_index_history_; 220 size_t current_layer_index_history_;
211 221
212 friend class LayerIterator; 222 friend class LayerIterator;
213 223
214 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); 224 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl);
215 }; 225 };
216 226
217 } // namespace cc 227 } // namespace cc
218 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ 228 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698