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

Unified Diff: Source/core/rendering/compositing/CompositedLayerMapping.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
Index: Source/core/rendering/compositing/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
index 61400f073658a38f28ee5777bf143b0b5ad1ec8d..9cd437e9389614bf28805c5f3da160eabf37e9b6 100644
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
@@ -216,6 +216,7 @@ void CompositedLayerMapping::createPrimaryGraphicsLayer()
updateOpacity(renderer()->style());
updateTransform(renderer()->style());
updateFilters(renderer()->style());
+ updateHasGpuRasterizationHint(renderer()->style());
if (RuntimeEnabledFeatures::cssCompositingEnabled()) {
updateLayerBlendMode(renderer()->style());
@@ -293,6 +294,11 @@ void CompositedLayerMapping::updateIsRootForIsolatedGroup()
m_graphicsLayer->setIsRootForIsolatedGroup(isolate);
}
+void CompositedLayerMapping::updateHasGpuRasterizationHint(const RenderStyle* style)
+{
+ m_graphicsLayer->setHasGpuRasterizationHint(style->hasWillChangeGpuRasterizationHint());
+}
+
void CompositedLayerMapping::updateContentsOpaque()
{
// For non-root layers, background is always painted by the primary graphics layer.
@@ -852,6 +858,7 @@ GraphicsLayerUpdater::UpdateType CompositedLayerMapping::updateGraphicsLayerGeom
updateIsRootForIsolatedGroup();
}
+ updateHasGpuRasterizationHint(renderer()->style());
updateContentsRect();
updateBackgroundColor();
updateDrawsContent();

Powered by Google App Engine
This is Rietveld 408576698