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

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

Issue 2630783002: Remove |success| parameter from GeometryMapper's public methods (Closed)
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 ->contentsProperties(); 106 ->contentsProperties();
107 if (context.treeBuilderContext.current.transform == 107 if (context.treeBuilderContext.current.transform ==
108 containerContentsProperties->transform() && 108 containerContentsProperties->transform() &&
109 context.treeBuilderContext.current.clip == 109 context.treeBuilderContext.current.clip ==
110 containerContentsProperties->clip()) { 110 containerContentsProperties->clip()) {
111 result = LayoutRect(rect); 111 result = LayoutRect(rect);
112 } else { 112 } else {
113 PropertyTreeState currentTreeState( 113 PropertyTreeState currentTreeState(
114 context.treeBuilderContext.current.transform, 114 context.treeBuilderContext.current.transform,
115 context.treeBuilderContext.current.clip, nullptr, nullptr); 115 context.treeBuilderContext.current.clip, nullptr, nullptr);
116 bool success = false;
117 result = LayoutRect(geometryMapper.sourceToDestinationVisualRect( 116 result = LayoutRect(geometryMapper.sourceToDestinationVisualRect(
118 rect, currentTreeState, *containerContentsProperties, success)); 117 rect, currentTreeState, *containerContentsProperties));
119 DCHECK(success);
120 } 118 }
121 119
122 // Convert the result to the container's contents space. 120 // Convert the result to the container's contents space.
123 result.moveBy(-context.paintInvalidationContainer->paintOffset()); 121 result.moveBy(-context.paintInvalidationContainer->paintOffset());
124 } 122 }
125 123
126 object.adjustVisualRectForRasterEffects(result); 124 object.adjustVisualRectForRasterEffects(result);
127 125
128 PaintLayer::mapRectInPaintInvalidationContainerToBacking( 126 PaintLayer::mapRectInPaintInvalidationContainerToBacking(
129 *context.paintInvalidationContainer, result); 127 *context.paintInvalidationContainer, result);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 167
170 LayoutPoint point; 168 LayoutPoint point;
171 if (object != context.paintInvalidationContainer) { 169 if (object != context.paintInvalidationContainer) {
172 point.moveBy(object.paintOffset()); 170 point.moveBy(object.paintOffset());
173 171
174 const auto* containerTransform = 172 const auto* containerTransform =
175 context.paintInvalidationContainer->paintProperties() 173 context.paintInvalidationContainer->paintProperties()
176 ->contentsProperties() 174 ->contentsProperties()
177 ->transform(); 175 ->transform();
178 if (context.treeBuilderContext.current.transform != containerTransform) { 176 if (context.treeBuilderContext.current.transform != containerTransform) {
179 bool success = false;
180 point = LayoutPoint(m_geometryMapper 177 point = LayoutPoint(m_geometryMapper
181 .sourceToDestinationRect( 178 .sourceToDestinationRect(
182 FloatRect(FloatPoint(point), FloatSize()), 179 FloatRect(FloatPoint(point), FloatSize()),
183 context.treeBuilderContext.current.transform, 180 context.treeBuilderContext.current.transform,
184 containerTransform, success) 181 containerTransform)
185 .location()); 182 .location());
186 DCHECK(success);
187 } 183 }
188 184
189 // Convert the result to the container's contents space. 185 // Convert the result to the container's contents space.
190 point.moveBy(-context.paintInvalidationContainer->paintOffset()); 186 point.moveBy(-context.paintInvalidationContainer->paintOffset());
191 } 187 }
192 188
193 if (context.paintInvalidationContainer->layer()->groupedMapping()) { 189 if (context.paintInvalidationContainer->layer()->groupedMapping()) {
194 FloatPoint floatPoint(point); 190 FloatPoint floatPoint(point);
195 PaintLayer::mapPointInPaintInvalidationContainerToBacking( 191 PaintLayer::mapPointInPaintInvalidationContainerToBacking(
196 *context.paintInvalidationContainer, floatPoint); 192 *context.paintInvalidationContainer, floatPoint);
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; 452 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate;
457 } 453 }
458 454
459 void PaintInvalidator::processPendingDelayedPaintInvalidations() { 455 void PaintInvalidator::processPendingDelayedPaintInvalidations() {
460 for (auto target : m_pendingDelayedPaintInvalidations) 456 for (auto target : m_pendingDelayedPaintInvalidations)
461 target->getMutableForPainting().setShouldDoFullPaintInvalidation( 457 target->getMutableForPainting().setShouldDoFullPaintInvalidation(
462 PaintInvalidationDelayedFull); 458 PaintInvalidationDelayedFull);
463 } 459 }
464 460
465 } // namespace blink 461 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698