| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_ | 5 #ifndef CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_ |
| 6 #define CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_ | 6 #define CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
| 11 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 12 #include "content/common/in_process_child_thread_params.h" | 13 #include "content/common/in_process_child_thread_params.h" |
| 13 #include "gpu/command_buffer/service/gpu_preferences.h" | 14 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 14 | 15 |
| 15 namespace gpu { | 16 namespace gpu { |
| 16 class GpuMemoryBufferFactory; | 17 class GpuMemoryBufferFactory; |
| 17 class SyncPointManager; | 18 class SyncPointManager; |
| 18 struct GpuPreferences; | 19 struct GpuPreferences; |
| 19 } | 20 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 37 | 38 |
| 38 private: | 39 private: |
| 39 InProcessChildThreadParams params_; | 40 InProcessChildThreadParams params_; |
| 40 | 41 |
| 41 // Deleted in CleanUp() on the gpu thread, so don't use smart pointers. | 42 // Deleted in CleanUp() on the gpu thread, so don't use smart pointers. |
| 42 GpuProcess* gpu_process_; | 43 GpuProcess* gpu_process_; |
| 43 | 44 |
| 44 const gpu::GpuPreferences gpu_preferences_; | 45 const gpu::GpuPreferences gpu_preferences_; |
| 45 | 46 |
| 46 // Can be null if overridden. | 47 // Can be null if overridden. |
| 47 scoped_ptr<gpu::SyncPointManager> sync_point_manager_; | 48 std::unique_ptr<gpu::SyncPointManager> sync_point_manager_; |
| 48 | 49 |
| 49 // Non-owning. | 50 // Non-owning. |
| 50 gpu::SyncPointManager* sync_point_manager_override_; | 51 gpu::SyncPointManager* sync_point_manager_override_; |
| 51 | 52 |
| 52 scoped_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_; | 53 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_; |
| 53 | 54 |
| 54 DISALLOW_COPY_AND_ASSIGN(InProcessGpuThread); | 55 DISALLOW_COPY_AND_ASSIGN(InProcessGpuThread); |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 CONTENT_EXPORT base::Thread* CreateInProcessGpuThread( | 58 CONTENT_EXPORT base::Thread* CreateInProcessGpuThread( |
| 58 const InProcessChildThreadParams& params, | 59 const InProcessChildThreadParams& params, |
| 59 const gpu::GpuPreferences& gpu_preferences); | 60 const gpu::GpuPreferences& gpu_preferences); |
| 60 | 61 |
| 61 } // namespace content | 62 } // namespace content |
| 62 | 63 |
| 63 #endif // CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_ | 64 #endif // CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_ |
| OLD | NEW |