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

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

Issue 2880423002: Don't clear or allocate paint properties if they won't change. (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
« no previous file with comments | « no previous file | 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 42d0cb93ce21beee0ffb1afea870788548b22afd..52c0126d2e5eb8ff17f389565e35e7d42199dd6f 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -1192,18 +1192,16 @@ void PaintPropertyTreeBuilder::UpdatePaintProperties(
bool had_paint_properties = object.PaintProperties();
- if (needs_paint_properties) {
+ if (needs_paint_properties && !had_paint_properties) {
ObjectPaintProperties& paint_properties =
object.GetMutableForPainting().EnsurePaintProperties();
- if (!had_paint_properties &&
- RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
paint_properties.SetCompositorElementId(
CreateDomNodeBasedCompositorElementId(object));
pdr. 2017/05/15 19:52:19 I think avoiding ClearPaintProperties is a nice cl
}
- } else {
+ } else if (!needs_paint_properties && had_paint_properties) {
object.GetMutableForPainting().ClearPaintProperties();
- if (had_paint_properties)
- full_context.force_subtree_update = true;
+ full_context.force_subtree_update = true;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698