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

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

Issue 2802443002: Compute rounded-ness of visual rects (Closed)
Patch Set: none Created 3 years, 8 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 && context.m_treeBuilderContext.current.transform != 122 if (!isSVGChild && context.m_treeBuilderContext.current.transform !=
123 containerContentsProperties->transform()) 123 containerContentsProperties->transform())
124 rect = Rect(enclosingIntRect(rect)); 124 rect = Rect(enclosingIntRect(rect));
125 125
126 PropertyTreeState currentTreeState( 126 PropertyTreeState currentTreeState(
127 context.m_treeBuilderContext.current.transform, 127 context.m_treeBuilderContext.current.transform,
128 context.m_treeBuilderContext.current.clip, nullptr); 128 context.m_treeBuilderContext.current.clip, nullptr);
129 129
130 FloatRect floatRect(rect); 130 FloatClipRect floatRect((FloatRect(rect)));
131 GeometryMapper::sourceToDestinationVisualRect( 131 GeometryMapper::sourceToDestinationVisualRect(
132 currentTreeState, *containerContentsProperties, floatRect); 132 currentTreeState, *containerContentsProperties, floatRect);
133 result = LayoutRect(floatRect); 133 result = LayoutRect(floatRect.rect());
134 } 134 }
135 135
136 // Convert the result to the container's contents space. 136 // Convert the result to the container's contents space.
137 result.moveBy(-context.paintInvalidationContainer->paintOffset()); 137 result.moveBy(-context.paintInvalidationContainer->paintOffset());
138 } 138 }
139 139
140 object.adjustVisualRectForRasterEffects(result); 140 object.adjustVisualRectForRasterEffects(result);
141 141
142 PaintLayer::mapRectInPaintInvalidationContainerToBacking( 142 PaintLayer::mapRectInPaintInvalidationContainerToBacking(
143 *context.paintInvalidationContainer, result); 143 *context.paintInvalidationContainer, result);
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 } 494 }
495 } 495 }
496 496
497 void PaintInvalidator::processPendingDelayedPaintInvalidations() { 497 void PaintInvalidator::processPendingDelayedPaintInvalidations() {
498 for (auto target : m_pendingDelayedPaintInvalidations) 498 for (auto target : m_pendingDelayedPaintInvalidations)
499 target->getMutableForPainting().setShouldDoFullPaintInvalidation( 499 target->getMutableForPainting().setShouldDoFullPaintInvalidation(
500 PaintInvalidationDelayedFull); 500 PaintInvalidationDelayedFull);
501 } 501 }
502 502
503 } // namespace blink 503 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698