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

Unified Diff: chrome/gpu/gpu_command_buffer_stub.cc

Issue 6343006: Route IPC through browser when creating a viewable command buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 9 years, 11 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.cc ('k') | chrome/gpu/gpu_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_command_buffer_stub.cc
diff --git a/chrome/gpu/gpu_command_buffer_stub.cc b/chrome/gpu/gpu_command_buffer_stub.cc
index 43a1be50335c9d6e58cba968b89536f6a43dd720..3a832441cb694337590f3f32dad65c5dcd49dee8 100644
--- a/chrome/gpu/gpu_command_buffer_stub.cc
+++ b/chrome/gpu/gpu_command_buffer_stub.cc
@@ -80,17 +80,7 @@ static LRESULT CALLBACK CompositorWindowProc(
bool GpuCommandBufferStub::CreateCompositorWindow() {
DCHECK(handle_ != gfx::kNullPluginWindow);
-
- // Ask the browser to create the the host window.
- GpuThread* gpu_thread = channel_->gpu_thread();
- gfx::PluginWindowHandle host_window_id = gfx::kNullPluginWindow;
- gpu_thread->Send(new GpuHostMsg_GetCompositorHostWindow(
- renderer_id_,
- render_view_id_,
- &host_window_id));
- if (host_window_id == gfx::kNullPluginWindow)
- return false;
- HWND host_window = static_cast<HWND>(host_window_id);
+ HWND host_window = static_cast<HWND>(handle_);
// Create the compositor window itself.
DCHECK(host_window);
@@ -163,11 +153,11 @@ GpuCommandBufferStub::~GpuCommandBufferStub() {
DestroyWindow(static_cast<HWND>(compositor_window_));
compositor_window_ = NULL;
}
-#elif defined(OS_LINUX)
- GpuThread* gpu_thread = channel_->gpu_thread();
- gpu_thread->Send(
- new GpuHostMsg_ReleaseXID(handle_));
#endif // defined(OS_WIN)
+
+ GpuThread* gpu_thread = channel_->gpu_thread();
+ gpu_thread->Send(new GpuHostMsg_DestroyCommandBuffer(
+ handle_, renderer_id_, render_view_id_));
}
bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
« no previous file with comments | « chrome/gpu/gpu_channel.cc ('k') | chrome/gpu/gpu_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698