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

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

Issue 2761863002: Add StyleDifference::needsVisualRectUpdate (Closed)
Patch Set: Still keep visibility change detection for full paint invalidation. Will optimize in later CLs 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/BoxPaintInvalidator.h" 5 #include "core/paint/BoxPaintInvalidator.h"
6 6
7 #include "core/frame/Settings.h" 7 #include "core/frame/Settings.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "core/layout/compositing/CompositedLayerMapping.h" 9 #include "core/layout/compositing/CompositedLayerMapping.h"
10 #include "core/paint/ObjectPaintInvalidator.h" 10 #include "core/paint/ObjectPaintInvalidator.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 LayoutRect(m_context.oldLocation, oldBorderBoxSize) || 118 LayoutRect(m_context.oldLocation, oldBorderBoxSize) ||
119 m_box.visualRect() != 119 m_box.visualRect() !=
120 LayoutRect(m_context.newLocation, newBorderBoxSize)) { 120 LayoutRect(m_context.newLocation, newBorderBoxSize)) {
121 return borderBoxChanged ? PaintInvalidationBorderBoxChange 121 return borderBoxChanged ? PaintInvalidationBorderBoxChange
122 : PaintInvalidationBoundsChange; 122 : PaintInvalidationBoundsChange;
123 } 123 }
124 124
125 DCHECK(borderBoxChanged); 125 DCHECK(borderBoxChanged);
126 126
127 if (style.hasVisualOverflowingEffect() || style.hasAppearance() || 127 if (style.hasVisualOverflowingEffect() || style.hasAppearance() ||
128 style.hasFilterInducingProperty() || style.resize() != RESIZE_NONE || 128 style.hasFilterInducingProperty() || style.hasMask())
129 style.hasMask())
130 return PaintInvalidationBorderBoxChange; 129 return PaintInvalidationBorderBoxChange;
131 130
132 if (style.hasBorderRadius()) 131 if (style.hasBorderRadius())
133 return PaintInvalidationBorderBoxChange; 132 return PaintInvalidationBorderBoxChange;
134 133
135 if (oldBorderBoxSize.width() != newBorderBoxSize.width() && 134 if (oldBorderBoxSize.width() != newBorderBoxSize.width() &&
136 m_box.mustInvalidateBackgroundOrBorderPaintOnWidthChange()) 135 m_box.mustInvalidateBackgroundOrBorderPaintOnWidthChange())
137 return PaintInvalidationBorderBoxChange; 136 return PaintInvalidationBorderBoxChange;
138 if (oldBorderBoxSize.height() != newBorderBoxSize.height() && 137 if (oldBorderBoxSize.height() != newBorderBoxSize.height() &&
139 m_box.mustInvalidateBackgroundOrBorderPaintOnHeightChange()) 138 m_box.mustInvalidateBackgroundOrBorderPaintOnHeightChange())
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 if (needsToSavePreviousContentBoxSizeOrLayoutOverflowRect()) { 319 if (needsToSavePreviousContentBoxSizeOrLayoutOverflowRect()) {
321 m_box.getMutableForPainting() 320 m_box.getMutableForPainting()
322 .savePreviousContentBoxSizeAndLayoutOverflowRect(); 321 .savePreviousContentBoxSizeAndLayoutOverflowRect();
323 } else { 322 } else {
324 m_box.getMutableForPainting() 323 m_box.getMutableForPainting()
325 .clearPreviousContentBoxSizeAndLayoutOverflowRect(); 324 .clearPreviousContentBoxSizeAndLayoutOverflowRect();
326 } 325 }
327 } 326 }
328 327
329 } // namespace blink 328 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698