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

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2890953002: [SPv1] Always set a CompositorElementId on main graphics layers; use PaintLayer id. (Closed)
Patch Set: none Created 3 years, 7 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/core/paint/PaintPropertyTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
index e61d98d7d9afa174a98d946ae9132cedf2e53e79..530d136ab38b54e2e1309b9982452db0bf49efe6 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -74,10 +74,11 @@ static bool UpdateContentClip(
static CompositorElementId CreateDomNodeBasedCompositorElementId(
wkorman 2017/05/18 00:45:58 Suggest rename to CreatePaintLayerBasedCompositorE
chrishtr 2017/05/18 01:25:47 Done.
const LayoutObject& object) {
+ DCHECK(object.IsBoxModelObject() && object.HasLayer());
// TODO(wkorman): Centralize this implementation with similar across
wkorman 2017/05/18 00:45:58 Maybe we can remove this now. It's not looking to
chrishtr 2017/05/18 01:25:47 Done.
// animation, scrolling and compositing logic.
- return CompositorElementIdFromDOMNodeId(
- DOMNodeIds::IdForNode(object.GetNode()),
+ return CompositorElementIdFromPaintLayerId(
+ ToLayoutBoxModelObject(object).Layer()->UniqueId(),
CompositorElementIdNamespace::kPrimary);
}
@@ -1195,7 +1196,7 @@ void PaintPropertyTreeBuilder::UpdatePaintProperties(
if (needs_paint_properties && !had_paint_properties) {
ObjectPaintProperties& paint_properties =
object.GetMutableForPainting().EnsurePaintProperties();
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && object.HasLayer()) {
wkorman 2017/05/18 00:45:58 This means we will stop setting compositor element
chrishtr 2017/05/18 01:25:47 No, because transforms and effects all induce Pain
paint_properties.SetCompositorElementId(
CreateDomNodeBasedCompositorElementId(object));
}

Powered by Google App Engine
This is Rietveld 408576698