Chromium Code Reviews| Index: cc/layer_tree_host.cc |
| diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc |
| index ebc998ed856ed26077d979a67eb4c0e403b75039..b5306e65a3a8bf48105abbf09d5ffdb5aad505a2 100644 |
| --- a/cc/layer_tree_host.cc |
| +++ b/cc/layer_tree_host.cc |
| @@ -330,6 +330,9 @@ void LayerTreeHost::didLoseContext() |
| bool LayerTreeHost::compositeAndReadback(void *pixels, const IntRect& rect) |
| { |
| + // Clear any pending commits. |
|
jamesr
2012/10/23 21:24:34
No, this is definitely not right. You're imposing
jonathan.backer
2012/10/24 16:42:14
Done. Replaced with a DCHECK in ThreadProxy. Enfor
|
| + setDeferCommits(false); |
| + |
| m_triggerIdleUpdates = false; |
| bool ret = m_proxy->compositeAndReadback(pixels, rect); |
| m_triggerIdleUpdates = true; |
| @@ -340,9 +343,23 @@ void LayerTreeHost::finishAllRendering() |
| { |
| if (!m_rendererInitialized) |
| return; |
| + |
| + // Clear any pending commits. |
|
jamesr
2012/10/23 21:24:34
DCHECK, don't handle
jonathan.backer
2012/10/24 16:42:14
Done. Added DCHECK to ThreadProxy.
|
| + setDeferCommits(false); |
| + |
| m_proxy->finishAllRendering(); |
| } |
| +void LayerTreeHost::setDeferCommits(bool deferCommits) |
| +{ |
| + m_proxy->setDeferCommits(deferCommits); |
| +} |
| + |
| +bool LayerTreeHost::deferCommits() const |
| +{ |
| + return m_proxy->deferCommits(); |
| +} |
| + |
| void LayerTreeHost::renderingStats(RenderingStats* stats) const |
| { |
| *stats = m_renderingStats; |