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

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

Issue 2793993003: 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 3cc8cc1208933e5c5ff79ece7e85c47243cfdc71..89add92dc4b0dde1b80df08a8269c000111e3e65 100644
--- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
@@ -11,14 +11,15 @@
#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(GeometryMapper& geometryMapper)
+ PrePaintTreeWalkContext()
: treeBuilderContext(
WTF::wrapUnique(new PaintPropertyTreeBuilderContext)),
- paintInvalidatorContext(*treeBuilderContext, geometryMapper),
+ paintInvalidatorContext(*treeBuilderContext),
ancestorOverflowPaintLayer(nullptr),
ancestorTransformedOrRootPaintLayer(nullptr) {}
PrePaintTreeWalkContext(const PrePaintTreeWalkContext& parentContext)
@@ -48,15 +49,15 @@ void PrePaintTreeWalk::walk(FrameView& rootFrame) {
DCHECK(rootFrame.frame().document()->lifecycle().state() ==
DocumentLifecycle::InPrePaint);
- PrePaintTreeWalkContext initialContext(m_geometryMapper);
+ PrePaintTreeWalkContext initialContext;
initialContext.ancestorTransformedOrRootPaintLayer =
rootFrame.layoutView()->layer();
- // GeometryMapper depends on paint properties.
+ // GeometryMapper caches depend on paint properties.
if (rootFrame.needsPaintPropertyUpdate() ||
(rootFrame.layoutView() &&
!shouldEndWalkBefore(*rootFrame.layoutView(), initialContext)))
- m_geometryMapper.clearCache();
+ GeometryMapper::clearCache();
walk(rootFrame, initialContext);
m_paintInvalidator.processPendingDelayedPaintInvalidations();
@@ -137,7 +138,7 @@ void PrePaintTreeWalk::computeClipRectForContext(
PropertyTreeState localState(context.transform, context.clip, effect);
clipRect =
- m_geometryMapper.sourceToDestinationClipRect(localState, ancestorState);
+ GeometryMapper::sourceToDestinationClipRect(localState, ancestorState);
clipRect.moveBy(-FloatPoint(ancestorPaintOffset));
}

Powered by Google App Engine
This is Rietveld 408576698