| Index: cc/trees/thread_proxy.cc
|
| diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
|
| index 6dd728569d7c87fa2bf38741f58d281fe3768665..3f6095b8b6410ba699882ad1402487b6369e5d87 100644
|
| --- a/cc/trees/thread_proxy.cc
|
| +++ b/cc/trees/thread_proxy.cc
|
| @@ -913,16 +913,20 @@ ThreadProxy::ScheduledActionDrawAndSwapInternal(bool forced_draw) {
|
| // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on
|
| // CanDraw() as well.
|
|
|
| - // If it is a forced draw, make sure we do a draw and swap.
|
| - gfx::Rect readback_rect;
|
| - if (readback_request_on_impl_thread_)
|
| - readback_rect = readback_request_on_impl_thread_->rect;
|
| + bool drawing_for_readback = !!readback_request_on_impl_thread_;
|
| + bool can_do_readback = layer_tree_host_impl_->renderer()->CanReadPixels();
|
|
|
| LayerTreeHostImpl::FrameData frame;
|
| bool draw_frame = false;
|
| bool start_ready_animations = true;
|
|
|
| - if (layer_tree_host_impl_->CanDraw()) {
|
| + if (layer_tree_host_impl_->CanDraw() &&
|
| + (!drawing_for_readback || can_do_readback)) {
|
| + // If it is for a readback, make sure we draw the portion being read back.
|
| + gfx::Rect readback_rect;
|
| + if (drawing_for_readback)
|
| + readback_rect = readback_request_on_impl_thread_->rect;
|
| +
|
| // Do not start animations if we skip drawing the frame to avoid
|
| // checkerboarding.
|
| if (layer_tree_host_impl_->PrepareToDraw(&frame, readback_rect) ||
|
|
|