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

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

Issue 2574293003: [SPInvalidation] Update paint properties when layer or paintsWithTransform status change (Closed)
Patch Set: Also fix paintOffsetTranslation Created 4 years 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 | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/PaintPropertyTreeBuilder.h" 5 #include "core/paint/PaintPropertyTreeBuilder.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 bool usesPaintOffsetTranslation = false; 212 bool usesPaintOffsetTranslation = false;
213 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled() && 213 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
214 object.isLayoutView()) { 214 object.isLayoutView()) {
215 // Root layer scrolling always creates a translation node for LayoutView to 215 // Root layer scrolling always creates a translation node for LayoutView to
216 // ensure fixed and absolute contexts use the correct transform space. 216 // ensure fixed and absolute contexts use the correct transform space.
217 usesPaintOffsetTranslation = true; 217 usesPaintOffsetTranslation = true;
218 } else if (object.isBoxModelObject() && 218 } else if (object.isBoxModelObject() &&
219 context.current.paintOffset != LayoutPoint()) { 219 context.current.paintOffset != LayoutPoint()) {
220 // TODO(trchen): Eliminate PaintLayer dependency. 220 // TODO(trchen): Eliminate PaintLayer dependency.
221 PaintLayer* layer = toLayoutBoxModelObject(object).layer(); 221 PaintLayer* layer = toLayoutBoxModelObject(object).layer();
222 if (layer && layer->paintsWithTransform(GlobalPaintNormalPhase)) 222 if (layer &&
223 layer->paintsWithTransform(GlobalPaintFlattenCompositingLayers))
Xianzhu 2016/12/14 18:41:00 This avoids paintsWithTransform from depending on
pdr. 2016/12/14 21:52:53 "compositingState() != PaintsIntoOwnBacking" shoul
Xianzhu 2016/12/14 22:02:31 When you posted this comment, I just uploaded a pa
223 usesPaintOffsetTranslation = true; 224 usesPaintOffsetTranslation = true;
224 } 225 }
225 226
226 // We should use the same subpixel paint offset values for snapping 227 // We should use the same subpixel paint offset values for snapping
227 // regardless of whether a transform is present. If there is a transform 228 // regardless of whether a transform is present. If there is a transform
228 // we round the paint offset but keep around the residual fractional 229 // we round the paint offset but keep around the residual fractional
229 // component for the transformed content to paint with. In spv1 this was 230 // component for the transformed content to paint with. In spv1 this was
230 // called "subpixel accumulation". For more information, see 231 // called "subpixel accumulation". For more information, see
231 // PaintLayer::subpixelAccumulation() and 232 // PaintLayer::subpixelAccumulation() and
232 // PaintLayerPainter::paintFragmentByApplyingTransform. 233 // PaintLayerPainter::paintFragmentByApplyingTransform.
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 #endif 906 #endif
906 907
907 updateOverflowClip(object, context); 908 updateOverflowClip(object, context);
908 updatePerspective(object, context); 909 updatePerspective(object, context);
909 updateSvgLocalToBorderBoxTransform(object, context); 910 updateSvgLocalToBorderBoxTransform(object, context);
910 updateScrollAndScrollTranslation(object, context); 911 updateScrollAndScrollTranslation(object, context);
911 updateOutOfFlowContext(object, context); 912 updateOutOfFlowContext(object, context);
912 } 913 }
913 914
914 } // namespace blink 915 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698