| OLD | NEW |
| 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 "base/threading/thread_task_runner_handle.h" | 7 #include "base/threading/thread_task_runner_handle.h" |
| 8 #include "cc/output/output_surface_client.h" | 8 #include "cc/output/output_surface_client.h" |
| 9 #include "content/browser/renderer_host/render_widget_host_impl.h" | 9 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 10 #include "gpu/vulkan/vulkan_surface.h" | 10 #include "gpu/vulkan/vulkan_surface.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 bool VulkanBrowserCompositorOutputSurface::SurfaceIsSuspendForRecycle() const { | 75 bool VulkanBrowserCompositorOutputSurface::SurfaceIsSuspendForRecycle() const { |
| 76 NOTIMPLEMENTED(); | 76 NOTIMPLEMENTED(); |
| 77 return false; | 77 return false; |
| 78 } | 78 } |
| 79 | 79 |
| 80 void VulkanBrowserCompositorOutputSurface::Reshape( | 80 void VulkanBrowserCompositorOutputSurface::Reshape( |
| 81 const gfx::Size& size, | 81 const gfx::Size& size, |
| 82 float device_scale_factor, | 82 float device_scale_factor, |
| 83 const gfx::ColorSpace& color_space, | 83 const gfx::ColorSpace& color_space, |
| 84 bool has_alpha) { | 84 bool has_alpha, |
| 85 bool use_stencil) { |
| 85 NOTIMPLEMENTED(); | 86 NOTIMPLEMENTED(); |
| 86 } | 87 } |
| 87 | 88 |
| 88 uint32_t | 89 uint32_t |
| 89 VulkanBrowserCompositorOutputSurface::GetFramebufferCopyTextureFormat() { | 90 VulkanBrowserCompositorOutputSurface::GetFramebufferCopyTextureFormat() { |
| 90 NOTIMPLEMENTED(); | 91 NOTIMPLEMENTED(); |
| 91 return 0; | 92 return 0; |
| 92 } | 93 } |
| 93 | 94 |
| 94 void VulkanBrowserCompositorOutputSurface::SwapBuffers( | 95 void VulkanBrowserCompositorOutputSurface::SwapBuffers( |
| 95 cc::OutputSurfaceFrame frame) { | 96 cc::OutputSurfaceFrame frame) { |
| 96 surface_->SwapBuffers(); | 97 surface_->SwapBuffers(); |
| 97 | 98 |
| 98 base::ThreadTaskRunnerHandle::Get()->PostTask( | 99 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 99 FROM_HERE, | 100 FROM_HERE, |
| 100 base::Bind(&VulkanBrowserCompositorOutputSurface::SwapBuffersAck, | 101 base::Bind(&VulkanBrowserCompositorOutputSurface::SwapBuffersAck, |
| 101 weak_ptr_factory_.GetWeakPtr())); | 102 weak_ptr_factory_.GetWeakPtr())); |
| 102 } | 103 } |
| 103 | 104 |
| 104 void VulkanBrowserCompositorOutputSurface::SwapBuffersAck() { | 105 void VulkanBrowserCompositorOutputSurface::SwapBuffersAck() { |
| 105 DCHECK(client_); | 106 DCHECK(client_); |
| 106 client_->DidReceiveSwapBuffersAck(); | 107 client_->DidReceiveSwapBuffersAck(); |
| 107 } | 108 } |
| 108 | 109 |
| 109 } // namespace content | 110 } // namespace content |
| OLD | NEW |