OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
6 | 6 |
7 #include "base/process_util.h" | 7 #include "base/process_util.h" |
8 #include "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/common/child_thread.h" | 10 #include "chrome/common/child_thread.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 return 0; | 74 return 0; |
75 } | 75 } |
76 | 76 |
77 bool GpuCommandBufferStub::CreateCompositorWindow() { | 77 bool GpuCommandBufferStub::CreateCompositorWindow() { |
78 DCHECK(handle_ != gfx::kNullPluginWindow); | 78 DCHECK(handle_ != gfx::kNullPluginWindow); |
79 | 79 |
80 // Ask the browser to create the the host window. | 80 // Ask the browser to create the the host window. |
81 ChildThread* gpu_thread = ChildThread::current(); | 81 ChildThread* gpu_thread = ChildThread::current(); |
82 gfx::PluginWindowHandle host_window_id = gfx::kNullPluginWindow; | 82 gfx::PluginWindowHandle host_window_id = gfx::kNullPluginWindow; |
83 gpu_thread->Send(new GpuHostMsg_CreateCompositorHostWindow( | 83 gpu_thread->Send(new GpuHostMsg_GetCompositorHostWindow( |
84 renderer_id_, | 84 renderer_id_, |
85 render_view_id_, | 85 render_view_id_, |
86 &host_window_id)); | 86 &host_window_id)); |
87 if (host_window_id == gfx::kNullPluginWindow) | 87 if (host_window_id == gfx::kNullPluginWindow) |
88 return false; | 88 return false; |
89 HWND host_window = static_cast<HWND>(host_window_id); | 89 HWND host_window = static_cast<HWND>(host_window_id); |
90 | 90 |
91 // Create the compositor window itself. | 91 // Create the compositor window itself. |
92 DCHECK(host_window); | 92 DCHECK(host_window); |
93 static ATOM window_class = 0; | 93 static ATOM window_class = 0; |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 new GpuHostMsg_ResizeXID(handle_, size, &result)); | 375 new GpuHostMsg_ResizeXID(handle_, size, &result)); |
376 #elif defined(OS_WIN) | 376 #elif defined(OS_WIN) |
377 HWND hwnd = static_cast<HWND>(compositor_window_); | 377 HWND hwnd = static_cast<HWND>(compositor_window_); |
378 UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | | 378 UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | |
379 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; | 379 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; |
380 SetWindowPos(hwnd, NULL, 0, 0, size.width(), size.height(), swp_flags); | 380 SetWindowPos(hwnd, NULL, 0, 0, size.width(), size.height(), swp_flags); |
381 #endif | 381 #endif |
382 } | 382 } |
383 | 383 |
384 #endif // ENABLE_GPU | 384 #endif // ENABLE_GPU |
OLD | NEW |