OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 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/common/gpu/pass_through_image_transport_surface.h" | 5 #include "gpu/ipc/service/pass_through_image_transport_surface.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "content/common/gpu/gpu_command_buffer_stub.h" | 11 #include "gpu/ipc/service/gpu_command_buffer_stub.h" |
12 #include "ui/gfx/vsync_provider.h" | 12 #include "ui/gfx/vsync_provider.h" |
13 #include "ui/gl/gl_context.h" | 13 #include "ui/gl/gl_context.h" |
14 #include "ui/gl/gl_switches.h" | 14 #include "ui/gl/gl_switches.h" |
15 | 15 |
16 namespace content { | 16 namespace gpu { |
17 | 17 |
18 PassThroughImageTransportSurface::PassThroughImageTransportSurface( | 18 PassThroughImageTransportSurface::PassThroughImageTransportSurface( |
19 GpuChannelManager* /* manager */, | 19 GpuChannelManager* /* manager */, |
20 GpuCommandBufferStub* stub, | 20 GpuCommandBufferStub* stub, |
21 gfx::GLSurface* surface) | 21 gfx::GLSurface* surface) |
22 : GLSurfaceAdapter(surface), | 22 : GLSurfaceAdapter(surface), |
23 stub_(stub->AsWeakPtr()), | 23 stub_(stub->AsWeakPtr()), |
24 did_set_swap_interval_(false), | 24 did_set_swap_interval_(false), |
25 weak_ptr_factory_(this) {} | 25 weak_ptr_factory_(this) {} |
26 | 26 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 } | 165 } |
166 | 166 |
167 void PassThroughImageTransportSurface::FinishSwapBuffersAsync( | 167 void PassThroughImageTransportSurface::FinishSwapBuffersAsync( |
168 scoped_ptr<std::vector<ui::LatencyInfo>> latency_info, | 168 scoped_ptr<std::vector<ui::LatencyInfo>> latency_info, |
169 GLSurface::SwapCompletionCallback callback, | 169 GLSurface::SwapCompletionCallback callback, |
170 gfx::SwapResult result) { | 170 gfx::SwapResult result) { |
171 FinishSwapBuffers(std::move(latency_info), result); | 171 FinishSwapBuffers(std::move(latency_info), result); |
172 callback.Run(result); | 172 callback.Run(result); |
173 } | 173 } |
174 | 174 |
175 } // namespace content | 175 } // namespace gpu |
OLD | NEW |