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

Side by Side Diff: content/browser/compositor/vulkan_browser_compositor_output_surface.cc

Issue 1903523004: The display can now create a Vulkan Renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vulkan_context_surface
Patch Set: Export VulkanRenderer 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
« no previous file with comments | « content/browser/compositor/vulkan_browser_compositor_output_surface.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/compositor/vulkan_browser_compositor_output_surface.h" 5 #include "content/browser/compositor/vulkan_browser_compositor_output_surface.h"
6 6
7 #include "cc/output/output_surface_client.h" 7 #include "cc/output/output_surface_client.h"
8 #include "content/browser/renderer_host/render_widget_host_impl.h" 8 #include "content/browser/renderer_host/render_widget_host_impl.h"
9 #include "gpu/vulkan/vulkan_surface.h" 9 #include "gpu/vulkan/vulkan_surface.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 VulkanBrowserCompositorOutputSurface::VulkanBrowserCompositorOutputSurface( 13 VulkanBrowserCompositorOutputSurface::VulkanBrowserCompositorOutputSurface(
14 const scoped_refptr<cc::VulkanContextProvider>& context, 14 const scoped_refptr<cc::VulkanContextProvider>& context,
15 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager) 15 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
16 : BrowserCompositorOutputSurface(context, vsync_manager) {} 16 base::SingleThreadTaskRunner* task_runner)
17 : BrowserCompositorOutputSurface(context, vsync_manager, task_runner) {}
17 18
18 VulkanBrowserCompositorOutputSurface::~VulkanBrowserCompositorOutputSurface() { 19 VulkanBrowserCompositorOutputSurface::~VulkanBrowserCompositorOutputSurface() {
19 DCHECK(!surface_); 20 DCHECK(!surface_);
20 } 21 }
21 22
22 bool VulkanBrowserCompositorOutputSurface::Initialize( 23 bool VulkanBrowserCompositorOutputSurface::Initialize(
23 gfx::AcceleratedWidget widget) { 24 gfx::AcceleratedWidget widget) {
24 DCHECK(!surface_); 25 DCHECK(!surface_);
25 std::unique_ptr<gpu::VulkanSurface> surface( 26 std::unique_ptr<gpu::VulkanSurface> surface(
26 gpu::VulkanSurface::CreateViewSurface(widget)); 27 gpu::VulkanSurface::CreateViewSurface(widget));
(...skipping 21 matching lines...) Expand all
48 } 49 }
49 50
50 void VulkanBrowserCompositorOutputSurface::SwapBuffers( 51 void VulkanBrowserCompositorOutputSurface::SwapBuffers(
51 cc::CompositorFrame* frame) { 52 cc::CompositorFrame* frame) {
52 surface_->SwapBuffers(); 53 surface_->SwapBuffers();
53 PostSwapBuffersComplete(); 54 PostSwapBuffersComplete();
54 client_->DidSwapBuffers(); 55 client_->DidSwapBuffers();
55 } 56 }
56 57
57 } // namespace content 58 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/vulkan_browser_compositor_output_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698