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

Unified Diff: cc/solid_color_layer.cc

Issue 11360145: cc: The SolidColorLayer should report contentsOpaque() true when its color is opaque (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/solid_color_layer.h ('k') | cc/solid_color_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/solid_color_layer.cc
diff --git a/cc/solid_color_layer.cc b/cc/solid_color_layer.cc
index 8f716cf3854ff46989cad7a232b48cb64283923d..7bfbcb23ad2d80401621f77c7e5b429867c707d6 100644
--- a/cc/solid_color_layer.cc
+++ b/cc/solid_color_layer.cc
@@ -29,4 +29,10 @@ SolidColorLayer::~SolidColorLayer()
{
}
+void SolidColorLayer::setBackgroundColor(SkColor color)
+{
+ setContentsOpaque(SkColorGetA(color) == 255);
+ Layer::setBackgroundColor(color);
+}
+
} // namespace cc
« no previous file with comments | « cc/solid_color_layer.h ('k') | cc/solid_color_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698