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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2662153004: Don't update main thread scroll reasons on a throttled frame. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | 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 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 4870 matching lines...) Expand 10 before | Expand all | Expand 10 after
4881 const Frame& frame, 4881 const Frame& frame,
4882 MainThreadScrollingReasons parentReason) { 4882 MainThreadScrollingReasons parentReason) {
4883 MainThreadScrollingReasons reasons = parentReason; 4883 MainThreadScrollingReasons reasons = parentReason;
4884 4884
4885 if (!page()->settings().getThreadedScrollingEnabled()) 4885 if (!page()->settings().getThreadedScrollingEnabled())
4886 reasons |= MainThreadScrollingReason::kThreadedScrollingDisabled; 4886 reasons |= MainThreadScrollingReason::kThreadedScrollingDisabled;
4887 4887
4888 if (!frame.isLocalFrame()) 4888 if (!frame.isLocalFrame())
4889 return; 4889 return;
4890 4890
4891 if (!toLocalFrame(frame).view()->layerForScrolling()) 4891 FrameView& frameView = *toLocalFrame(frame).view();
4892 if (frameView.shouldThrottleRendering())
4893 return;
4894 if (!frameView.layerForScrolling())
4892 return; 4895 return;
4893 4896
4894 reasons |= toLocalFrame(frame).view()->mainThreadScrollingReasonsPerFrame(); 4897 reasons |= frameView.mainThreadScrollingReasonsPerFrame();
4895 if (GraphicsLayer* layerForScrolling = toLocalFrame(frame) 4898 if (GraphicsLayer* layerForScrolling = toLocalFrame(frame)
4896 .view() 4899 .view()
4897 ->layoutViewportScrollableArea() 4900 ->layoutViewportScrollableArea()
4898 ->layerForScrolling()) { 4901 ->layerForScrolling()) {
4899 if (WebLayer* platformLayerForScrolling = 4902 if (WebLayer* platformLayerForScrolling =
4900 layerForScrolling->platformLayer()) { 4903 layerForScrolling->platformLayer()) {
4901 if (reasons) { 4904 if (reasons) {
4902 platformLayerForScrolling->addMainThreadScrollingReasons(reasons); 4905 platformLayerForScrolling->addMainThreadScrollingReasons(reasons);
4903 } else { 4906 } else {
4904 // Clear all main thread scrolling reasons except the one that's set 4907 // Clear all main thread scrolling reasons except the one that's set
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
5094 std::unique_ptr<CompositorAnimationTimeline> timeline) { 5097 std::unique_ptr<CompositorAnimationTimeline> timeline) {
5095 m_animationTimeline = std::move(timeline); 5098 m_animationTimeline = std::move(timeline);
5096 } 5099 }
5097 5100
5098 void FrameView::setAnimationHost( 5101 void FrameView::setAnimationHost(
5099 std::unique_ptr<CompositorAnimationHost> host) { 5102 std::unique_ptr<CompositorAnimationHost> host) {
5100 m_animationHost = std::move(host); 5103 m_animationHost = std::move(host);
5101 } 5104 }
5102 5105
5103 } // namespace blink 5106 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698