Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp |
| index 7f8cce79e81f9f39f05c47d52c7f54024dfe6849..3b3fdda6e4caa14598d6666e9b1ddb9459254602 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp |
| @@ -68,7 +68,7 @@ void OffscreenCanvasFrameDispatcherImpl::setTransferableResourceToSharedBitmap( |
| resource.mailbox_holder.texture_target = 0; |
| resource.is_software = true; |
| - // Hold ref to |bitmap|, to keep it alive until the browser ReturnResources. |
| + // Hold ref to |bitmap|, to keep it alive until the browser ReclaimResources. |
| // It guarantees that the shared bitmap is not re-used or deleted. |
| m_sharedBitmaps.add(m_nextResourceId, std::move(bitmap)); |
| } |
| @@ -126,7 +126,7 @@ void OffscreenCanvasFrameDispatcherImpl:: |
| resource.is_software = false; |
| // Hold ref to |textureId| for the piece of GPU memory where the pixel data |
| - // is uploaded to, to keep it alive until the browser ReturnResources. |
| + // is uploaded to, to keep it alive until the browser ReclaimResources. |
| m_cachedTextureIds.add(m_nextResourceId, textureId); |
| } |
| @@ -140,7 +140,7 @@ void OffscreenCanvasFrameDispatcherImpl:: |
| resource.read_lock_fences_enabled = false; |
| resource.is_software = false; |
| - // Hold ref to |image|, to keep it alive until the browser ReturnResources. |
| + // Hold ref to |image|, to keep it alive until the browser ReclaimResources. |
| // It guarantees that the resource is not re-used or deleted. |
| m_cachedImages.add(m_nextResourceId, std::move(image)); |
| } |
| @@ -312,10 +312,14 @@ void OffscreenCanvasFrameDispatcherImpl::dispatchFrame( |
| NOTREACHED(); |
| } |
| - m_sink->SubmitCompositorFrame(std::move(frame), base::Closure()); |
| + m_sink->SubmitCompositorFrame(std::move(frame)); |
| } |
| -void OffscreenCanvasFrameDispatcherImpl::ReturnResources( |
| +void OffscreenCanvasFrameDispatcherImpl::DidReceiveCompositorFrameAck() { |
| + // FIXME: Implement this. |
|
rjkroege
2016/10/20 21:33:18
TODO(fsamuel)
Fady Samuel
2016/10/20 23:04:10
Done.
|
| +} |
| + |
| +void OffscreenCanvasFrameDispatcherImpl::ReclaimResources( |
| const cc::ReturnedResourceArray& resources) { |
| for (const auto& resource : resources) { |
| m_cachedImages.remove(resource.id); |