Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3019)

Unified Diff: cc/output/vulkan_derived_context_provider.h

Issue 1892303003: Added the Vulkan Context Provider implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698