OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/compositor/gpu_process_transport_factory.h" | 5 #include "content/browser/compositor/gpu_process_transport_factory.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 "GLHelper to be created."; | 215 "GLHelper to be created."; |
216 } | 216 } |
217 } | 217 } |
218 | 218 |
219 bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; } | 219 bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; } |
220 | 220 |
221 cc::SharedBitmapManager* GpuProcessTransportFactory::GetSharedBitmapManager() { | 221 cc::SharedBitmapManager* GpuProcessTransportFactory::GetSharedBitmapManager() { |
222 return HostSharedBitmapManager::current(); | 222 return HostSharedBitmapManager::current(); |
223 } | 223 } |
224 | 224 |
| 225 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() { |
| 226 return this; |
| 227 } |
| 228 |
225 gfx::GLSurfaceHandle GpuProcessTransportFactory::GetSharedSurfaceHandle() { | 229 gfx::GLSurfaceHandle GpuProcessTransportFactory::GetSharedSurfaceHandle() { |
226 gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle( | 230 gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle( |
227 gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT); | 231 gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT); |
228 handle.parent_client_id = | 232 handle.parent_client_id = |
229 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId(); | 233 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId(); |
230 return handle; | 234 return handle; |
231 } | 235 } |
232 | 236 |
233 GLHelper* GpuProcessTransportFactory::GetGLHelper() { | 237 GLHelper* GpuProcessTransportFactory::GetGLHelper() { |
234 if (!gl_helper_ && !per_compositor_data_.empty()) { | 238 if (!gl_helper_ && !per_compositor_data_.empty()) { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, | 353 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, |
350 observer_list_, | 354 observer_list_, |
351 OnLostResources()); | 355 OnLostResources()); |
352 | 356 |
353 // Kill things that use the shared context before killing the shared context. | 357 // Kill things that use the shared context before killing the shared context. |
354 lost_gl_helper.reset(); | 358 lost_gl_helper.reset(); |
355 lost_shared_main_thread_contexts = NULL; | 359 lost_shared_main_thread_contexts = NULL; |
356 } | 360 } |
357 | 361 |
358 } // namespace content | 362 } // namespace content |
OLD | NEW |