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/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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 DCHECK(parentRow && parentRow->isTableRow()); 1037 DCHECK(parentRow && parentRow->isTableRow());
1037 context.current.paintOffset.moveBy( 1038 context.current.paintOffset.moveBy(
1038 -toLayoutBox(parentRow)->physicalLocation()); 1039 -toLayoutBox(parentRow)->physicalLocation());
1039 } 1040 }
1040 } 1041 }
1041 } 1042 }
1042 1043
1043 void PaintPropertyTreeBuilder::updateForObjectLocationAndSize( 1044 void PaintPropertyTreeBuilder::updateForObjectLocationAndSize(
1044 const LayoutObject& object, 1045 const LayoutObject& object,
1045 PaintPropertyTreeBuilderContext& context) { 1046 PaintPropertyTreeBuilderContext& context) {
1047 #if DCHECK_IS_ON()
1048 FindPaintOffsetNeedingUpdateScope checkScope(object, context);
1049 #endif
1050
1046 if (object.isBoxModelObject()) { 1051 if (object.isBoxModelObject()) {
1047 updatePaintOffset(toLayoutBoxModelObject(object), context); 1052 updatePaintOffset(toLayoutBoxModelObject(object), context);
1048 updatePaintOffsetTranslation(toLayoutBoxModelObject(object), context); 1053 updatePaintOffsetTranslation(toLayoutBoxModelObject(object), context);
1049 } 1054 }
1050 1055
1051 if (object.paintOffset() != context.current.paintOffset) { 1056 if (object.paintOffset() != context.current.paintOffset) {
1052 // Many paint properties depend on paint offset so we force an update of 1057 // Many paint properties depend on paint offset so we force an update of
1053 // the entire subtree on paint offset changes. 1058 // the entire subtree on paint offset changes.
1054 context.forceSubtreeUpdate = true; 1059 context.forceSubtreeUpdate = true;
1055 1060
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 updateOverflowClip(object, context); 1136 updateOverflowClip(object, context);
1132 updatePerspective(object, context); 1137 updatePerspective(object, context);
1133 updateSvgLocalToBorderBoxTransform(object, context); 1138 updateSvgLocalToBorderBoxTransform(object, context);
1134 updateScrollAndScrollTranslation(object, context); 1139 updateScrollAndScrollTranslation(object, context);
1135 updateOutOfFlowContext(object, context); 1140 updateOutOfFlowContext(object, context);
1136 1141
1137 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); 1142 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate();
1138 } 1143 }
1139 1144
1140 } // namespace blink 1145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698