Commit b64da3f3 authored by jbauman's avatar jbauman Committed by Commit bot

Reset DelegatedFrameHost SurfaceFactory when output_surface_id changes.

This is similar to the DelegatedFrameResourceCollection logic and avoids returning resources created by one output surface to a different one.

Review URL: https://codereview.chromium.org/650533004

Cr-Commit-Position: refs/heads/master@{#300574}
parent d5a0f18a
......@@ -349,6 +349,10 @@ void DelegatedFrameHost::SwapDelegatedFrame(
// the DelegatedRendererLayer.
EvictDelegatedFrame();
surface_factory_.reset();
if (!surface_returned_resources_.empty())
SendReturnedDelegatedResources(last_output_surface_id_);
// Drop the cc::DelegatedFrameResourceCollection so that we will not return
// any resources from the old output surface with the new output surface id.
if (resource_collection_.get()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment