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 #include "chrome/gpu/gpu_thread.h" | 5 #include "chrome/gpu/gpu_thread.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/common/child_process.h" | 8 #include "chrome/common/child_process.h" |
9 #include "chrome/common/gpu_messages.h" | 9 #include "chrome/common/gpu_messages.h" |
10 #include "chrome/gpu/gpu_config.h" | 10 #include "chrome/gpu/gpu_config.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // On POSIX, pass the renderer-side FD. Also mark it as auto-close so that | 74 // On POSIX, pass the renderer-side FD. Also mark it as auto-close so that |
75 // it gets closed after it has been sent. | 75 // it gets closed after it has been sent. |
76 int renderer_fd = channel->DisownRendererFd(); | 76 int renderer_fd = channel->DisownRendererFd(); |
77 channel_handle.socket = base::FileDescriptor(renderer_fd, true); | 77 channel_handle.socket = base::FileDescriptor(renderer_fd, true); |
78 #endif | 78 #endif |
79 } | 79 } |
80 | 80 |
81 Send(new GpuHostMsg_ChannelEstablished(channel_handle)); | 81 Send(new GpuHostMsg_ChannelEstablished(channel_handle)); |
82 } | 82 } |
83 | 83 |
84 void GpuThread::OnSynchronize(int renderer_id) { | 84 void GpuThread::OnSynchronize() { |
85 Send(new GpuHostMsg_SynchronizeReply(renderer_id)); | 85 Send(new GpuHostMsg_SynchronizeReply()); |
86 } | 86 } |
87 | 87 |
88 void GpuThread::OnNewRenderWidgetHostView(GpuNativeWindowHandle parent_window, | 88 void GpuThread::OnNewRenderWidgetHostView(GpuNativeWindowHandle parent_window, |
89 int32 routing_id) { | 89 int32 routing_id) { |
90 // The GPUView class' lifetime is controlled by the host, which will send a | 90 // The GPUView class' lifetime is controlled by the host, which will send a |
91 // message to destroy the GpuRWHView when necessary. So we don't manage the | 91 // message to destroy the GpuRWHView when necessary. So we don't manage the |
92 // lifetime of this object. | 92 // lifetime of this object. |
93 #if defined(OS_WIN) | 93 #if defined(OS_WIN) |
94 new GpuViewWin(this, parent_window, routing_id); | 94 new GpuViewWin(this, parent_window, routing_id); |
95 #elif defined(GPU_USE_GLX) | 95 #elif defined(GPU_USE_GLX) |
96 new GpuViewX(this, parent_window, routing_id); | 96 new GpuViewX(this, parent_window, routing_id); |
97 #else | 97 #else |
98 NOTIMPLEMENTED(); | 98 NOTIMPLEMENTED(); |
99 #endif | 99 #endif |
100 } | 100 } |
OLD | NEW |