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 2823cc71fc0a171897078a01fb939785dc88bc5e..4f6df8dd6bd5026f80d688a498fdfd81b5793594 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| @@ -162,17 +162,10 @@ void PaintPropertyTreeBuilder::updateCssClip(const LayoutObject& object, PaintPr |
| void PaintPropertyTreeBuilder::updateLocalBorderBoxContext(const LayoutObject& object, const PaintPropertyTreeBuilderContext& context) |
| { |
| - // Note: Currently only layer painter makes use of the pre-computed context. |
| - // This condition may be loosened with no adverse effects beside memory use. |
| - if (!object.hasLayer()) |
| - return; |
| - |
| std::unique_ptr<ObjectPaintProperties::LocalBorderBoxProperties> borderBoxContext = |
| wrapUnique(new ObjectPaintProperties::LocalBorderBoxProperties); |
| borderBoxContext->paintOffset = context.paintOffset; |
| - borderBoxContext->transform = context.currentTransform; |
| - borderBoxContext->clip = context.currentClip; |
| - borderBoxContext->effect = context.currentEffect; |
| + borderBoxContext->propertyTreeState = PropertyTreeState(context.currentTransform, context.currentClip, context.currentEffect); |
| object.getMutableForPainting().ensureObjectPaintProperties().setLocalBorderBoxProperties(std::move(borderBoxContext)); |
| } |
| @@ -384,11 +377,11 @@ static void deriveBorderBoxFromContainerContext(const LayoutObject& object, Pain |
| void PaintPropertyTreeBuilder::buildTreeNodes(const LayoutObject& object, PaintPropertyTreeBuilderContext& context) |
| { |
| + object.getMutableForPainting().clearObjectPaintProperties(); |
|
chrishtr
2016/06/30 16:49:55
Now allocating an ObjectPaintProperties object for
pdr.
2016/06/30 21:21:50
To enforce this and ensure we don't create too man
chrishtr
2016/07/01 17:52:24
Done (in updateLocalBorderBoxContext)
|
| + |
| if (!object.isBoxModelObject() && !object.isSVG()) |
| return; |
| - object.getMutableForPainting().clearObjectPaintProperties(); |
| - |
| deriveBorderBoxFromContainerContext(object, context); |
| updatePaintOffsetTranslation(object, context); |