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

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: Some final cleanup before review. 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
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 930f6f57a09b78c096b5561027e1504650a9cb6d..3a75dc866055f77a4098b8641536949679a3810b 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) {

Powered by Google App Engine
This is Rietveld 408576698