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

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

Issue 2750463003: Reduce the number of ObjectPaintProperties (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/PaintLayerPainter.h" 5 #include "core/paint/PaintLayerPainter.h"
6 6
7 #include "core/frame/LocalFrame.h" 7 #include "core/frame/LocalFrame.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "core/paint/ClipPathClipper.h" 9 #include "core/paint/ClipPathClipper.h"
10 #include "core/paint/FilterPainter.h" 10 #include "core/paint/FilterPainter.h"
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 // filled with black. 973 // filled with black.
974 if (clipRecorder && phase == PaintPhaseClippingMask) { 974 if (clipRecorder && phase == PaintPhaseClippingMask) {
975 fillMaskingFragment(context, clipRect); 975 fillMaskingFragment(context, clipRect);
976 return; 976 return;
977 } 977 }
978 978
979 LayoutRect newCullRect(clipRect.rect()); 979 LayoutRect newCullRect(clipRect.rect());
980 Optional<ScrollRecorder> scrollRecorder; 980 Optional<ScrollRecorder> scrollRecorder;
981 LayoutPoint paintOffset = -m_paintLayer.layoutBoxLocation(); 981 LayoutPoint paintOffset = -m_paintLayer.layoutBoxLocation();
982 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 982 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
983 const auto* objectPaintProperties =
984 m_paintLayer.layoutObject().paintProperties();
985 DCHECK(objectPaintProperties &&
986 objectPaintProperties->localBorderBoxProperties());
987 paintOffset += m_paintLayer.layoutObject().paintOffset(); 983 paintOffset += m_paintLayer.layoutObject().paintOffset();
988 newCullRect.move(paintingInfo.scrollOffsetAccumulation); 984 newCullRect.move(paintingInfo.scrollOffsetAccumulation);
989 } else { 985 } else {
990 paintOffset += toSize(fragment.layerBounds.location()); 986 paintOffset += toSize(fragment.layerBounds.location());
991 if (!paintingInfo.scrollOffsetAccumulation.isZero()) { 987 if (!paintingInfo.scrollOffsetAccumulation.isZero()) {
992 // As a descendant of the root layer, m_paintLayer's painting is not 988 // As a descendant of the root layer, m_paintLayer's painting is not
993 // controlled by the ScrollRecorders created by BlockPainter of the 989 // controlled by the ScrollRecorders created by BlockPainter of the
994 // ancestor layers up to the root layer, so we need to issue 990 // ancestor layers up to the root layer, so we need to issue
995 // ScrollRecorder for this layer seperately, with the scroll offset 991 // ScrollRecorder for this layer seperately, with the scroll offset
996 // accumulated from the root layer to the parent of this layer, to get the 992 // accumulated from the root layer to the parent of this layer, to get the
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 context, layoutObject, PaintPhaseClippingMask)) 1205 context, layoutObject, PaintPhaseClippingMask))
1210 return; 1206 return;
1211 1207
1212 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect()); 1208 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect());
1213 LayoutObjectDrawingRecorder drawingRecorder( 1209 LayoutObjectDrawingRecorder drawingRecorder(
1214 context, layoutObject, PaintPhaseClippingMask, snappedClipRect); 1210 context, layoutObject, PaintPhaseClippingMask, snappedClipRect);
1215 context.fillRect(snappedClipRect, Color::black); 1211 context.fillRect(snappedClipRect, Color::black);
1216 } 1212 }
1217 1213
1218 } // namespace blink 1214 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698