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

Side by Side Diff: gpu/ipc/service/gpu_vsync_provider.h

Issue 2626413002: Route D3D VSync signal to Compositor (Closed)
Patch Set: Addressed CR feedback Created 3 years, 11 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 #ifndef GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_H_ 5 #ifndef GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_H_
6 #define GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_H_ 6 #define GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 12 matching lines...) Expand all
23 // The call is made on background thread to avoid increased latency due to 23 // The call is made on background thread to avoid increased latency due to
24 // serializing callback invocation with other GPU tasks. The code that 24 // serializing callback invocation with other GPU tasks. The code that
25 // implements the callback function is expected to handle that. 25 // implements the callback function is expected to handle that.
26 using VSyncCallback = base::Callback<void(base::TimeTicks timestamp)>; 26 using VSyncCallback = base::Callback<void(base::TimeTicks timestamp)>;
27 27
28 ~GpuVSyncProvider(); 28 ~GpuVSyncProvider();
29 29
30 static std::unique_ptr<GpuVSyncProvider> Create(const VSyncCallback& callback, 30 static std::unique_ptr<GpuVSyncProvider> Create(const VSyncCallback& callback,
31 SurfaceHandle surface_handle); 31 SurfaceHandle surface_handle);
32 32
33 // Enable or disable VSync production. 33 // Start or stop VSync production.
34 void EnableVSync(bool enabled); 34 void SetNeedsVSync(bool needs_vsync);
35 35
36 private: 36 private:
37 #if defined(OS_WIN) 37 #if defined(OS_WIN)
38 GpuVSyncProvider(const VSyncCallback& callback, SurfaceHandle surface_handle); 38 GpuVSyncProvider(const VSyncCallback& callback, SurfaceHandle surface_handle);
39 39
40 std::unique_ptr<GpuVSyncWorker> vsync_worker_; 40 std::unique_ptr<GpuVSyncWorker> vsync_worker_;
41 #endif // defined(OS_WIN) 41 #endif // defined(OS_WIN)
42 42
43 DISALLOW_COPY_AND_ASSIGN(GpuVSyncProvider); 43 DISALLOW_COPY_AND_ASSIGN(GpuVSyncProvider);
44 }; 44 };
45 45
46 } // namespace gpu 46 } // namespace gpu
47 47
48 #endif // GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_H_ 48 #endif // GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698