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

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

Issue 1912833002: 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: Comments from piman. 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
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.h ('k') | gpu/ipc/common/gpu_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7587212837fdca100c8ab632038e33b45ebce2b4..a79e490a69e4d5fc672c4faa6b82f5a3097ecfcf 100644
--- a/gpu/ipc/client/command_buffer_proxy_impl.cc
+++ b/gpu/ipc/client/command_buffer_proxy_impl.cc
@@ -617,13 +617,21 @@ void CommandBufferProxyImpl::SignalQuery(uint32_t query,
signal_tasks_.insert(std::make_pair(signal_id, callback));
}
-bool CommandBufferProxyImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) {
- CheckLock();
+void CommandBufferProxyImpl::TakeFrontBuffer(const gpu::Mailbox& mailbox) {
piman 2016/04/27 23:00:58 nit: CheckLock();
erikchen 2016/04/27 23:59:24 Done
piman 2016/04/28 02:15:05 I don't see it in the latest PS (PS#18)
erikchen 2016/04/28 17:07:23 I do see it. https://codereview.chromium.org/19128
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) {
piman 2016/04/27 23:00:58 nit: CheckLock();
erikchen 2016/04/27 23:59:24 Done.
piman 2016/04/28 02:15:05 ditto
+ if (last_state_.error != gpu::error::kNoError)
+ return;
+
+ Send(new GpuCommandBufferMsg_ReturnFrontBuffer(route_id_, mailbox, sync_token,
+ is_lost));
}
gpu::error::Error CommandBufferProxyImpl::GetLastError() {
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.h ('k') | gpu/ipc/common/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698