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

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

Issue 2118783002: scheduler: Add an unthrottled per-frame task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add implementation in EmptyClients Created 4 years, 5 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 /* 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 4112 matching lines...) Expand 10 before | Expand all | Expand 10 after
4123 bool hadEmptyIntersection = m_viewportIntersection.isEmpty(); 4123 bool hadEmptyIntersection = m_viewportIntersection.isEmpty();
4124 updateViewportIntersectionIfNeeded(); 4124 updateViewportIntersectionIfNeeded();
4125 4125
4126 // Notify javascript IntersectionObservers 4126 // Notify javascript IntersectionObservers
4127 if (targetState == DocumentLifecycle::PaintClean && frame().document()->inte rsectionObserverController()) 4127 if (targetState == DocumentLifecycle::PaintClean && frame().document()->inte rsectionObserverController())
4128 frame().document()->intersectionObserverController()->computeTrackedInte rsectionObservations(); 4128 frame().document()->intersectionObserverController()->computeTrackedInte rsectionObservations();
4129 4129
4130 // Adjust render throttling for iframes based on visibility 4130 // Adjust render throttling for iframes based on visibility
4131 bool shouldNotify = !hadValidIntersection || hadEmptyIntersection != m_viewp ortIntersection.isEmpty(); 4131 bool shouldNotify = !hadValidIntersection || hadEmptyIntersection != m_viewp ortIntersection.isEmpty();
4132 if (shouldNotify && !m_renderThrottlingObserverNotificationFactory->isPendin g()) 4132 if (shouldNotify && !m_renderThrottlingObserverNotificationFactory->isPendin g())
4133 m_frame->frameScheduler()->timerTaskRunner()->postTask(BLINK_FROM_HERE, m_renderThrottlingObserverNotificationFactory->cancelAndCreate()); 4133 m_frame->frameScheduler()->unthrottledTaskRunner()->postTask(BLINK_FROM_ HERE, m_renderThrottlingObserverNotificationFactory->cancelAndCreate());
4134 4134
4135 if (!m_needsUpdateViewportIntersectionInSubtree) 4135 if (!m_needsUpdateViewportIntersectionInSubtree)
4136 return; 4136 return;
4137 m_needsUpdateViewportIntersectionInSubtree = false; 4137 m_needsUpdateViewportIntersectionInSubtree = false;
4138 4138
4139 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) { 4139 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) {
4140 if (!child->isLocalFrame()) 4140 if (!child->isLocalFrame())
4141 continue; 4141 continue;
4142 if (FrameView* view = toLocalFrame(child)->view()) 4142 if (FrameView* view = toLocalFrame(child)->view())
4143 view->updateViewportIntersectionsForSubtree(targetState); 4143 view->updateViewportIntersectionsForSubtree(targetState);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
4239 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4239 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4240 } 4240 }
4241 4241
4242 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4242 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4243 { 4243 {
4244 ASSERT(!layoutViewItem().isNull()); 4244 ASSERT(!layoutViewItem().isNull());
4245 return *layoutView(); 4245 return *layoutView();
4246 } 4246 }
4247 4247
4248 } // namespace blink 4248 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/fake_renderer_scheduler.cc ('k') | third_party/WebKit/Source/core/loader/EmptyClients.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698