OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/gpu/gpu_process_host.h" | 5 #include "content/browser/gpu/gpu_process_host.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 route_id, | 116 route_id, |
117 alive)); | 117 alive)); |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 } // anonymous namespace | 121 } // anonymous namespace |
122 | 122 |
123 #if defined(TOOLKIT_GTK) | 123 #if defined(TOOLKIT_GTK) |
124 // Used to put a lock on surfaces so that the window to which the GPU | 124 // Used to put a lock on surfaces so that the window to which the GPU |
125 // process is drawing to doesn't disappear while it is drawing when | 125 // process is drawing to doesn't disappear while it is drawing when |
126 // a tab is closed. | 126 // a WebContents is closed. |
127 class GpuProcessHost::SurfaceRef { | 127 class GpuProcessHost::SurfaceRef { |
128 public: | 128 public: |
129 explicit SurfaceRef(gfx::PluginWindowHandle surface); | 129 explicit SurfaceRef(gfx::PluginWindowHandle surface); |
130 ~SurfaceRef(); | 130 ~SurfaceRef(); |
131 private: | 131 private: |
132 gfx::PluginWindowHandle surface_; | 132 gfx::PluginWindowHandle surface_; |
133 }; | 133 }; |
134 | 134 |
135 GpuProcessHost::SurfaceRef::SurfaceRef(gfx::PluginWindowHandle surface) | 135 GpuProcessHost::SurfaceRef::SurfaceRef(gfx::PluginWindowHandle surface) |
136 : surface_(surface) { | 136 : surface_(surface) { |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 const IPC::ChannelHandle& channel_handle, | 746 const IPC::ChannelHandle& channel_handle, |
747 base::ProcessHandle renderer_process_for_gpu, | 747 base::ProcessHandle renderer_process_for_gpu, |
748 const content::GPUInfo& gpu_info) { | 748 const content::GPUInfo& gpu_info) { |
749 callback.Run(channel_handle, gpu_info); | 749 callback.Run(channel_handle, gpu_info); |
750 } | 750 } |
751 | 751 |
752 void GpuProcessHost::CreateCommandBufferError( | 752 void GpuProcessHost::CreateCommandBufferError( |
753 const CreateCommandBufferCallback& callback, int32 route_id) { | 753 const CreateCommandBufferCallback& callback, int32 route_id) { |
754 callback.Run(route_id); | 754 callback.Run(route_id); |
755 } | 755 } |
OLD | NEW |