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

Unified Diff: chrome/gpu/gpu_channel.cc

Issue 3067026: Initial port of accelerated compositor to Mac OS X 10.6. Reused... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | « chrome/gpu/gpu_channel.h ('k') | chrome/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_channel.cc
===================================================================
--- chrome/gpu/gpu_channel.cc (revision 54820)
+++ chrome/gpu/gpu_channel.cc (working copy)
@@ -100,6 +100,7 @@
}
void GpuChannel::OnCreateViewCommandBuffer(gfx::NativeViewId view_id,
+ int32 render_view_id,
int32* route_id) {
*route_id = 0;
@@ -124,6 +125,13 @@
// alternative would be to add a socket/plug pair like with plugins but that
// has issues with events and focus.
gpu_thread->Send(new GpuHostMsg_GetViewXID(view_id, &handle));
+#elif defined(OS_MACOSX)
+ // On Mac OS X we currently pass a (fake) PluginWindowHandle for the
+ // NativeViewId. We could allocate fake NativeViewIds on the browser
+ // side as well, and map between those and PluginWindowHandles, but
+ // this seems excessive.
+ handle = static_cast<gfx::PluginWindowHandle>(
+ static_cast<intptr_t>(view_id));
#else
// TODO(apatrick): This needs to be something valid for mac and linux.
// Offscreen rendering will work on these platforms but not rendering to the
@@ -133,7 +141,8 @@
*route_id = GenerateRouteID();
scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub(
- this, handle, NULL, gfx::Size(), 0, *route_id));
+ this, handle, NULL, gfx::Size(), 0, *route_id,
+ renderer_id_, render_view_id));
router_.AddRoute(*route_id, stub.get());
stubs_.AddWithID(stub.release(), *route_id);
#endif // ENABLE_GPU
@@ -155,7 +164,8 @@
parent_stub,
size,
parent_texture_id,
- *route_id));
+ *route_id,
+ 0, 0));
router_.AddRoute(*route_id, stub.get());
stubs_.AddWithID(stub.release(), *route_id);
#else
« no previous file with comments | « chrome/gpu/gpu_channel.h ('k') | chrome/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698