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

Side by Side Diff: gpu/ipc/service/pass_through_image_transport_surface.cc

Issue 2499703002: gpu: Fix Mac fullscreen video (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "gpu/ipc/service/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"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 void PassThroughImageTransportSurface::SetLatencyInfo( 136 void PassThroughImageTransportSurface::SetLatencyInfo(
137 const std::vector<ui::LatencyInfo>& latency_info) { 137 const std::vector<ui::LatencyInfo>& latency_info) {
138 latency_info_.insert(latency_info_.end(), latency_info.begin(), 138 latency_info_.insert(latency_info_.end(), latency_info.begin(),
139 latency_info.end()); 139 latency_info.end());
140 } 140 }
141 141
142 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() { 142 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() {
143 gfx::VSyncProvider* vsync_provider = GetVSyncProvider(); 143 gfx::VSyncProvider* vsync_provider = GetVSyncProvider();
144 if (vsync_provider) { 144 if (vsync_provider) {
145 // PassThroughImageTransportSurface owns the VSyncProvider and will
146 // outlive it. Thus, base::Unretained is safe here.
147 vsync_provider->GetVSyncParameters(base::Bind( 145 vsync_provider->GetVSyncParameters(base::Bind(
148 &ImageTransportSurfaceDelegate::UpdateVSyncParameters, delegate_)); 146 &ImageTransportSurfaceDelegate::UpdateVSyncParameters, delegate_));
149 } 147 }
150 } 148 }
151 149
152 std::unique_ptr<std::vector<ui::LatencyInfo>> 150 std::unique_ptr<std::vector<ui::LatencyInfo>>
153 PassThroughImageTransportSurface::StartSwapBuffers() { 151 PassThroughImageTransportSurface::StartSwapBuffers() {
154 // GetVsyncValues before SwapBuffers to work around Mali driver bug: 152 // GetVsyncValues before SwapBuffers to work around Mali driver bug:
155 // crbug.com/223558. 153 // crbug.com/223558.
156 SendVSyncUpdateIfAvailable(); 154 SendVSyncUpdateIfAvailable();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 186
189 void PassThroughImageTransportSurface::FinishSwapBuffersAsync( 187 void PassThroughImageTransportSurface::FinishSwapBuffersAsync(
190 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info, 188 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info,
191 GLSurface::SwapCompletionCallback callback, 189 GLSurface::SwapCompletionCallback callback,
192 gfx::SwapResult result) { 190 gfx::SwapResult result) {
193 FinishSwapBuffers(std::move(latency_info), result); 191 FinishSwapBuffers(std::move(latency_info), result);
194 callback.Run(result); 192 callback.Run(result);
195 } 193 }
196 194
197 } // namespace gpu 195 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698