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

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

Issue 1962493002: Make Mac swap code like other platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 4 years, 7 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
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
(...skipping 25 matching lines...) Expand all
36 36
37 void VulkanBrowserCompositorOutputSurface::Destroy() { 37 void VulkanBrowserCompositorOutputSurface::Destroy() {
38 if (surface_) { 38 if (surface_) {
39 surface_->Destroy(); 39 surface_->Destroy();
40 surface_.reset(); 40 surface_.reset();
41 } 41 }
42 } 42 }
43 43
44 void VulkanBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted( 44 void VulkanBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted(
45 const std::vector<ui::LatencyInfo>& latency_info, 45 const std::vector<ui::LatencyInfo>& latency_info,
46 gfx::SwapResult result) { 46 gfx::SwapResult result,
47 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) {
47 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); 48 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info);
48 OnSwapBuffersComplete(); 49 OnSwapBuffersComplete();
49 } 50 }
50 51
51 void VulkanBrowserCompositorOutputSurface::SwapBuffers( 52 void VulkanBrowserCompositorOutputSurface::SwapBuffers(
52 cc::CompositorFrame* frame) { 53 cc::CompositorFrame* frame) {
53 surface_->SwapBuffers(); 54 surface_->SwapBuffers();
54 PostSwapBuffersComplete(); 55 PostSwapBuffersComplete();
55 client_->DidSwapBuffers(); 56 client_->DidSwapBuffers();
56 } 57 }
57 58
58 } // namespace content 59 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/vulkan_browser_compositor_output_surface.h ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698