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

Unified Diff: content/common/gpu/gpu_channel.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/common/gpu/gpu_channel.cc
===================================================================
--- content/common/gpu/gpu_channel.cc (revision 89700)
+++ content/common/gpu/gpu_channel.cc (working copy)
@@ -151,9 +151,9 @@
#if defined(ENABLE_GPU)
*route_id = GenerateRouteID();
scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub(
- this, window, NULL, gfx::Size(), disallowed_extensions_,
+ this, window, gfx::Size(), disallowed_extensions_,
init_params.allowed_extensions,
- init_params.attribs, 0, *route_id, renderer_id_, render_view_id,
+ init_params.attribs, *route_id, renderer_id_, render_view_id,
watchdog_));
router_.AddRoute(*route_id, stub.get());
stubs_.AddWithID(stub.release(), *route_id);
@@ -168,6 +168,10 @@
stub->ViewResized();
}
+GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) {
+ return stubs_.Lookup(route_id);
+}
+
#if defined(OS_MACOSX)
void GpuChannel::AcceleratedSurfaceBuffersSwapped(
int32 route_id, uint64 swap_buffers_count) {
@@ -231,27 +235,20 @@
}
void GpuChannel::OnCreateOffscreenCommandBuffer(
- int32 parent_route_id,
const gfx::Size& size,
const GPUCreateCommandBufferConfig& init_params,
- uint32 parent_texture_id,
int32* route_id) {
content::GetContentClient()->SetActiveURL(init_params.active_url);
#if defined(ENABLE_GPU)
*route_id = GenerateRouteID();
- GpuCommandBufferStub* parent_stub = NULL;
- if (parent_route_id != 0)
- parent_stub = stubs_.Lookup(parent_route_id);
scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub(
this,
gfx::kNullPluginWindow,
- parent_stub,
size,
disallowed_extensions_,
init_params.allowed_extensions,
init_params.attribs,
- parent_texture_id,
*route_id,
0, 0, watchdog_));
router_.AddRoute(*route_id, stub.get());

Powered by Google App Engine
This is Rietveld 408576698