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

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

Issue 2334123006: scheduler: Don't throttle 0x0 frames (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/web/tests/FrameThrottlingTest.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 /* 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 4221 matching lines...) Expand 10 before | Expand all | Expand 10 after
4232 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) { 4232 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) {
4233 if (!child->isLocalFrame()) 4233 if (!child->isLocalFrame())
4234 continue; 4234 continue;
4235 if (FrameView* view = toLocalFrame(child)->view()) 4235 if (FrameView* view = toLocalFrame(child)->view())
4236 view->updateViewportIntersectionsForSubtree(targetState); 4236 view->updateViewportIntersectionsForSubtree(targetState);
4237 } 4237 }
4238 } 4238 }
4239 4239
4240 void FrameView::updateThrottlingStatus() 4240 void FrameView::updateThrottlingStatus()
4241 { 4241 {
4242 // Only offscreen frames can be throttled. 4242 // Only offscreen frames can be throttled. Note that we disallow throttling
4243 // of 0x0 frames because some sites use them to drive UI logic.
4243 DCHECK(m_viewportIntersectionValid); 4244 DCHECK(m_viewportIntersectionValid);
4244 m_hiddenForThrottling = m_viewportIntersection.isEmpty(); 4245 m_hiddenForThrottling = m_viewportIntersection.isEmpty() && !frameRect().isE mpty();
4245 4246
4246 // We only throttle the rendering pipeline in cross-origin frames. This is 4247 // We only throttle the rendering pipeline in cross-origin frames. This is
4247 // to avoid a situation where an ancestor frame directly depends on the 4248 // to avoid a situation where an ancestor frame directly depends on the
4248 // pipeline timing of a descendant and breaks as a result of throttling. 4249 // pipeline timing of a descendant and breaks as a result of throttling.
4249 // The rationale is that cross-origin frames must already communicate with 4250 // The rationale is that cross-origin frames must already communicate with
4250 // asynchronous messages, so they should be able to tolerate some delay in 4251 // asynchronous messages, so they should be able to tolerate some delay in
4251 // receiving replies from a throttled peer. 4252 // receiving replies from a throttled peer.
4252 // 4253 //
4253 // Check if we can access our parent's security origin. 4254 // Check if we can access our parent's security origin.
4254 m_crossOriginForThrottling = false; 4255 m_crossOriginForThrottling = false;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
4329 } 4330 }
4330 4331
4331 bool FrameView::canThrottleRendering() const 4332 bool FrameView::canThrottleRendering() const
4332 { 4333 {
4333 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4334 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4334 return false; 4335 return false;
4335 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4336 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4336 } 4337 }
4337 4338
4338 } // namespace blink 4339 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698