Chromium Code Reviews| Index: content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc |
| diff --git a/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc b/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc |
| index 3496764baec403ba23da29e3d3fff80ec13343b2..b6088b9563b497dfd9c8d4429cd31d5348aa75ff 100644 |
| --- a/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc |
| +++ b/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc |
| @@ -33,6 +33,12 @@ void OffscreenCanvasFrameReceiverImpl::Create( |
| std::move(request)); |
| } |
| +void OffscreenCanvasFrameReceiverImpl::SetClient( |
| + blink::mojom::OffscreenCanvasFrameReceiverClientPtr client) { |
| + DCHECK(!client_.get()); |
|
dcheng
2016/09/14 20:02:19
Nit: the .get() should be unnecessary
|
| + client_ = std::move(client); |
| +} |
| + |
| void OffscreenCanvasFrameReceiverImpl::SubmitCompositorFrame( |
| const cc::SurfaceId& surface_id, |
| cc::CompositorFrame frame) { |
| @@ -53,7 +59,9 @@ void OffscreenCanvasFrameReceiverImpl::SubmitCompositorFrame( |
| // TODO(619136): Implement cc::SurfaceFactoryClient functions for resources |
| // return. |
| void OffscreenCanvasFrameReceiverImpl::ReturnResources( |
| - const cc::ReturnedResourceArray& resources) {} |
| + const cc::ReturnedResourceArray& resources) { |
| + client_->ReturnResources(resources); |
| +} |
| void OffscreenCanvasFrameReceiverImpl::WillDrawSurface( |
| const cc::SurfaceId& id, |