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

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

Issue 139233002: [#4] Pass gfx structs by const ref (gfx::PointF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected as per review comments! 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/layer.cc ('k') | cc/layers/layer_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_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Returns true if this layer has content to draw. 181 // Returns true if this layer has content to draw.
182 void SetDrawsContent(bool draws_content); 182 void SetDrawsContent(bool draws_content);
183 bool DrawsContent() const { return draws_content_; } 183 bool DrawsContent() const { return draws_content_; }
184 184
185 void SetHideLayerAndSubtree(bool hide); 185 void SetHideLayerAndSubtree(bool hide);
186 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } 186 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; }
187 187
188 bool force_render_surface() const { return force_render_surface_; } 188 bool force_render_surface() const { return force_render_surface_; }
189 void SetForceRenderSurface(bool force) { force_render_surface_ = force; } 189 void SetForceRenderSurface(bool force) { force_render_surface_ = force; }
190 190
191 void SetAnchorPoint(gfx::PointF anchor_point); 191 void SetAnchorPoint(const gfx::PointF& anchor_point);
192 gfx::PointF anchor_point() const { return anchor_point_; } 192 gfx::PointF anchor_point() const { return anchor_point_; }
193 193
194 void SetAnchorPointZ(float anchor_point_z); 194 void SetAnchorPointZ(float anchor_point_z);
195 float anchor_point_z() const { return anchor_point_z_; } 195 float anchor_point_z() const { return anchor_point_z_; }
196 196
197 void SetBackgroundColor(SkColor background_color); 197 void SetBackgroundColor(SkColor background_color);
198 SkColor background_color() const { return background_color_; } 198 SkColor background_color() const { return background_color_; }
199 // If contents_opaque(), return an opaque color else return a 199 // If contents_opaque(), return an opaque color else return a
200 // non-opaque color. Tries to return background_color(), if possible. 200 // non-opaque color. Tries to return background_color(), if possible.
201 SkColor SafeOpaqueBackgroundColor() const; 201 SkColor SafeOpaqueBackgroundColor() const;
(...skipping 23 matching lines...) Expand all
225 SkXfermode::Mode blend_mode() const { return blend_mode_; } 225 SkXfermode::Mode blend_mode() const { return blend_mode_; }
226 bool uses_default_blend_mode() const { 226 bool uses_default_blend_mode() const {
227 return blend_mode_ == SkXfermode::kSrcOver_Mode; 227 return blend_mode_ == SkXfermode::kSrcOver_Mode;
228 } 228 }
229 229
230 void SetIsRootForIsolatedGroup(bool root); 230 void SetIsRootForIsolatedGroup(bool root);
231 bool is_root_for_isolated_group() const { 231 bool is_root_for_isolated_group() const {
232 return is_root_for_isolated_group_; 232 return is_root_for_isolated_group_;
233 } 233 }
234 234
235 void SetPosition(gfx::PointF position); 235 void SetPosition(const gfx::PointF& position);
236 gfx::PointF position() const { return position_; } 236 gfx::PointF position() const { return position_; }
237 237
238 void SetIsContainerForFixedPositionLayers(bool container) { 238 void SetIsContainerForFixedPositionLayers(bool container) {
239 is_container_for_fixed_position_layers_ = container; 239 is_container_for_fixed_position_layers_ = container;
240 } 240 }
241 // This is a non-trivial function in Layer. 241 // This is a non-trivial function in Layer.
242 bool IsContainerForFixedPositionLayers() const { 242 bool IsContainerForFixedPositionLayers() const {
243 return is_container_for_fixed_position_layers_; 243 return is_container_for_fixed_position_layers_;
244 } 244 }
245 245
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 const Region& touch_event_handler_region() const { 428 const Region& touch_event_handler_region() const {
429 return touch_event_handler_region_; 429 return touch_event_handler_region_;
430 } 430 }
431 431
432 void SetDrawCheckerboardForMissingTiles(bool checkerboard) { 432 void SetDrawCheckerboardForMissingTiles(bool checkerboard) {
433 draw_checkerboard_for_missing_tiles_ = checkerboard; 433 draw_checkerboard_for_missing_tiles_ = checkerboard;
434 } 434 }
435 bool DrawCheckerboardForMissingTiles() const; 435 bool DrawCheckerboardForMissingTiles() const;
436 436
437 InputHandler::ScrollStatus TryScroll( 437 InputHandler::ScrollStatus TryScroll(
438 gfx::PointF screen_space_point, 438 const gfx::PointF& screen_space_point,
439 InputHandler::ScrollInputType type) const; 439 InputHandler::ScrollInputType type) const;
440 440
441 void SetDoubleSided(bool double_sided); 441 void SetDoubleSided(bool double_sided);
442 bool double_sided() const { return double_sided_; } 442 bool double_sided() const { return double_sided_; }
443 443
444 void SetTransform(const gfx::Transform& transform); 444 void SetTransform(const gfx::Transform& transform);
445 const gfx::Transform& transform() const { return transform_; } 445 const gfx::Transform& transform() const { return transform_; }
446 bool TransformIsAnimating() const; 446 bool TransformIsAnimating() const;
447 bool TransformIsAnimatingOnImplOnly() const; 447 bool TransformIsAnimatingOnImplOnly() const;
448 448
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 DrawProperties<LayerImpl> draw_properties_; 654 DrawProperties<LayerImpl> draw_properties_;
655 655
656 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; 656 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
657 657
658 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 658 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
659 }; 659 };
660 660
661 } // namespace cc 661 } // namespace cc
662 662
663 #endif // CC_LAYERS_LAYER_IMPL_H_ 663 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698