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

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

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: content/browser/compositor/vulkan_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/vulkan_browser_compositor_output_surface.cc b/content/browser/compositor/vulkan_browser_compositor_output_surface.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4a4c22b2ac5be365223accd8e4ef1456d851bdfc
--- /dev/null
+++ b/content/browser/compositor/vulkan_browser_compositor_output_surface.cc
@@ -0,0 +1,33 @@
+// 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.
+
+#include "content/browser/compositor/vulkan_browser_compositor_output_surface.h"
+
+#include "cc/output/output_surface_client.h"
+#include "content/browser/renderer_host/render_widget_host_impl.h"
+
+namespace content {
+
+VulkanBrowserCompositorOutputSurface::VulkanBrowserCompositorOutputSurface(
+ const scoped_refptr<cc::VulkanContextProvider>& context,
+ const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager)
+ : BrowserCompositorOutputSurface(context, vsync_manager) {}
+
+VulkanBrowserCompositorOutputSurface::~VulkanBrowserCompositorOutputSurface() {}
+
+void VulkanBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted(
+ const std::vector<ui::LatencyInfo>& latency_info,
+ gfx::SwapResult result) {
+ RenderWidgetHostImpl::CompositorFrameDrawn(latency_info);
+ OnSwapBuffersComplete();
+}
+
+void VulkanBrowserCompositorOutputSurface::SwapBuffers(
+ cc::CompositorFrame* frame) {
+ vulkan_context_provider()->SwapBuffers();
+ PostSwapBuffersComplete();
+ client_->DidSwapBuffers();
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698