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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp

Issue 2671853003: [SPInvalidation] Use GeometryMapper in PaintLayerClipper for paint. (Closed)
Patch Set: none Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintInvalidator.h" 5 #include "core/paint/PaintInvalidator.h"
6 6
7 #include "core/editing/FrameSelection.h" 7 #include "core/editing/FrameSelection.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 PaintLayer::mapRectInPaintInvalidationContainerToBacking( 133 PaintLayer::mapRectInPaintInvalidationContainerToBacking(
134 *context.paintInvalidationContainer, result); 134 *context.paintInvalidationContainer, result);
135 135
136 return result; 136 return result;
137 } 137 }
138 138
139 void PaintInvalidatorContext::mapLocalRectToPaintInvalidationBacking( 139 void PaintInvalidatorContext::mapLocalRectToPaintInvalidationBacking(
140 const LayoutObject& object, 140 const LayoutObject& object,
141 LayoutRect& rect) const { 141 LayoutRect& rect) const {
142 GeometryMapper geometryMapper; 142 std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
143 rect = blink::mapLocalRectToPaintInvalidationBacking<LayoutRect, LayoutPoint>( 143 rect = blink::mapLocalRectToPaintInvalidationBacking<LayoutRect, LayoutPoint>(
144 object, rect, *this, geometryMapper); 144 object, rect, *this, *geometryMapper);
145 } 145 }
146 146
147 LayoutRect PaintInvalidator::computeVisualRectInBacking( 147 LayoutRect PaintInvalidator::computeVisualRectInBacking(
148 const LayoutObject& object, 148 const LayoutObject& object,
149 const PaintInvalidatorContext& context) { 149 const PaintInvalidatorContext& context) {
150 if (object.isSVGChild()) { 150 if (object.isSVGChild()) {
151 FloatRect localRect = SVGLayoutSupport::localVisualRect(object); 151 FloatRect localRect = SVGLayoutSupport::localVisualRect(object);
152 return mapLocalRectToPaintInvalidationBacking<FloatRect, FloatPoint>( 152 return mapLocalRectToPaintInvalidationBacking<FloatRect, FloatPoint>(
153 object, localRect, context, m_geometryMapper); 153 object, localRect, context, m_geometryMapper);
154 } 154 }
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; 446 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate;
447 } 447 }
448 448
449 void PaintInvalidator::processPendingDelayedPaintInvalidations() { 449 void PaintInvalidator::processPendingDelayedPaintInvalidations() {
450 for (auto target : m_pendingDelayedPaintInvalidations) 450 for (auto target : m_pendingDelayedPaintInvalidations)
451 target->getMutableForPainting().setShouldDoFullPaintInvalidation( 451 target->getMutableForPainting().setShouldDoFullPaintInvalidation(
452 PaintInvalidationDelayedFull); 452 PaintInvalidationDelayedFull);
453 } 453 }
454 454
455 } // namespace blink 455 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698