OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CC_OUTPUT_VULKAN_IN_PROCESS_CONTEXT_PROVIDER_H_ | 5 #ifndef CC_OUTPUT_VULKAN_IN_PROCESS_CONTEXT_PROVIDER_H_ |
6 #define CC_OUTPUT_VULKAN_IN_PROCESS_CONTEXT_PROVIDER_H_ | 6 #define CC_OUTPUT_VULKAN_IN_PROCESS_CONTEXT_PROVIDER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include <memory> |
| 9 |
9 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
10 #include "cc/output/vulkan_context_provider.h" | 11 #include "cc/output/vulkan_context_provider.h" |
11 | 12 |
12 namespace gpu { | 13 namespace gpu { |
13 class VulkanDeviceQueue; | 14 class VulkanDeviceQueue; |
14 } | 15 } |
15 | 16 |
16 namespace cc { | 17 namespace cc { |
17 | 18 |
18 class CC_EXPORT VulkanInProcessContextProvider : public VulkanContextProvider { | 19 class CC_EXPORT VulkanInProcessContextProvider : public VulkanContextProvider { |
19 public: | 20 public: |
20 static scoped_refptr<VulkanInProcessContextProvider> Create(); | 21 static scoped_refptr<VulkanInProcessContextProvider> Create(); |
21 | 22 |
22 bool Initialize(); | 23 bool Initialize(); |
23 void Destroy(); | 24 void Destroy(); |
24 | 25 |
25 gpu::VulkanDeviceQueue* GetDeviceQueue() override; | 26 gpu::VulkanDeviceQueue* GetDeviceQueue() override; |
26 | 27 |
27 protected: | 28 protected: |
28 VulkanInProcessContextProvider(); | 29 VulkanInProcessContextProvider(); |
29 ~VulkanInProcessContextProvider() override; | 30 ~VulkanInProcessContextProvider() override; |
30 | 31 |
31 private: | 32 private: |
32 scoped_ptr<gpu::VulkanDeviceQueue> device_queue_; | 33 std::unique_ptr<gpu::VulkanDeviceQueue> device_queue_; |
33 }; | 34 }; |
34 | 35 |
35 } // namespace cc | 36 } // namespace cc |
36 | 37 |
37 #endif // CC_OUTPUT_VULKAN_IN_PROCESS_CONTEXT_PROVIDER_H_ | 38 #endif // CC_OUTPUT_VULKAN_IN_PROCESS_CONTEXT_PROVIDER_H_ |
OLD | NEW |