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" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/thread_task_runner_handle.h" | 14 #include "base/thread_task_runner_handle.h" |
15 #include "base/threading/simple_thread.h" | 15 #include "base/threading/simple_thread.h" |
16 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
| 17 #include "build/build_config.h" |
17 #include "cc/base/histograms.h" | 18 #include "cc/base/histograms.h" |
18 #include "cc/output/compositor_frame.h" | 19 #include "cc/output/compositor_frame.h" |
19 #include "cc/output/output_surface.h" | 20 #include "cc/output/output_surface.h" |
20 #include "cc/raster/single_thread_task_graph_runner.h" | 21 #include "cc/raster/single_thread_task_graph_runner.h" |
21 #include "cc/raster/task_graph_runner.h" | 22 #include "cc/raster/task_graph_runner.h" |
22 #include "cc/surfaces/onscreen_display_client.h" | 23 #include "cc/surfaces/onscreen_display_client.h" |
23 #include "cc/surfaces/surface_display_output_surface.h" | 24 #include "cc/surfaces/surface_display_output_surface.h" |
24 #include "cc/surfaces/surface_manager.h" | 25 #include "cc/surfaces/surface_manager.h" |
25 #include "content/browser/compositor/browser_compositor_output_surface.h" | 26 #include "content/browser/compositor/browser_compositor_output_surface.h" |
26 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida
tor.h" | 27 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida
tor.h" |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 ImageTransportFactoryObserver, observer_list_, OnLostResources()); | 440 ImageTransportFactoryObserver, observer_list_, OnLostResources()); |
440 | 441 |
441 helper.reset(); | 442 helper.reset(); |
442 DCHECK(!gl_helper_) << "Destroying the GLHelper should not cause a new " | 443 DCHECK(!gl_helper_) << "Destroying the GLHelper should not cause a new " |
443 "GLHelper to be created."; | 444 "GLHelper to be created."; |
444 } | 445 } |
445 } | 446 } |
446 | 447 |
447 bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; } | 448 bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; } |
448 | 449 |
449 uint32 GpuProcessTransportFactory::GetImageTextureTarget( | 450 uint32_t GpuProcessTransportFactory::GetImageTextureTarget( |
450 gfx::BufferFormat format, | 451 gfx::BufferFormat format, |
451 gfx::BufferUsage usage) { | 452 gfx::BufferUsage usage) { |
452 return BrowserGpuMemoryBufferManager::GetImageTextureTarget(format, usage); | 453 return BrowserGpuMemoryBufferManager::GetImageTextureTarget(format, usage); |
453 } | 454 } |
454 | 455 |
455 cc::SharedBitmapManager* GpuProcessTransportFactory::GetSharedBitmapManager() { | 456 cc::SharedBitmapManager* GpuProcessTransportFactory::GetSharedBitmapManager() { |
456 return HostSharedBitmapManager::current(); | 457 return HostSharedBitmapManager::current(); |
457 } | 458 } |
458 | 459 |
459 gpu::GpuMemoryBufferManager* | 460 gpu::GpuMemoryBufferManager* |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, | 658 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, |
658 observer_list_, | 659 observer_list_, |
659 OnLostResources()); | 660 OnLostResources()); |
660 | 661 |
661 // Kill things that use the shared context before killing the shared context. | 662 // Kill things that use the shared context before killing the shared context. |
662 lost_gl_helper.reset(); | 663 lost_gl_helper.reset(); |
663 lost_shared_main_thread_contexts = NULL; | 664 lost_shared_main_thread_contexts = NULL; |
664 } | 665 } |
665 | 666 |
666 } // namespace content | 667 } // namespace content |
OLD | NEW |