| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| 11 #include "cc/output/vulkan_context_provider.h" | 11 #include "cc/output/vulkan_context_provider.h" |
| 12 #include "gpu/vulkan/features.h" | |
| 13 | 12 |
| 14 namespace gpu { | 13 namespace gpu { |
| 15 class VulkanDeviceQueue; | 14 class VulkanDeviceQueue; |
| 16 } | 15 } |
| 17 | 16 |
| 18 namespace cc { | 17 namespace cc { |
| 19 | 18 |
| 20 class CC_EXPORT VulkanInProcessContextProvider : public VulkanContextProvider { | 19 class CC_EXPORT VulkanInProcessContextProvider : public VulkanContextProvider { |
| 21 public: | 20 public: |
| 22 static scoped_refptr<VulkanInProcessContextProvider> Create(); | 21 static scoped_refptr<VulkanInProcessContextProvider> Create(); |
| 23 | 22 |
| 24 bool Initialize(); | 23 bool Initialize(); |
| 25 void Destroy(); | 24 void Destroy(); |
| 26 | 25 |
| 27 // VulkanContextProvider implementation | 26 // VulkanContextProvider implementation |
| 28 gpu::VulkanDeviceQueue* GetDeviceQueue() override; | 27 gpu::VulkanDeviceQueue* GetDeviceQueue() override; |
| 29 | 28 |
| 30 protected: | 29 protected: |
| 31 VulkanInProcessContextProvider(); | 30 VulkanInProcessContextProvider(); |
| 32 ~VulkanInProcessContextProvider() override; | 31 ~VulkanInProcessContextProvider() override; |
| 33 | 32 |
| 34 private: | 33 private: |
| 35 #if BUILDFLAG(ENABLE_VULKAN) | 34 #if defined(ENABLE_VULKAN) |
| 36 std::unique_ptr<gpu::VulkanDeviceQueue> device_queue_; | 35 std::unique_ptr<gpu::VulkanDeviceQueue> device_queue_; |
| 37 #endif | 36 #endif |
| 38 | 37 |
| 39 DISALLOW_COPY_AND_ASSIGN(VulkanInProcessContextProvider); | 38 DISALLOW_COPY_AND_ASSIGN(VulkanInProcessContextProvider); |
| 40 }; | 39 }; |
| 41 | 40 |
| 42 } // namespace cc | 41 } // namespace cc |
| 43 | 42 |
| 44 #endif // CC_OUTPUT_VULKAN_IN_PROCESS_CONTEXT_PROVIDER_H_ | 43 #endif // CC_OUTPUT_VULKAN_IN_PROCESS_CONTEXT_PROVIDER_H_ |
| OLD | NEW |