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

Unified Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp

Issue 2763833003: Optimize PaintInvalidatorContext::mapLocalRectToVisualRectInBacking() (Closed)
Patch Set: Created 3 years, 9 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 | third_party/WebKit/Source/core/paint/PaintInvalidator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
index 086b5b51fe0577a335892660e0d1b486135072ab..47b3f02008f846ef7a28f711d2cb40dd94451e7a 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
@@ -17,6 +17,7 @@
#include "core/paint/PaintInvalidator.h"
#include "core/paint/PaintLayer.h"
#include "core/paint/PaintPropertyTreeBuilder.h"
+#include "platform/graphics/paint/GeometryMapper.h"
namespace blink {
@@ -634,9 +635,15 @@ static const PaintPropertyTreeBuilderContext& dummyTreeBuilderContext() {
return dummyContext;
}
+static GeometryMapper& dummyGeometryMapper() {
chrishtr 2017/03/22 17:54:31 Is it somehow guaranteed that this GeometryMapper
Xianzhu 2017/03/22 18:50:02 Yes because the adapter's mapLocalRectToVisualRect
Xianzhu 2017/03/22 18:50:48 On 2017/03/22 18:50:02, Xianzhu wrote: > On 2017/0
chrishtr 2017/03/22 18:56:21 Ok, please add a comment saying that it's guarante
Xianzhu 2017/03/22 19:20:43 Done.
+ DEFINE_STATIC_LOCAL(std::unique_ptr<GeometryMapper>, dummyMapper,
+ (GeometryMapper::create()));
wkorman 2017/03/22 18:33:40 We saw pdr@ recently make a perf improvement by ad
Xianzhu 2017/03/22 18:51:38 I think it's not worth it.
+ return *dummyMapper;
+}
+
PaintInvalidatorContextAdapter::PaintInvalidatorContextAdapter(
const PaintInvalidationState& paintInvalidationState)
- : PaintInvalidatorContext(dummyTreeBuilderContext()),
+ : PaintInvalidatorContext(dummyTreeBuilderContext(), dummyGeometryMapper()),
m_paintInvalidationState(paintInvalidationState) {
forcedSubtreeInvalidationFlags =
paintInvalidationState.m_forcedSubtreeInvalidationFlags;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintInvalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698