| OLD | NEW |
| 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 4242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4253 | 4253 |
| 4254 void FrameView::notifyRenderThrottlingObservers() | 4254 void FrameView::notifyRenderThrottlingObservers() |
| 4255 { | 4255 { |
| 4256 TRACE_EVENT0("blink", "FrameView::notifyRenderThrottlingObservers"); | 4256 TRACE_EVENT0("blink", "FrameView::notifyRenderThrottlingObservers"); |
| 4257 DCHECK(!isInPerformLayout()); | 4257 DCHECK(!isInPerformLayout()); |
| 4258 DCHECK(!m_frame->document() || !m_frame->document()->inStyleRecalc()); | 4258 DCHECK(!m_frame->document() || !m_frame->document()->inStyleRecalc()); |
| 4259 bool wasThrottled = canThrottleRendering(); | 4259 bool wasThrottled = canThrottleRendering(); |
| 4260 | 4260 |
| 4261 updateThrottlingStatus(); | 4261 updateThrottlingStatus(); |
| 4262 | 4262 |
| 4263 frame().onVisibilityMaybeChanged(!m_hiddenForThrottling); |
| 4264 |
| 4263 bool becameThrottled = !wasThrottled && canThrottleRendering(); | 4265 bool becameThrottled = !wasThrottled && canThrottleRendering(); |
| 4264 bool becameUnthrottled = wasThrottled && !canThrottleRendering(); | 4266 bool becameUnthrottled = wasThrottled && !canThrottleRendering(); |
| 4265 ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(); | 4267 ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(); |
| 4266 if (becameThrottled) { | 4268 if (becameThrottled) { |
| 4267 // If this FrameView became throttled, we must make sure all of its | 4269 // If this FrameView became throttled, we must make sure all of its |
| 4268 // children become throttled at the same time. Otherwise we might | 4270 // children become throttled at the same time. Otherwise we might |
| 4269 // attempt to paint one of the children with an out-of-date layout | 4271 // attempt to paint one of the children with an out-of-date layout |
| 4270 // before |notifyRenderThrottlingObservers| has made it throttled. | 4272 // before |notifyRenderThrottlingObservers| has made it throttled. |
| 4271 forAllNonThrottledFrameViews([](FrameView& frameView) { | 4273 forAllNonThrottledFrameViews([](FrameView& frameView) { |
| 4272 frameView.m_subtreeThrottled = true; | 4274 frameView.m_subtreeThrottled = true; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4308 } | 4310 } |
| 4309 | 4311 |
| 4310 bool FrameView::canThrottleRendering() const | 4312 bool FrameView::canThrottleRendering() const |
| 4311 { | 4313 { |
| 4312 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4314 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4313 return false; | 4315 return false; |
| 4314 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4316 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4315 } | 4317 } |
| 4316 | 4318 |
| 4317 } // namespace blink | 4319 } // namespace blink |
| OLD | NEW |