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

Unified Diff: Source/core/platform/graphics/chromium/GraphicsLayerChromium.cpp

Issue 14407003: Disable solid background color optimization for composited layers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/platform/graphics/GraphicsLayer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/chromium/GraphicsLayerChromium.cpp
diff --git a/Source/core/platform/graphics/chromium/GraphicsLayerChromium.cpp b/Source/core/platform/graphics/chromium/GraphicsLayerChromium.cpp
index f3443110ee90085b950d650917c45e866c327951..a4d6715e110cd1c99d6fe2825df20bff14a93845 100644
--- a/Source/core/platform/graphics/chromium/GraphicsLayerChromium.cpp
+++ b/Source/core/platform/graphics/chromium/GraphicsLayerChromium.cpp
@@ -512,36 +512,6 @@ void GraphicsLayerChromium::setContentsToImage(Image* image)
void GraphicsLayerChromium::setContentsToSolidColor(const Color& color)
{
- if (color == m_contentsSolidColor)
- return;
-
- bool childrenChanged = false;
-
- m_contentsSolidColor = color;
-
- if (color.isValid() && color.alpha()) {
- if (!m_contentsSolidColorLayer) {
- m_contentsSolidColorLayer = adoptPtr(Platform::current()->compositorSupport()->createSolidColorLayer());
- registerContentsLayer(m_contentsSolidColorLayer->layer());
-
- setupContentsLayer(m_contentsSolidColorLayer->layer());
- childrenChanged = true;
- }
-
- m_contentsSolidColorLayer->setBackgroundColor(color.rgb());
- updateContentsRect();
- } else {
- if (m_contentsSolidColorLayer) {
- childrenChanged = true;
- unregisterContentsLayer(m_contentsSolidColorLayer->layer());
- m_contentsSolidColorLayer.clear();
- }
- m_contentsLayer = 0;
- }
-
- if (childrenChanged)
- updateChildList();
-
}
static HashSet<int>* s_registeredLayerSet;
« no previous file with comments | « Source/core/platform/graphics/GraphicsLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698