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

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: Fix build bot 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 b77cd9cdd5d85952380270c85d1ecfa4c9cc2b12..46051104a76cbe9cffd62579f2b9b357cf26c737 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; }
@@ -269,11 +269,6 @@ public:
void resetTrackedRepaints();
void addRepaintRect(const FloatRect&);
- static bool supportsBackgroundColorContent()
- {
- return false;
- }
-
void addLinkHighlight(LinkHighlightClient*);
void removeLinkHighlight(LinkHighlightClient*);
// Exposed for tests
@@ -384,6 +379,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