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

Unified Diff: content/browser/compositor/vulkan_browser_compositor_output_surface.h

Issue 1892303003: Added the Vulkan Context Provider implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Export VulkanContextProvider 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: content/browser/compositor/vulkan_browser_compositor_output_surface.h
diff --git a/content/browser/compositor/vulkan_browser_compositor_output_surface.h b/content/browser/compositor/vulkan_browser_compositor_output_surface.h
new file mode 100644
index 0000000000000000000000000000000000000000..83acc880ed751a43eb1a15ea41cb05a6c4fe3517
--- /dev/null
+++ b/content/browser/compositor/vulkan_browser_compositor_output_surface.h
@@ -0,0 +1,49 @@
+// Copyright (c) 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 CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
+#define CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "content/browser/compositor/browser_compositor_output_surface.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace gpu {
+class VulkanSurface;
+}
+
+namespace content {
+
+class VulkanBrowserCompositorOutputSurface
+ : public BrowserCompositorOutputSurface {
+ public:
+ VulkanBrowserCompositorOutputSurface(
+ const scoped_refptr<cc::VulkanContextProvider>& context,
+ const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager);
+
+ ~VulkanBrowserCompositorOutputSurface() override;
+
+ bool Initialize(gfx::AcceleratedWidget widget);
+ void Destroy();
+
+ // BrowserCompositorOutputSurface implementation.
+ void OnGpuSwapBuffersCompleted(
+ const std::vector<ui::LatencyInfo>& latency_info,
+ gfx::SwapResult result) override;
+
+ protected:
+ // cc::OutputSurface implementation.
+ void SwapBuffers(cc::CompositorFrame* frame) override;
+
+ private:
+ std::unique_ptr<gpu::VulkanSurface> surface_;
+
+ DISALLOW_COPY_AND_ASSIGN(VulkanBrowserCompositorOutputSurface);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_

Powered by Google App Engine
This is Rietveld 408576698