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

Unified Diff: gpu/ipc/service/gpu_vsync_provider.h

Issue 2681033011: Changed GpuVSyncProvider to implement gfx::VSyncProvider (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | gpu/ipc/service/gpu_vsync_provider_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_vsync_provider.h
diff --git a/gpu/ipc/service/gpu_vsync_provider.h b/gpu/ipc/service/gpu_vsync_provider.h
deleted file mode 100644
index 13d0ac210a1fc96b1961e0c94bee62039e3e6f32..0000000000000000000000000000000000000000
--- a/gpu/ipc/service/gpu_vsync_provider.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_H_
-#define GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_H_
-
-#include <memory>
-
-#include "base/callback.h"
-#include "base/time/time.h"
-#include "gpu/gpu_export.h"
-#include "gpu/ipc/common/surface_handle.h"
-
-namespace gpu {
-
-class GpuVSyncWorker;
-
-// Implements waiting for VSync signal on background thread.
-class GPU_EXPORT GpuVSyncProvider {
- public:
- // Once VSync is enabled, this callback is repeatedly invoked on every VSync.
- // The call is made on background thread to avoid increased latency due to
- // serializing callback invocation with other GPU tasks. The code that
- // implements the callback function is expected to handle that.
- using VSyncCallback = base::Callback<void(base::TimeTicks timestamp)>;
-
- ~GpuVSyncProvider();
-
- static std::unique_ptr<GpuVSyncProvider> Create(const VSyncCallback& callback,
- SurfaceHandle surface_handle);
-
- // Enable or disable VSync production.
- void EnableVSync(bool enabled);
-
- private:
-#if defined(OS_WIN)
- GpuVSyncProvider(const VSyncCallback& callback, SurfaceHandle surface_handle);
-
- std::unique_ptr<GpuVSyncWorker> vsync_worker_;
-#endif // defined(OS_WIN)
-
- DISALLOW_COPY_AND_ASSIGN(GpuVSyncProvider);
-};
-
-} // namespace gpu
-
-#endif // GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_H_
« no previous file with comments | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | gpu/ipc/service/gpu_vsync_provider_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698