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

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

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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/io_surface_layer_impl.cc ('k') | cc/layers/layer.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 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 #ifndef CC_LAYERS_LAYER_H_ 5 #ifndef CC_LAYERS_LAYER_H_
6 #define CC_LAYERS_LAYER_H_ 6 #define CC_LAYERS_LAYER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 float anchor_point_z() const { return anchor_point_z_; } 109 float anchor_point_z() const { return anchor_point_z_; }
110 110
111 virtual void SetBackgroundColor(SkColor background_color); 111 virtual void SetBackgroundColor(SkColor background_color);
112 SkColor background_color() const { return background_color_; } 112 SkColor background_color() const { return background_color_; }
113 // If contents_opaque(), return an opaque color else return a 113 // If contents_opaque(), return an opaque color else return a
114 // non-opaque color. Tries to return background_color(), if possible. 114 // non-opaque color. Tries to return background_color(), if possible.
115 SkColor SafeOpaqueBackgroundColor() const; 115 SkColor SafeOpaqueBackgroundColor() const;
116 116
117 // A layer's bounds are in logical, non-page-scaled pixels (however, the 117 // A layer's bounds are in logical, non-page-scaled pixels (however, the
118 // root layer's bounds are in physical pixels). 118 // root layer's bounds are in physical pixels).
119 void SetBounds(gfx::Size bounds); 119 void SetBounds(const gfx::Size& bounds);
120 gfx::Size bounds() const { return bounds_; } 120 gfx::Size bounds() const { return bounds_; }
121 121
122 void SetMasksToBounds(bool masks_to_bounds); 122 void SetMasksToBounds(bool masks_to_bounds);
123 bool masks_to_bounds() const { return masks_to_bounds_; } 123 bool masks_to_bounds() const { return masks_to_bounds_; }
124 124
125 void SetMaskLayer(Layer* mask_layer); 125 void SetMaskLayer(Layer* mask_layer);
126 Layer* mask_layer() { return mask_layer_.get(); } 126 Layer* mask_layer() { return mask_layer_.get(); }
127 const Layer* mask_layer() const { return mask_layer_.get(); } 127 const Layer* mask_layer() const { return mask_layer_.get(); }
128 128
129 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect); 129 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect);
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 DrawProperties<Layer> draw_properties_; 617 DrawProperties<Layer> draw_properties_;
618 618
619 PaintProperties paint_properties_; 619 PaintProperties paint_properties_;
620 620
621 DISALLOW_COPY_AND_ASSIGN(Layer); 621 DISALLOW_COPY_AND_ASSIGN(Layer);
622 }; 622 };
623 623
624 } // namespace cc 624 } // namespace cc
625 625
626 #endif // CC_LAYERS_LAYER_H_ 626 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/io_surface_layer_impl.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698