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

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

Issue 2333653002: 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 4235 matching lines...) Expand 10 before | Expand all | Expand 10 after
4246 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) { 4246 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) {
4247 if (!child->isLocalFrame()) 4247 if (!child->isLocalFrame())
4248 continue; 4248 continue;
4249 if (FrameView* view = toLocalFrame(child)->view()) 4249 if (FrameView* view = toLocalFrame(child)->view())
4250 view->updateViewportIntersectionsForSubtree(targetState); 4250 view->updateViewportIntersectionsForSubtree(targetState);
4251 } 4251 }
4252 } 4252 }
4253 4253
4254 void FrameView::updateThrottlingStatus() 4254 void FrameView::updateThrottlingStatus()
4255 { 4255 {
4256 // Only offscreen frames can be throttled. 4256 // Only offscreen frames can be throttled. Note that we disallow throttling
4257 // of 0x0 frames because some sites use them to drive UI logic.
4257 DCHECK(m_viewportIntersectionValid); 4258 DCHECK(m_viewportIntersectionValid);
4258 m_hiddenForThrottling = m_viewportIntersection.isEmpty(); 4259 m_hiddenForThrottling = m_viewportIntersection.isEmpty() && !frameRect().isE mpty();
4259 4260
4260 // We only throttle the rendering pipeline in cross-origin frames. This is 4261 // We only throttle the rendering pipeline in cross-origin frames. This is
4261 // to avoid a situation where an ancestor frame directly depends on the 4262 // to avoid a situation where an ancestor frame directly depends on the
4262 // pipeline timing of a descendant and breaks as a result of throttling. 4263 // pipeline timing of a descendant and breaks as a result of throttling.
4263 // The rationale is that cross-origin frames must already communicate with 4264 // The rationale is that cross-origin frames must already communicate with
4264 // asynchronous messages, so they should be able to tolerate some delay in 4265 // asynchronous messages, so they should be able to tolerate some delay in
4265 // receiving replies from a throttled peer. 4266 // receiving replies from a throttled peer.
4266 // 4267 //
4267 // Check if we can access our parent's security origin. 4268 // Check if we can access our parent's security origin.
4268 m_crossOriginForThrottling = false; 4269 m_crossOriginForThrottling = false;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
4346 } 4347 }
4347 4348
4348 bool FrameView::canThrottleRendering() const 4349 bool FrameView::canThrottleRendering() const
4349 { 4350 {
4350 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4351 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4351 return false; 4352 return false;
4352 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4353 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4353 } 4354 }
4354 4355
4355 } // namespace blink 4356 } // 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