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

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

Issue 2626413002: Route D3D VSync signal to Compositor (Closed)
Patch Set: Addressed CR feedback Created 3 years, 10 months 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
OLDNEW
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 "gpu/ipc/service/gpu_vsync_provider.h" 5 #include "gpu/ipc/service/gpu_vsync_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 : vsync_worker_(new GpuVSyncWorker(callback, surface_handle)) { 250 : vsync_worker_(new GpuVSyncWorker(callback, surface_handle)) {
251 // Start the thread. 251 // Start the thread.
252 base::Thread::Options options; 252 base::Thread::Options options;
253 // TODO(stanisc): might consider even higher priority - REALTIME_AUDIO. 253 // TODO(stanisc): might consider even higher priority - REALTIME_AUDIO.
254 options.priority = base::ThreadPriority::DISPLAY; 254 options.priority = base::ThreadPriority::DISPLAY;
255 vsync_worker_->StartWithOptions(options); 255 vsync_worker_->StartWithOptions(options);
256 } 256 }
257 257
258 GpuVSyncProvider::~GpuVSyncProvider() = default; 258 GpuVSyncProvider::~GpuVSyncProvider() = default;
259 259
260 void GpuVSyncProvider::EnableVSync(bool enabled) { 260 void GpuVSyncProvider::SetNeedsVSync(bool needs_vsync) {
261 vsync_worker_->Enable(enabled); 261 vsync_worker_->Enable(needs_vsync);
262 } 262 }
263 263
264 } // namespace gpu 264 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698