| Index: Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp
|
| ===================================================================
|
| --- Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp (revision 117086)
|
| +++ Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp (working copy)
|
| @@ -325,8 +325,14 @@
|
| DebugScopedSetImplThread impl;
|
| double monotonicTime = monotonicallyIncreasingTime();
|
| double wallClockTime = currentTime();
|
| + m_layerTreeHostImpl->animate(monotonicTime, wallClockTime);
|
|
|
| - m_layerTreeHostImpl->animate(monotonicTime, wallClockTime);
|
| + // We guard prepareToDraw() with canDraw() because it always returns a valid frame, so can only
|
| + // be used when such a frame is possible. Since drawLayers() depends on the result of
|
| + // prepareToDraw(), it is guarded on canDraw() as well.
|
| + if (!m_layerTreeHostImpl->canDraw())
|
| + return false;
|
| +
|
| CCLayerTreeHostImpl::FrameData frame;
|
| m_layerTreeHostImpl->prepareToDraw(frame);
|
| m_layerTreeHostImpl->drawLayers(frame);
|
|
|