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

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..d688bf95caec1dbc448e81eb9551f933ce6df32b 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,17 @@ static const PaintPropertyTreeBuilderContext& dummyTreeBuilderContext() {
return dummyContext;
}
+static GeometryMapper& dummyGeometryMapper() {
+ DEFINE_STATIC_LOCAL(std::unique_ptr<GeometryMapper>, dummyMapper,
+ (GeometryMapper::create()));
+ return *dummyMapper;
+}
+
PaintInvalidatorContextAdapter::PaintInvalidatorContextAdapter(
const PaintInvalidationState& paintInvalidationState)
- : PaintInvalidatorContext(dummyTreeBuilderContext()),
+ // The dummy parameters will be never used because the overriding
+ // mapLocalRectToVisualRectInBacking() uses PaintInvalidationState.
+ : 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