Chromium Code Reviews| Index: cc/output/vulkan_derived_context_provider.h |
| diff --git a/cc/output/vulkan_derived_context_provider.h b/cc/output/vulkan_derived_context_provider.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..67ea97848a406d6d3fbf798e52fbd5a9d52c11b6 |
| --- /dev/null |
| +++ b/cc/output/vulkan_derived_context_provider.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CC_OUTPUT_VULKAN_DERIVED_CONTEXT_PROVIDER_H_ |
| +#define CC_OUTPUT_VULKAN_DERIVED_CONTEXT_PROVIDER_H_ |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "cc/base/cc_export.h" |
| +#include "cc/output/vulkan_context_provider.h" |
| +#include "ui/gfx/native_widget_types.h" |
| + |
| +namespace gpu { |
| +class VulkanDeviceQueue; |
| +class VulkanSurface; |
| +} |
| + |
| +namespace cc { |
| + |
| +class CC_EXPORT VulkanDerivedContextProvider : public VulkanContextProvider { |
|
piman
2016/04/19 01:36:42
I don't think this class is that useful. cc won't
David Yen
2016/04/19 22:20:27
Ok. I have removed VulkanDerivedContextProvider an
|
| + public: |
| + static scoped_refptr<VulkanDerivedContextProvider> Create( |
| + scoped_refptr<VulkanContextProvider> parent_context_provider, |
| + gfx::AcceleratedWidget widget); |
| + |
| + bool Initialize(); |
| + void Destroy(); |
| + |
| + gpu::VulkanDeviceQueue* GetDeviceQueue() override; |
| + void SwapBuffers() override; |
| + |
| + protected: |
| + VulkanDerivedContextProvider( |
| + scoped_refptr<VulkanContextProvider> parent_context_provider, |
| + gfx::AcceleratedWidget widget); |
| + ~VulkanDerivedContextProvider() override; |
| + |
| + private: |
| + scoped_refptr<VulkanContextProvider> parent_context_provider_; |
| + scoped_ptr<gpu::VulkanSurface> surface_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(VulkanDerivedContextProvider); |
| +}; |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_OUTPUT_VULKAN_DERIVED_CONTEXT_PROVIDER_H_ |