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

Unified Diff: Source/core/platform/graphics/GraphicsLayer.h

Issue 63943006: Re-enable solid background color optimization for composited layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add window.internals.forceCompositingUpdate(document) to webgl test to avoid flaky Created 7 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
Index: Source/core/platform/graphics/GraphicsLayer.h
diff --git a/Source/core/platform/graphics/GraphicsLayer.h b/Source/core/platform/graphics/GraphicsLayer.h
index ed85b1768393944eb13cfb17102694f85a5a2221..582cd5667f8a1d94259ad437e07e7fba6e01c15e 100644
--- a/Source/core/platform/graphics/GraphicsLayer.h
+++ b/Source/core/platform/graphics/GraphicsLayer.h
@@ -226,7 +226,7 @@ public:
void setContentsToNinePatch(Image*, const IntRect& aperture);
bool shouldDirectlyCompositeImage(Image*) const { return true; }
// Pass an invalid color to remove the contents layer.
- void setContentsToSolidColor(const Color&) { }
+ void setContentsToSolidColor(const Color&);
void setContentsToPlatformLayer(blink::WebLayer* layer) { setContentsTo(layer); }
bool hasContentsLayer() const { return m_contentsLayer; }
@@ -271,11 +271,6 @@ public:
void collectTrackedRepaintRects(Vector<FloatRect>&) const;
- static bool supportsBackgroundColorContent()
- {
- return false;
- }
-
void addLinkHighlight(LinkHighlightClient*);
void removeLinkHighlight(LinkHighlightClient*);
// Exposed for tests
@@ -386,6 +381,8 @@ private:
OwnPtr<blink::WebContentLayer> m_layer;
OwnPtr<blink::WebImageLayer> m_imageLayer;
OwnPtr<blink::WebNinePatchLayer> m_ninePatchLayer;
+ Color m_contentsSolidColor;
+ OwnPtr<blink::WebSolidColorLayer> m_solidColorLayer;
blink::WebLayer* m_contentsLayer;
// We don't have ownership of m_contentsLayer, but we do want to know if a given layer is the
// same as our current layer in setContentsTo(). Since m_contentsLayer may be deleted at this point,

Powered by Google App Engine
This is Rietveld 408576698