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

Unified Diff: content/renderer/gpu/command_buffer_proxy.cc

Issue 7205012: RendererGLContext supports reparenting a GL context. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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: content/renderer/gpu/command_buffer_proxy.cc
===================================================================
--- content/renderer/gpu/command_buffer_proxy.cc (revision 89700)
+++ content/renderer/gpu/command_buffer_proxy.cc (working copy)
@@ -332,6 +332,33 @@
swap_buffers_callback_->Run();
}
+bool CommandBufferProxy::SetParent(CommandBufferProxy* parent_command_buffer,
+ uint32 parent_texture_id) {
+ if (last_state_.error != gpu::error::kNoError)
+ return false;
+
+ bool result;
+ if (parent_command_buffer) {
+ if (!Send(new GpuCommandBufferMsg_SetParent(
+ route_id_,
+ parent_command_buffer->route_id_,
+ parent_texture_id,
+ &result))) {
+ return false;
+ }
+ } else {
+ if (!Send(new GpuCommandBufferMsg_SetParent(
+ route_id_,
+ MSG_ROUTING_NONE,
+ 0,
+ &result))) {
+ return false;
+ }
+ }
+
+ return result;
+}
+
void CommandBufferProxy::SetSwapBuffersCallback(Callback0::Type* callback) {
swap_buffers_callback_.reset(callback);
}

Powered by Google App Engine
This is Rietveld 408576698