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

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

Issue 2634493006: Implement Internals::mainThreadScrollingReasons for SPV2 (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 ('k') | 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 4878 matching lines...) Expand 10 before | Expand all | Expand 10 after
4889 if (!frame->isLocalFrame()) 4889 if (!frame->isLocalFrame())
4890 continue; 4890 continue;
4891 reasons |= 4891 reasons |=
4892 toLocalFrame(frame)->view()->mainThreadScrollingReasonsPerFrame(); 4892 toLocalFrame(frame)->view()->mainThreadScrollingReasonsPerFrame();
4893 } 4893 }
4894 4894
4895 return reasons; 4895 return reasons;
4896 } 4896 }
4897 4897
4898 String FrameView::mainThreadScrollingReasonsAsText() const { 4898 String FrameView::mainThreadScrollingReasonsAsText() const {
4899 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
4900 DCHECK(lifecycle().state() >= DocumentLifecycle::PrePaintClean);
4901
4902 // Slimming paint v2 stores main thread scrolling reasons on property
4903 // trees instead of in |m_mainThreadScrollingReasons|.
4904 MainThreadScrollingReasons reasons = 0;
4905 if (const auto* scrollNode = scroll())
4906 reasons |= scrollNode->mainThreadScrollingReasons();
4907 return String(
4908 MainThreadScrollingReason::mainThreadScrollingReasonsAsText(reasons)
4909 .c_str());
4910 }
4911
4899 DCHECK(lifecycle().state() >= DocumentLifecycle::CompositingClean); 4912 DCHECK(lifecycle().state() >= DocumentLifecycle::CompositingClean);
4900 if (layerForScrolling() && layerForScrolling()->platformLayer()) { 4913 if (layerForScrolling() && layerForScrolling()->platformLayer()) {
4901 String result( 4914 String result(
4902 MainThreadScrollingReason::mainThreadScrollingReasonsAsText( 4915 MainThreadScrollingReason::mainThreadScrollingReasonsAsText(
4903 layerForScrolling()->platformLayer()->mainThreadScrollingReasons()) 4916 layerForScrolling()->platformLayer()->mainThreadScrollingReasons())
4904 .c_str()); 4917 .c_str());
4905 return result; 4918 return result;
4906 } 4919 }
4907 4920
4908 String result(MainThreadScrollingReason::mainThreadScrollingReasonsAsText( 4921 String result(MainThreadScrollingReason::mainThreadScrollingReasonsAsText(
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
4986 // This is the top-level frame, so no mapping necessary. 4999 // This is the top-level frame, so no mapping necessary.
4987 if (m_frame->isMainFrame()) 5000 if (m_frame->isMainFrame())
4988 return; 5001 return;
4989 5002
4990 LayoutRect viewportIntersectionRect(remoteViewportIntersection()); 5003 LayoutRect viewportIntersectionRect(remoteViewportIntersection());
4991 transformState.move( 5004 transformState.move(
4992 LayoutSize(-viewportIntersectionRect.x(), -viewportIntersectionRect.y())); 5005 LayoutSize(-viewportIntersectionRect.x(), -viewportIntersectionRect.y()));
4993 } 5006 }
4994 5007
4995 } // namespace blink 5008 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698