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

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

Issue 2653433002: Share GeometryMapper cache between pre-paint and compositing. (Closed)
Patch Set: none Created 3 years, 11 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/PaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
index dc256f86bc459a90c1cb4fa77ffc1e3c30e002b0..8c03bf0b40723c038aa57e0855363408a36e1509 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -48,10 +48,10 @@ static LayoutRect slowMapToVisualRectInAncestorSpace(
// which affect performance.
template <typename Rect, typename Point>
static LayoutRect mapLocalRectToPaintInvalidationBacking(
- GeometryMapper& geometryMapper,
const LayoutObject& object,
const Rect& localRect,
- const PaintInvalidatorContext& context) {
+ const PaintInvalidatorContext& context,
+ GeometryMapper& geometryMapper) {
bool isSVGChild = object.isSVGChild();
// TODO(wkorman): The flip below is required because visual rects are
@@ -138,7 +138,7 @@ void PaintInvalidatorContext::mapLocalRectToPaintInvalidationBacking(
LayoutRect& rect) const {
GeometryMapper geometryMapper;
rect = blink::mapLocalRectToPaintInvalidationBacking<LayoutRect, LayoutPoint>(
- geometryMapper, object, rect, *this);
+ object, rect, *this, geometryMapper);
}
LayoutRect PaintInvalidator::computeVisualRectInBacking(
@@ -147,10 +147,10 @@ LayoutRect PaintInvalidator::computeVisualRectInBacking(
if (object.isSVGChild()) {
FloatRect localRect = SVGLayoutSupport::localVisualRect(object);
return mapLocalRectToPaintInvalidationBacking<FloatRect, FloatPoint>(
- m_geometryMapper, object, localRect, context);
+ object, localRect, context, m_geometryMapper);
}
return mapLocalRectToPaintInvalidationBacking<LayoutRect, LayoutPoint>(
- m_geometryMapper, object, object.localVisualRect(), context);
+ object, object.localVisualRect(), context, m_geometryMapper);
}
LayoutPoint PaintInvalidator::computeLocationInBacking(
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.h ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698