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

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

Issue 2798513002: Revert of Make GeometryMapper fully static (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
Index: third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
index 89add92dc4b0dde1b80df08a8269c000111e3e65..3cc8cc1208933e5c5ff79ece7e85c47243cfdc71 100644
--- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
@@ -11,15 +11,14 @@
#include "core/layout/LayoutPart.h"
#include "core/layout/LayoutView.h"
#include "core/paint/PaintLayer.h"
-#include "platform/graphics/paint/GeometryMapper.h"
namespace blink {
struct PrePaintTreeWalkContext {
- PrePaintTreeWalkContext()
+ PrePaintTreeWalkContext(GeometryMapper& geometryMapper)
: treeBuilderContext(
WTF::wrapUnique(new PaintPropertyTreeBuilderContext)),
- paintInvalidatorContext(*treeBuilderContext),
+ paintInvalidatorContext(*treeBuilderContext, geometryMapper),
ancestorOverflowPaintLayer(nullptr),
ancestorTransformedOrRootPaintLayer(nullptr) {}
PrePaintTreeWalkContext(const PrePaintTreeWalkContext& parentContext)
@@ -49,15 +48,15 @@
DCHECK(rootFrame.frame().document()->lifecycle().state() ==
DocumentLifecycle::InPrePaint);
- PrePaintTreeWalkContext initialContext;
+ PrePaintTreeWalkContext initialContext(m_geometryMapper);
initialContext.ancestorTransformedOrRootPaintLayer =
rootFrame.layoutView()->layer();
- // GeometryMapper caches depend on paint properties.
+ // GeometryMapper depends on paint properties.
if (rootFrame.needsPaintPropertyUpdate() ||
(rootFrame.layoutView() &&
!shouldEndWalkBefore(*rootFrame.layoutView(), initialContext)))
- GeometryMapper::clearCache();
+ m_geometryMapper.clearCache();
walk(rootFrame, initialContext);
m_paintInvalidator.processPendingDelayedPaintInvalidations();
@@ -138,7 +137,7 @@
PropertyTreeState localState(context.transform, context.clip, effect);
clipRect =
- GeometryMapper::sourceToDestinationClipRect(localState, ancestorState);
+ m_geometryMapper.sourceToDestinationClipRect(localState, ancestorState);
clipRect.moveBy(-FloatPoint(ancestorPaintOffset));
}

Powered by Google App Engine
This is Rietveld 408576698