summaryrefslogtreecommitdiffstats
path: root/gpu/ipc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-05 07:48:51 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-05 07:48:51 +0000
commit2ad674132b5a79f5c9bc108c77b5e5de3c665a05 (patch)
treeedbef08087681f69f16708f9110f76406cb432ac /gpu/ipc
parent62b22650009f851a7703db0b73e22d9eafec2ea9 (diff)
downloadchromium_src-2ad674132b5a79f5c9bc108c77b5e5de3c665a05.zip
chromium_src-2ad674132b5a79f5c9bc108c77b5e5de3c665a05.tar.gz
chromium_src-2ad674132b5a79f5c9bc108c77b5e5de3c665a05.tar.bz2
Replace context parenting by sharing through mailboxes
Instead of tying contexts together through the parenting mechanism, we can allow the client to produce the front buffer of an offscreen context into a mailbox, and use that in the "parent" context. It simplifies the code and the semantics wrt lost contexts, and we want to use mailboxes anyway. BUG=164095 Review URL: https://chromiumcodereview.appspot.com/15798014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204194 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/ipc')
-rw-r--r--gpu/ipc/command_buffer_proxy.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/gpu/ipc/command_buffer_proxy.h b/gpu/ipc/command_buffer_proxy.h
index a992369..d33eae4 100644
--- a/gpu/ipc/command_buffer_proxy.h
+++ b/gpu/ipc/command_buffer_proxy.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "gpu/command_buffer/common/command_buffer_shared.h"
+#include "gpu/command_buffer/common/mailbox.h"
// Client side proxy that forwards messages synchronously to a
// CommandBufferStub.
@@ -28,12 +29,9 @@ class GPU_EXPORT CommandBufferProxy : public gpu::CommandBuffer {
// the task whether the echo succeeds or not.
virtual bool Echo(const base::Closure& callback) = 0;
- // Reparent a command buffer. TODO(apatrick): going forward, the notion of
- // the parent / child relationship between command buffers is going away in
- // favor of the notion of surfaces that can be drawn to in one command buffer
- // and bound as a texture in any other.
- virtual bool SetParent(CommandBufferProxy* parent_command_buffer,
- uint32 parent_texture_id) = 0;
+ // For offscreen contexts, produces the front buffer into a newly created
+ // mailbox.
+ virtual bool ProduceFrontBuffer(const gpu::Mailbox& mailbox) = 0;
virtual void SetChannelErrorCallback(const base::Closure& callback) = 0;