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

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp

Issue 2657863004: Move scroll paint property nodes to be owned by the transform tree (Closed)
Patch Set: Rebase & remove parens Created 3 years, 11 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: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
index 5effe8e3bc4c972bf60e5caa2745e92b312aa88a..d5df483ed1f9c958fec42f2826be75a8333516c3 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -595,9 +595,9 @@ bool PaintArtifactCompositor::mightOverlap(
const PaintChunk& paintChunk,
const PendingLayer& candidatePendingLayer,
GeometryMapper& geometryMapper) {
- PropertyTreeState rootPropertyTreeState(
- TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(),
- EffectPaintPropertyNode::root(), ScrollPaintPropertyNode::root());
+ PropertyTreeState rootPropertyTreeState(TransformPaintPropertyNode::root(),
+ ClipPaintPropertyNode::root(),
+ EffectPaintPropertyNode::root());
FloatRect paintChunkScreenVisualRect =
geometryMapper.localToAncestorVisualRect(
@@ -706,10 +706,9 @@ void PaintArtifactCompositor::update(
paintArtifact, pendingLayer, layerOffset, newContentLayerClients,
rasterChunkInvalidations, storeDebugInfo, geometryMapper);
- int transformId = propertyTreeManager.ensureCompositorTransformNode(
- pendingLayer.propertyTreeState.transform());
- int scrollId = propertyTreeManager.ensureCompositorScrollNode(
- pendingLayer.propertyTreeState.scroll());
+ const auto* transform = pendingLayer.propertyTreeState.transform();
+ int transformId =
+ propertyTreeManager.ensureCompositorTransformNode(transform);
int clipId = propertyTreeManager.ensureCompositorClipNode(
pendingLayer.propertyTreeState.clip());
int effectId = propertyTreeManager.switchToEffectNode(
@@ -724,7 +723,10 @@ void PaintArtifactCompositor::update(
layer->SetTransformTreeIndex(transformId);
layer->SetClipTreeIndex(clipId);
layer->SetEffectTreeIndex(effectId);
- layer->SetScrollTreeIndex(scrollId);
+ if (const auto* scrollNode = transform->scrollNode()) {
+ layer->SetScrollTreeIndex(
+ propertyTreeManager.ensureCompositorScrollNode(scrollNode));
+ }
layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden);

Powered by Google App Engine
This is Rietveld 408576698