| 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/software_browser_compositor_output_surface.
h" | 5 #include "content/browser/compositor/software_browser_compositor_output_surface.
h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 void SoftwareBrowserCompositorOutputSurface::BindFramebuffer() { | 52 void SoftwareBrowserCompositorOutputSurface::BindFramebuffer() { |
| 53 // Not used for software surfaces. | 53 // Not used for software surfaces. |
| 54 NOTREACHED(); | 54 NOTREACHED(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void SoftwareBrowserCompositorOutputSurface::Reshape( | 57 void SoftwareBrowserCompositorOutputSurface::Reshape( |
| 58 const gfx::Size& size, | 58 const gfx::Size& size, |
| 59 float device_scale_factor, | 59 float device_scale_factor, |
| 60 const gfx::ColorSpace& color_space, | 60 const gfx::ColorSpace& color_space, |
| 61 bool has_alpha) { | 61 bool has_alpha, |
| 62 bool use_stencil) { |
| 62 software_device()->Resize(size, device_scale_factor); | 63 software_device()->Resize(size, device_scale_factor); |
| 63 } | 64 } |
| 64 | 65 |
| 65 void SoftwareBrowserCompositorOutputSurface::SwapBuffers( | 66 void SoftwareBrowserCompositorOutputSurface::SwapBuffers( |
| 66 cc::OutputSurfaceFrame frame) { | 67 cc::OutputSurfaceFrame frame) { |
| 67 DCHECK(client_); | 68 DCHECK(client_); |
| 68 base::TimeTicks swap_time = base::TimeTicks::Now(); | 69 base::TimeTicks swap_time = base::TimeTicks::Now(); |
| 69 for (auto& latency : frame.latency_info) { | 70 for (auto& latency : frame.latency_info) { |
| 70 latency.AddLatencyNumberWithTimestamp( | 71 latency.AddLatencyNumberWithTimestamp( |
| 71 ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0, swap_time, 1); | 72 ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0, swap_time, 1); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return 0; | 112 return 0; |
| 112 } | 113 } |
| 113 | 114 |
| 114 #if defined(OS_MACOSX) | 115 #if defined(OS_MACOSX) |
| 115 void SoftwareBrowserCompositorOutputSurface::SetSurfaceSuspendedForRecycle( | 116 void SoftwareBrowserCompositorOutputSurface::SetSurfaceSuspendedForRecycle( |
| 116 bool suspended) { | 117 bool suspended) { |
| 117 } | 118 } |
| 118 #endif | 119 #endif |
| 119 | 120 |
| 120 } // namespace content | 121 } // namespace content |
| OLD | NEW |