| Index: cc/trees/layer_tree_host_impl.cc
|
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
| index 9d01bd653cb692523f0cfccf3bcc9f098ad0f097..fa5b2e6de7f1a37cbc725784539d3677dc06ff06 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -1448,8 +1448,10 @@ void LayerTreeHostImpl::ReclaimResources(
|
| const ReturnedResourceArray& resources) {
|
| // TODO(piman): We may need to do some validation on this ack before
|
| // processing it.
|
| - if (resource_provider_)
|
| - resource_provider_->ReceiveReturnsFromParent(resources);
|
| + if (!resource_provider_)
|
| + return;
|
| +
|
| + resource_provider_->ReceiveReturnsFromParent(resources);
|
|
|
| // In OOM, we now might be able to release more resources that were held
|
| // because they were exported.
|
| @@ -1472,11 +1474,8 @@ void LayerTreeHostImpl::ReclaimResources(
|
| // If we're not visible, we likely released resources, so we want to
|
| // aggressively flush here to make sure those DeleteTextures make it to the
|
| // GPU process to free up the memory.
|
| - if (compositor_frame_sink_->context_provider() && !visible_) {
|
| - compositor_frame_sink_->context_provider()
|
| - ->ContextGL()
|
| - ->ShallowFlushCHROMIUM();
|
| - }
|
| + if (!visible_)
|
| + resource_provider_->FlushPendingDeletions();
|
| }
|
|
|
| void LayerTreeHostImpl::OnDraw(const gfx::Transform& transform,
|
|
|