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

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

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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
« no previous file with comments | « cc/layers/render_surface.h ('k') | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void SetScreenSpaceTransformsAreAnimating(bool animating) { 94 void SetScreenSpaceTransformsAreAnimating(bool animating) {
95 screen_space_transforms_are_animating_ = animating; 95 screen_space_transforms_are_animating_ = animating;
96 } 96 }
97 bool screen_space_transforms_are_animating() const { 97 bool screen_space_transforms_are_animating() const {
98 return screen_space_transforms_are_animating_; 98 return screen_space_transforms_are_animating_;
99 } 99 }
100 100
101 void SetIsClipped(bool is_clipped) { is_clipped_ = is_clipped; } 101 void SetIsClipped(bool is_clipped) { is_clipped_ = is_clipped; }
102 bool is_clipped() const { return is_clipped_; } 102 bool is_clipped() const { return is_clipped_; }
103 103
104 void SetClipRect(gfx::Rect clip_rect); 104 void SetClipRect(const gfx::Rect& clip_rect);
105 gfx::Rect clip_rect() const { return clip_rect_; } 105 gfx::Rect clip_rect() const { return clip_rect_; }
106 106
107 // When false, the RenderSurface does not contribute to another target 107 // When false, the RenderSurface does not contribute to another target
108 // RenderSurface that is being drawn for the current frame. It could still be 108 // RenderSurface that is being drawn for the current frame. It could still be
109 // drawn to as a target, but its output will not be a part of any other 109 // drawn to as a target, but its output will not be a part of any other
110 // surface. 110 // surface.
111 bool contributes_to_drawn_surface() const { 111 bool contributes_to_drawn_surface() const {
112 return contributes_to_drawn_surface_; 112 return contributes_to_drawn_surface_;
113 } 113 }
114 void set_contributes_to_drawn_surface(bool contributes_to_drawn_surface) { 114 void set_contributes_to_drawn_surface(bool contributes_to_drawn_surface) {
115 contributes_to_drawn_surface_ = contributes_to_drawn_surface; 115 contributes_to_drawn_surface_ = contributes_to_drawn_surface;
116 } 116 }
117 117
118 bool ContentsChanged() const; 118 bool ContentsChanged() const;
119 119
120 void SetContentRect(gfx::Rect content_rect); 120 void SetContentRect(const gfx::Rect& content_rect);
121 gfx::Rect content_rect() const { return content_rect_; } 121 gfx::Rect content_rect() const { return content_rect_; }
122 122
123 LayerImplList& layer_list() { return layer_list_; } 123 LayerImplList& layer_list() { return layer_list_; }
124 void AddContributingDelegatedRenderPassLayer(LayerImpl* layer); 124 void AddContributingDelegatedRenderPassLayer(LayerImpl* layer);
125 void ClearLayerLists(); 125 void ClearLayerLists();
126 126
127 int OwningLayerId() const; 127 int OwningLayerId() const;
128 128
129 void ResetPropertyChangedFlag() { surface_property_changed_ = false; } 129 void ResetPropertyChangedFlag() { surface_property_changed_ = false; }
130 bool SurfacePropertyChanged() const; 130 bool SurfacePropertyChanged() const;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 int target_render_surface_layer_index_history_; 176 int target_render_surface_layer_index_history_;
177 int current_layer_index_history_; 177 int current_layer_index_history_;
178 178
179 friend struct LayerIteratorActions; 179 friend struct LayerIteratorActions;
180 180
181 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); 181 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl);
182 }; 182 };
183 183
184 } // namespace cc 184 } // namespace cc
185 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ 185 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/render_surface.h ('k') | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698