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

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

Issue 2358433002: Add "threaded scrolling disabled" main thread scrolling reason [spv2] (Closed)
Patch Set: Created 4 years, 3 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/PaintPropertyTreeBuilderTest.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 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 328 }
329 } 329 }
330 } 330 }
331 331
332 if (ObjectPaintProperties* properties = object.getMutableForPainting().objec tPaintProperties()) 332 if (ObjectPaintProperties* properties = object.getMutableForPainting().objec tPaintProperties())
333 properties->clearScrollbarPaintOffset(); 333 properties->clearScrollbarPaintOffset();
334 } 334 }
335 335
336 void PaintPropertyTreeBuilder::updateMainThreadScrollingReasons(const LayoutObje ct& object, PaintPropertyTreeBuilderContext& context) 336 void PaintPropertyTreeBuilder::updateMainThreadScrollingReasons(const LayoutObje ct& object, PaintPropertyTreeBuilderContext& context)
337 { 337 {
338 if (context.current.scroll && !object.document().settings()->threadedScrolli ngEnabled())
339 context.current.scroll->addMainThreadScrollingReasons(MainThreadScrollin gReason::kThreadedScrollingDisabled);
340
338 if (object.isBackgroundAttachmentFixedObject()) { 341 if (object.isBackgroundAttachmentFixedObject()) {
339 auto* scrollNode = context.current.scroll; 342 auto* scrollNode = context.current.scroll;
340 while (scrollNode && !scrollNode->hasMainThreadScrollingReasons(MainThre adScrollingReason::kHasBackgroundAttachmentFixedObjects)) { 343 while (scrollNode && !scrollNode->hasMainThreadScrollingReasons(MainThre adScrollingReason::kHasBackgroundAttachmentFixedObjects)) {
341 scrollNode->addMainThreadScrollingReasons(MainThreadScrollingReason: :kHasBackgroundAttachmentFixedObjects); 344 scrollNode->addMainThreadScrollingReasons(MainThreadScrollingReason: :kHasBackgroundAttachmentFixedObjects);
342 scrollNode = scrollNode->parent(); 345 scrollNode = scrollNode->parent();
343 } 346 }
344 } 347 }
345 } 348 }
346 349
347 void PaintPropertyTreeBuilder::updateOverflowClip(const LayoutObject& object, Pa intPropertyTreeBuilderContext& context) 350 void PaintPropertyTreeBuilder::updateOverflowClip(const LayoutObject& object, Pa intPropertyTreeBuilderContext& context)
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 return; 573 return;
571 574
572 updateOverflowClip(object, context); 575 updateOverflowClip(object, context);
573 updatePerspective(object, context); 576 updatePerspective(object, context);
574 updateSvgLocalToBorderBoxTransform(object, context); 577 updateSvgLocalToBorderBoxTransform(object, context);
575 updateScrollAndScrollTranslation(object, context); 578 updateScrollAndScrollTranslation(object, context);
576 updateOutOfFlowContext(object, context); 579 updateOutOfFlowContext(object, context);
577 } 580 }
578 581
579 } // namespace blink 582 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698