| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/gpu_surfaceless_browser_compositor_output_s
urface.h" | 5 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s
urface.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
| 10 #include "cc/output/output_surface_client.h" | 10 #include "cc/output/output_surface_client.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 const { | 62 const { |
| 63 return true; | 63 return true; |
| 64 } | 64 } |
| 65 | 65 |
| 66 unsigned GpuSurfacelessBrowserCompositorOutputSurface::GetOverlayTextureId() | 66 unsigned GpuSurfacelessBrowserCompositorOutputSurface::GetOverlayTextureId() |
| 67 const { | 67 const { |
| 68 return buffer_queue_->current_texture_id(); | 68 return buffer_queue_->current_texture_id(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers( | 71 void GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers( |
| 72 cc::CompositorFrame* frame) { | 72 cc::CompositorFrame frame) { |
| 73 DCHECK(buffer_queue_); | 73 DCHECK(buffer_queue_); |
| 74 buffer_queue_->SwapBuffers(frame->gl_frame_data->sub_buffer_rect); | 74 buffer_queue_->SwapBuffers(frame.gl_frame_data->sub_buffer_rect); |
| 75 GpuBrowserCompositorOutputSurface::SwapBuffers(frame); | 75 GpuBrowserCompositorOutputSurface::SwapBuffers(std::move(frame)); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void GpuSurfacelessBrowserCompositorOutputSurface::OnSwapBuffersComplete() { | 78 void GpuSurfacelessBrowserCompositorOutputSurface::OnSwapBuffersComplete() { |
| 79 DCHECK(buffer_queue_); | 79 DCHECK(buffer_queue_); |
| 80 buffer_queue_->PageFlipComplete(); | 80 buffer_queue_->PageFlipComplete(); |
| 81 GpuBrowserCompositorOutputSurface::OnSwapBuffersComplete(); | 81 GpuBrowserCompositorOutputSurface::OnSwapBuffersComplete(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void GpuSurfacelessBrowserCompositorOutputSurface::BindFramebuffer() { | 84 void GpuSurfacelessBrowserCompositorOutputSurface::BindFramebuffer() { |
| 85 DCHECK(buffer_queue_); | 85 DCHECK(buffer_queue_); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 112 buffer_queue_->RecreateBuffers(); | 112 buffer_queue_->RecreateBuffers(); |
| 113 force_swap = true; | 113 force_swap = true; |
| 114 } | 114 } |
| 115 GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted( | 115 GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted( |
| 116 latency_info, result, params_mac); | 116 latency_info, result, params_mac); |
| 117 if (force_swap) | 117 if (force_swap) |
| 118 client_->SetNeedsRedrawRect(gfx::Rect(SurfaceSize())); | 118 client_->SetNeedsRedrawRect(gfx::Rect(SurfaceSize())); |
| 119 } | 119 } |
| 120 | 120 |
| 121 } // namespace content | 121 } // namespace content |
| OLD | NEW |