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

Side by Side Diff: gpu/ipc/service/gpu_vsync_provider_win.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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_WIN_H_
6 #define GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_WIN_H_
7
8 #include <memory>
9
10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h"
13 #include "base/synchronization/lock.h"
14 #include "base/time/time.h"
15 #include "gpu/gpu_export.h"
16 #include "gpu/ipc/common/surface_handle.h"
17 #include "gpu/ipc/service/image_transport_surface_delegate.h"
18 #include "ui/gfx/vsync_provider.h"
19
20 namespace gpu {
21
22 class GpuVSyncWorker;
23 class GpuVSyncMessageFilter;
24
25 class GPU_EXPORT GpuVSyncProviderWin : public gfx::VSyncProvider {
26 public:
27 GpuVSyncProviderWin(base::WeakPtr<ImageTransportSurfaceDelegate> delegate,
28 SurfaceHandle surface_handle);
29 ~GpuVSyncProviderWin() override;
30
31 // This class ignores this method and updates VSync directly via a
32 // worker thread IPC call.
33 void GetVSyncParameters(const UpdateVSyncCallback& callback) override;
34
35 private:
36 void OnVSync(base::TimeTicks timestamp, base::TimeDelta interval);
37
38 // VSync worker that waits for VSync events on worker thread.
39 scoped_refptr<GpuVSyncWorker> vsync_worker_;
40 // Message filter to send/receive IPC messages.
41 scoped_refptr<GpuVSyncMessageFilter> message_filter_;
42
43 DISALLOW_COPY_AND_ASSIGN(GpuVSyncProviderWin);
44 };
45
46 } // namespace gpu
47
48 #endif // GPU_IPC_SERVICE_GPU_VSYNC_PROVIDER_WIN_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_vsync_provider_unittest_win.cc ('k') | gpu/ipc/service/gpu_vsync_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698