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 |