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

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

Issue 2741103005: Reland of duce copying of local data structures in GeometryMapper and PaintLayerClipper. (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 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // enclosingIntRect is applied in the last step of paint invalidation 120 // enclosingIntRect is applied in the last step of paint invalidation
121 // (see CompositedLayerMapping::setContentsNeedDisplayInRect()). 121 // (see CompositedLayerMapping::setContentsNeedDisplayInRect()).
122 if (!isSVGChild && 122 if (!isSVGChild &&
123 context.treeBuilderContext.current.transform != 123 context.treeBuilderContext.current.transform !=
124 containerContentsProperties->transform()) 124 containerContentsProperties->transform())
125 rect = Rect(enclosingIntRect(rect)); 125 rect = Rect(enclosingIntRect(rect));
126 126
127 PropertyTreeState currentTreeState( 127 PropertyTreeState currentTreeState(
128 context.treeBuilderContext.current.transform, 128 context.treeBuilderContext.current.transform,
129 context.treeBuilderContext.current.clip, nullptr); 129 context.treeBuilderContext.current.clip, nullptr);
130 result = LayoutRect( 130
131 geometryMapper 131 FloatRect floatRect(rect);
132 .sourceToDestinationVisualRect(FloatRect(rect), currentTreeState, 132 geometryMapper.sourceToDestinationVisualRect(
133 *containerContentsProperties) 133 currentTreeState, *containerContentsProperties, floatRect);
134 .rect()); 134 result = LayoutRect(floatRect);
135 } 135 }
136 136
137 // Convert the result to the container's contents space. 137 // Convert the result to the container's contents space.
138 result.moveBy(-context.paintInvalidationContainer->paintOffset()); 138 result.moveBy(-context.paintInvalidationContainer->paintOffset());
139 } 139 }
140 140
141 object.adjustVisualRectForRasterEffects(result); 141 object.adjustVisualRectForRasterEffects(result);
142 142
143 PaintLayer::mapRectInPaintInvalidationContainerToBacking( 143 PaintLayer::mapRectInPaintInvalidationContainerToBacking(
144 *context.paintInvalidationContainer, result); 144 *context.paintInvalidationContainer, result);
(...skipping 30 matching lines...) Expand all
175 175
176 LayoutPoint point; 176 LayoutPoint point;
177 if (object != context.paintInvalidationContainer) { 177 if (object != context.paintInvalidationContainer) {
178 point.moveBy(object.paintOffset()); 178 point.moveBy(object.paintOffset());
179 179
180 const auto* containerTransform = 180 const auto* containerTransform =
181 context.paintInvalidationContainer->paintProperties() 181 context.paintInvalidationContainer->paintProperties()
182 ->contentsProperties() 182 ->contentsProperties()
183 ->transform(); 183 ->transform();
184 if (context.treeBuilderContext.current.transform != containerTransform) { 184 if (context.treeBuilderContext.current.transform != containerTransform) {
185 point = LayoutPoint(m_geometryMapper 185 FloatRect rect = FloatRect(FloatPoint(point), FloatSize());
186 .sourceToDestinationRect( 186 m_geometryMapper.sourceToDestinationRect(
187 FloatRect(FloatPoint(point), FloatSize()), 187 context.treeBuilderContext.current.transform, containerTransform,
188 context.treeBuilderContext.current.transform, 188 rect);
189 containerTransform) 189 point = LayoutPoint(rect.location());
190 .location());
191 } 190 }
192 191
193 // Convert the result to the container's contents space. 192 // Convert the result to the container's contents space.
194 point.moveBy(-context.paintInvalidationContainer->paintOffset()); 193 point.moveBy(-context.paintInvalidationContainer->paintOffset());
195 } 194 }
196 195
197 if (context.paintInvalidationContainer->layer()->groupedMapping()) { 196 if (context.paintInvalidationContainer->layer()->groupedMapping()) {
198 FloatPoint floatPoint(point); 197 FloatPoint floatPoint(point);
199 PaintLayer::mapPointInPaintInvalidationContainerToBacking( 198 PaintLayer::mapPointInPaintInvalidationContainerToBacking(
200 *context.paintInvalidationContainer, floatPoint); 199 *context.paintInvalidationContainer, floatPoint);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 } 490 }
492 } 491 }
493 492
494 void PaintInvalidator::processPendingDelayedPaintInvalidations() { 493 void PaintInvalidator::processPendingDelayedPaintInvalidations() {
495 for (auto target : m_pendingDelayedPaintInvalidations) 494 for (auto target : m_pendingDelayedPaintInvalidations)
496 target->getMutableForPainting().setShouldDoFullPaintInvalidation( 495 target->getMutableForPainting().setShouldDoFullPaintInvalidation(
497 PaintInvalidationDelayedFull); 496 PaintInvalidationDelayedFull);
498 } 497 }
499 498
500 } // namespace blink 499 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ClipRect.h ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698