OLD | NEW |
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 Loading... |
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 |
OLD | NEW |