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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/compositor/vulkan_browser_compositor_output_surface.h"
6
7 #include "cc/output/output_surface_client.h"
8 #include "content/browser/renderer_host/render_widget_host_impl.h"
9
10 namespace content {
11
12 VulkanBrowserCompositorOutputSurface::VulkanBrowserCompositorOutputSurface(
13 const scoped_refptr<cc::VulkanContextProvider>& context,
14 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager)
15 : BrowserCompositorOutputSurface(context, vsync_manager) {}
16
17 VulkanBrowserCompositorOutputSurface::~VulkanBrowserCompositorOutputSurface() {}
18
19 void VulkanBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted(
20 const std::vector<ui::LatencyInfo>& latency_info,
21 gfx::SwapResult result) {
22 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info);
23 OnSwapBuffersComplete();
24 }
25
26 void VulkanBrowserCompositorOutputSurface::SwapBuffers(
27 cc::CompositorFrame* frame) {
28 vulkan_context_provider()->SwapBuffers();
29 PostSwapBuffersComplete();
30 client_->DidSwapBuffers();
31 }
32
33 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698