Chromium Code Reviews| 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)); |
| } |