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 if (frame().document()) | |
dcheng
2016/08/29 20:37:19
Do we need to do this check because Widget isn't s
dgrogan
2016/08/31 19:52:41
Not sure... I was cargo-culting from the first cla
dcheng
2016/09/01 21:24:26
Looking at the code, I'm actually not sure how we'
| |
4264 frame().document()->onVisibilityMaybeChanged(!m_hiddenForThrottling); | |
4265 | |
4263 bool becameThrottled = !wasThrottled && canThrottleRendering(); | 4266 bool becameThrottled = !wasThrottled && canThrottleRendering(); |
4264 bool becameUnthrottled = wasThrottled && !canThrottleRendering(); | 4267 bool becameUnthrottled = wasThrottled && !canThrottleRendering(); |
4265 ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(); | 4268 ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(); |
4266 if (becameThrottled) { | 4269 if (becameThrottled) { |
4267 // If this FrameView became throttled, we must make sure all of its | 4270 // If this FrameView became throttled, we must make sure all of its |
4268 // children become throttled at the same time. Otherwise we might | 4271 // children become throttled at the same time. Otherwise we might |
4269 // attempt to paint one of the children with an out-of-date layout | 4272 // attempt to paint one of the children with an out-of-date layout |
4270 // before |notifyRenderThrottlingObservers| has made it throttled. | 4273 // before |notifyRenderThrottlingObservers| has made it throttled. |
4271 forAllNonThrottledFrameViews([](FrameView& frameView) { | 4274 forAllNonThrottledFrameViews([](FrameView& frameView) { |
4272 frameView.m_subtreeThrottled = true; | 4275 frameView.m_subtreeThrottled = true; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4308 } | 4311 } |
4309 | 4312 |
4310 bool FrameView::canThrottleRendering() const | 4313 bool FrameView::canThrottleRendering() const |
4311 { | 4314 { |
4312 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4315 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
4313 return false; | 4316 return false; |
4314 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); | 4317 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); |
4315 } | 4318 } |
4316 | 4319 |
4317 } // namespace blink | 4320 } // namespace blink |
OLD | NEW |