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

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

Issue 2495973002: [SPv2] Add filter support in PaintArtifactCompositor (Closed)
Patch Set: rebase Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7077820e02f7667c3815cbe386cea5bac67bd647..3542db9f82d5454f7d6cefb80898514bb72e5b52 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -724,20 +724,12 @@ void PropertyTreeManager::buildEffectNodesRecursively(
scoped_refptr<cc::Layer> dummyLayer = nextEffect->ensureDummyLayer();
m_rootLayer->AddChild(dummyLayer);
- // Also cc assumes a clip node is always created by a layer that creates
- // render surface.
- cc::ClipNode& dummyClip =
- *clipTree().Node(clipTree().Insert(cc::ClipNode(), kSecondaryRootNodeId));
- dummyClip.owner_id = dummyLayer->id();
- dummyClip.transform_id = kRealRootNodeId;
- dummyClip.target_transform_id = kRealRootNodeId;
- dummyClip.target_effect_id = kSecondaryRootNodeId;
- m_propertyTrees.clip_id_to_index_map[dummyClip.owner_id] = dummyClip.id;
+ int outputClipId = compositorIdForClipNode(nextEffect->outputClip());
cc::EffectNode& effectNode = *effectTree().Node(effectTree().Insert(
cc::EffectNode(), compositorIdForCurrentEffectNode()));
effectNode.owner_id = dummyLayer->id();
- effectNode.clip_id = dummyClip.id;
+ effectNode.clip_id = outputClipId;
// Every effect is supposed to have render surface enabled for grouping,
// but we can get away without one if the effect is opacity-only and has only
// one compositing child. This is both for optimization and not introducing
@@ -747,13 +739,16 @@ void PropertyTreeManager::buildEffectNodesRecursively(
// TODO(crbug.com/504464): There is ongoing work in cc to delay render surface
// decision until later phase of the pipeline. Remove premature optimization
// here once the work is ready.
+ if (!nextEffect->filter().isEmpty())
+ effectNode.has_render_surface = true;
effectNode.opacity = nextEffect->opacity();
+ effectNode.filters = nextEffect->filter().asCcFilterOperations();
m_propertyTrees.effect_id_to_index_map[effectNode.owner_id] = effectNode.id;
m_effectStack.append(BlinkEffectAndCcIdPair{nextEffect, effectNode.id});
dummyLayer->set_property_tree_sequence_number(kPropertyTreeSequenceNumber);
dummyLayer->SetTransformTreeIndex(kSecondaryRootNodeId);
- dummyLayer->SetClipTreeIndex(dummyClip.id);
+ dummyLayer->SetClipTreeIndex(outputClipId);
dummyLayer->SetEffectTreeIndex(effectNode.id);
dummyLayer->SetScrollTreeIndex(kRealRootNodeId);
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698