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

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

Issue 2732573003: Skip paint property update and visual rect update if no geometry change (Closed)
Patch Set: - 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 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 <memory> 7 #include <memory>
8 #include "core/dom/DOMNodeIds.h" 8 #include "core/dom/DOMNodeIds.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
11 #include "core/frame/Settings.h" 11 #include "core/frame/Settings.h"
12 #include "core/layout/LayoutInline.h" 12 #include "core/layout/LayoutInline.h"
13 #include "core/layout/LayoutView.h" 13 #include "core/layout/LayoutView.h"
14 #include "core/layout/compositing/CompositingReasonFinder.h" 14 #include "core/layout/compositing/CompositingReasonFinder.h"
15 #include "core/layout/svg/LayoutSVGResourceMasker.h" 15 #include "core/layout/svg/LayoutSVGResourceMasker.h"
16 #include "core/layout/svg/LayoutSVGRoot.h" 16 #include "core/layout/svg/LayoutSVGRoot.h"
17 #include "core/layout/svg/SVGLayoutSupport.h" 17 #include "core/layout/svg/SVGLayoutSupport.h"
18 #include "core/layout/svg/SVGResources.h" 18 #include "core/layout/svg/SVGResources.h"
19 #include "core/layout/svg/SVGResourcesCache.h" 19 #include "core/layout/svg/SVGResourcesCache.h"
20 #include "core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h"
20 #include "core/paint/FindPropertiesNeedingUpdate.h" 21 #include "core/paint/FindPropertiesNeedingUpdate.h"
21 #include "core/paint/ObjectPaintProperties.h" 22 #include "core/paint/ObjectPaintProperties.h"
22 #include "core/paint/PaintLayer.h" 23 #include "core/paint/PaintLayer.h"
23 #include "core/paint/SVGRootPainter.h" 24 #include "core/paint/SVGRootPainter.h"
24 #include "platform/transforms/TransformationMatrix.h" 25 #include "platform/transforms/TransformationMatrix.h"
25 #include "wtf/PtrUtil.h" 26 #include "wtf/PtrUtil.h"
26 27
27 namespace blink { 28 namespace blink {
28 29
29 PaintPropertyTreeBuilderContext::PaintPropertyTreeBuilderContext() 30 PaintPropertyTreeBuilderContext::PaintPropertyTreeBuilderContext()
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 DCHECK(parentRow && parentRow->isTableRow()); 1042 DCHECK(parentRow && parentRow->isTableRow());
1042 context.current.paintOffset.moveBy( 1043 context.current.paintOffset.moveBy(
1043 -toLayoutBox(parentRow)->physicalLocation()); 1044 -toLayoutBox(parentRow)->physicalLocation());
1044 } 1045 }
1045 } 1046 }
1046 } 1047 }
1047 1048
1048 void PaintPropertyTreeBuilder::updateForObjectLocationAndSize( 1049 void PaintPropertyTreeBuilder::updateForObjectLocationAndSize(
1049 const LayoutObject& object, 1050 const LayoutObject& object,
1050 PaintPropertyTreeBuilderContext& context) { 1051 PaintPropertyTreeBuilderContext& context) {
1052 #if DCHECK_IS_ON()
1053 FindPaintOffsetNeedingUpdateScope checkScope(object, context);
1054 #endif
1055
1051 if (object.isBoxModelObject()) { 1056 if (object.isBoxModelObject()) {
1052 updatePaintOffset(toLayoutBoxModelObject(object), context); 1057 updatePaintOffset(toLayoutBoxModelObject(object), context);
1053 updatePaintOffsetTranslation(toLayoutBoxModelObject(object), context); 1058 updatePaintOffsetTranslation(toLayoutBoxModelObject(object), context);
1054 } 1059 }
1055 1060
1056 if (object.paintOffset() != context.current.paintOffset) { 1061 if (object.paintOffset() != context.current.paintOffset) {
1057 // Many paint properties depend on paint offset so we force an update of 1062 // Many paint properties depend on paint offset so we force an update of
1058 // the entire subtree on paint offset changes. 1063 // the entire subtree on paint offset changes.
1059 context.forceSubtreeUpdate = true; 1064 context.forceSubtreeUpdate = true;
1060 1065
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 updateOverflowClip(object, context); 1141 updateOverflowClip(object, context);
1137 updatePerspective(object, context); 1142 updatePerspective(object, context);
1138 updateSvgLocalToBorderBoxTransform(object, context); 1143 updateSvgLocalToBorderBoxTransform(object, context);
1139 updateScrollAndScrollTranslation(object, context); 1144 updateScrollAndScrollTranslation(object, context);
1140 updateOutOfFlowContext(object, context); 1145 updateOutOfFlowContext(object, context);
1141 1146
1142 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); 1147 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate();
1143 } 1148 }
1144 1149
1145 } // namespace blink 1150 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698