Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: gpu/ipc/client/command_buffer_proxy_impl.cc

Issue 1943513002: [Reland 1] Pepper takes ownership of a mailbox before passing it to the texture layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/ipc/client/command_buffer_proxy_impl.cc
diff --git a/gpu/ipc/client/command_buffer_proxy_impl.cc b/gpu/ipc/client/command_buffer_proxy_impl.cc
index bc36560e8395db6fa61e01227c68b5fb80c56d06..18192755e828a634ad1cf9090cbca6fa7db9349e 100644
--- a/gpu/ipc/client/command_buffer_proxy_impl.cc
+++ b/gpu/ipc/client/command_buffer_proxy_impl.cc
@@ -618,13 +618,23 @@ void CommandBufferProxyImpl::SignalQuery(uint32_t query,
signal_tasks_.insert(std::make_pair(signal_id, callback));
}
-bool CommandBufferProxyImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) {
+void CommandBufferProxyImpl::TakeFrontBuffer(const gpu::Mailbox& mailbox) {
CheckLock();
if (last_state_.error != gpu::error::kNoError)
- return false;
+ return;
- Send(new GpuCommandBufferMsg_ProduceFrontBuffer(route_id_, mailbox));
- return true;
+ Send(new GpuCommandBufferMsg_TakeFrontBuffer(route_id_, mailbox));
+}
+
+void CommandBufferProxyImpl::ReturnFrontBuffer(const gpu::Mailbox& mailbox,
+ const gpu::SyncToken& sync_token,
+ bool is_lost) {
+ CheckLock();
+ if (last_state_.error != gpu::error::kNoError)
+ return;
+
+ Send(new GpuCommandBufferMsg_ReturnFrontBuffer(route_id_, mailbox, sync_token,
+ is_lost));
}
gpu::error::Error CommandBufferProxyImpl::GetLastError() {

Powered by Google App Engine
This is Rietveld 408576698