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

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

Issue 2676923002: End-to-end prototype of compositor scrolling with slimming paint v2 (Closed)
Patch Set: Add SPV2 test of didScroll callback Created 3 years, 10 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 "core/dom/DOMNodeIds.h" 7 #include "core/dom/DOMNodeIds.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 PaintPropertyTreeBuilderContext& context) { 744 PaintPropertyTreeBuilderContext& context) {
745 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { 745 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
746 bool needsScrollProperties = false; 746 bool needsScrollProperties = false;
747 if (object.hasOverflowClip()) { 747 if (object.hasOverflowClip()) {
748 auto ancestorReasons = 748 auto ancestorReasons =
749 context.current.scroll->mainThreadScrollingReasons(); 749 context.current.scroll->mainThreadScrollingReasons();
750 auto reasons = mainThreadScrollingReasons(object, ancestorReasons); 750 auto reasons = mainThreadScrollingReasons(object, ancestorReasons);
751 bool scrollNodeNeededForMainThreadReasons = ancestorReasons != reasons; 751 bool scrollNodeNeededForMainThreadReasons = ancestorReasons != reasons;
752 752
753 const LayoutBox& box = toLayoutBox(object); 753 const LayoutBox& box = toLayoutBox(object);
754 const auto* scrollableArea = box.getScrollableArea(); 754 auto* scrollableArea = box.getScrollableArea();
755 IntSize scrollOffset = box.scrolledContentOffset(); 755 IntSize scrollOffset = box.scrolledContentOffset();
756 if (scrollNodeNeededForMainThreadReasons || !scrollOffset.isZero() || 756 if (scrollNodeNeededForMainThreadReasons || !scrollOffset.isZero() ||
757 scrollableArea->scrollsOverflow()) { 757 scrollableArea->scrollsOverflow()) {
758 needsScrollProperties = true; 758 needsScrollProperties = true;
759 auto& properties = 759 auto& properties =
760 object.getMutableForPainting().ensurePaintProperties(); 760 object.getMutableForPainting().ensurePaintProperties();
761 761
762 IntSize scrollClip = scrollableArea->visibleContentRect().size(); 762 IntSize scrollClip = scrollableArea->visibleContentRect().size();
763 IntSize scrollBounds = scrollableArea->contentsSize(); 763 IntSize scrollBounds = scrollableArea->contentsSize();
764 bool userScrollableHorizontal = 764 bool userScrollableHorizontal =
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 updateOverflowClip(object, context); 977 updateOverflowClip(object, context);
978 updatePerspective(object, context); 978 updatePerspective(object, context);
979 updateSvgLocalToBorderBoxTransform(object, context); 979 updateSvgLocalToBorderBoxTransform(object, context);
980 updateScrollAndScrollTranslation(object, context); 980 updateScrollAndScrollTranslation(object, context);
981 updateOutOfFlowContext(object, context); 981 updateOutOfFlowContext(object, context);
982 982
983 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); 983 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate();
984 } 984 }
985 985
986 } // namespace blink 986 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698