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

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

Issue 2538273002: Use a create-or-update pattern for faster local border box property updates (Closed)
Patch Set: Created 4 years 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/ObjectPaintProperties.h ('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/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 1ba7d67924f3bbf8c97a2b8277f6702940aad4cc..240735ce105c2b28c2680ce9bd5549b19fb329e9 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -465,16 +465,10 @@ void PaintPropertyTreeBuilder::updateLocalBorderBoxContext(
if (auto* properties = object.getMutableForPainting().paintProperties())
properties->clearLocalBorderBoxProperties();
} else {
- std::unique_ptr<ObjectPaintProperties::PropertyTreeStateWithOffset>
- borderBoxContext =
- wrapUnique(new ObjectPaintProperties::PropertyTreeStateWithOffset(
- context.current.paintOffset,
- PropertyTreeState(context.current.transform,
- context.current.clip, context.currentEffect,
- context.current.scroll)));
- object.getMutableForPainting()
- .ensurePaintProperties()
- .setLocalBorderBoxProperties(std::move(borderBoxContext));
+ auto& properties = object.getMutableForPainting().ensurePaintProperties();
+ properties.updateLocalBorderBoxProperties(
+ context.current.paintOffset, context.current.transform,
+ context.current.clip, context.currentEffect, context.current.scroll);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPaintProperties.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698