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

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

Issue 15995031: cc: Don't clear transparent piles to an opaque color (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 void SetAnchorPoint(gfx::PointF anchor_point); 89 void SetAnchorPoint(gfx::PointF anchor_point);
90 gfx::PointF anchor_point() const { return anchor_point_; } 90 gfx::PointF anchor_point() const { return anchor_point_; }
91 91
92 void SetAnchorPointZ(float anchor_point_z); 92 void SetAnchorPointZ(float anchor_point_z);
93 float anchor_point_z() const { return anchor_point_z_; } 93 float anchor_point_z() const { return anchor_point_z_; }
94 94
95 virtual void SetBackgroundColor(SkColor background_color); 95 virtual void SetBackgroundColor(SkColor background_color);
96 SkColor background_color() const { return background_color_; } 96 SkColor background_color() const { return background_color_; }
97 // If contents_opaque(), return an opaque color else return a
98 // non-opaque color. Tries to return background_color(), if possible.
99 SkColor SafeOpaqueBackgroundColor() const;
97 100
98 // A layer's bounds are in logical, non-page-scaled pixels (however, the 101 // A layer's bounds are in logical, non-page-scaled pixels (however, the
99 // root layer's bounds are in physical pixels). 102 // root layer's bounds are in physical pixels).
100 void SetBounds(gfx::Size bounds); 103 void SetBounds(gfx::Size bounds);
101 gfx::Size bounds() const { return bounds_; } 104 gfx::Size bounds() const { return bounds_; }
102 105
103 void SetMasksToBounds(bool masks_to_bounds); 106 void SetMasksToBounds(bool masks_to_bounds);
104 bool masks_to_bounds() const { return masks_to_bounds_; } 107 bool masks_to_bounds() const { return masks_to_bounds_; }
105 108
106 void SetMaskLayer(Layer* mask_layer); 109 void SetMaskLayer(Layer* mask_layer);
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 DrawProperties<Layer, RenderSurface> draw_properties_; 490 DrawProperties<Layer, RenderSurface> draw_properties_;
488 491
489 PaintProperties paint_properties_; 492 PaintProperties paint_properties_;
490 493
491 DISALLOW_COPY_AND_ASSIGN(Layer); 494 DISALLOW_COPY_AND_ASSIGN(Layer);
492 }; 495 };
493 496
494 } // namespace cc 497 } // namespace cc
495 498
496 #endif // CC_LAYERS_LAYER_H_ 499 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698