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

Unified Diff: Source/platform/graphics/GraphicsLayer.cpp

Issue 183103007: Implement will-change-based GPU rasterization hint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move hint from WebLayer to WebContentLayer Created 6 years, 9 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/platform/graphics/GraphicsLayer.h ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index a6410402f30b9cfd1538208f917dec9eb3e2d8f0..310f49aa6fdae87b1f5245f47aba0d33c7c9498d 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -89,6 +89,7 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
, m_drawsContent(false)
, m_contentsVisible(true)
, m_isRootForIsolatedGroup(false)
+ , m_hasGpuRasterizationHint(false)
, m_hasScrollParent(false)
, m_hasClipParent(false)
, m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip)
@@ -607,6 +608,11 @@ void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeFlags fl
ts << "(contentsVisible " << m_contentsVisible << ")\n";
}
+ if (m_hasGpuRasterizationHint) {
+ writeIndent(ts, indent + 1);
+ ts << "(hasGpuRasterizationHint " << m_hasGpuRasterizationHint << ")\n";
+ }
+
if (!m_backfaceVisibility) {
writeIndent(ts, indent + 1);
ts << "(backfaceVisibility " << (m_backfaceVisibility ? "visible" : "hidden") << ")\n";
@@ -946,6 +952,12 @@ void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated)
platformLayer()->setIsRootForIsolatedGroup(isolated);
}
+void GraphicsLayer::setHasGpuRasterizationHint(bool hasHint)
+{
+ m_hasGpuRasterizationHint = hasHint;
+ m_layer->setHasGpuRasterizationHint(hasHint);
+}
+
void GraphicsLayer::setContentsNeedsDisplay()
{
if (WebLayer* contentsLayer = contentsLayerIfRegistered()) {
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.h ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698