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

Side by Side Diff: ui/gfx/vsync_provider.h

Issue 2277883003: gl: Disable SGI_video_sync by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: accidentally an s Created 4 years, 3 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
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/vsync_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 UI_GFX_VSYNC_PROVIDER_H_ 5 #ifndef UI_GFX_VSYNC_PROVIDER_H_
6 #define UI_GFX_VSYNC_PROVIDER_H_ 6 #define UI_GFX_VSYNC_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "ui/gfx/gfx_export.h" 10 #include "ui/gfx/gfx_export.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // Get the time of the most recent screen refresh, along with the time 22 // Get the time of the most recent screen refresh, along with the time
23 // between consecutive refreshes. The callback is called as soon as 23 // between consecutive refreshes. The callback is called as soon as
24 // the data is available: it could be immediately from this method, 24 // the data is available: it could be immediately from this method,
25 // later via a PostTask to the current MessageLoop, or never (if we have 25 // later via a PostTask to the current MessageLoop, or never (if we have
26 // no data source). We provide the strong guarantee that the callback will 26 // no data source). We provide the strong guarantee that the callback will
27 // not be called once the instance of this class is destroyed. 27 // not be called once the instance of this class is destroyed.
28 virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) = 0; 28 virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) = 0;
29 }; 29 };
30 30
31 // Provides a constant timebase and interval.
32 class GFX_EXPORT FixedVSyncProvider : public VSyncProvider {
33 public:
34 FixedVSyncProvider(base::TimeTicks timebase, base::TimeDelta interval)
35 : timebase_(timebase), interval_(interval) {
36 }
37
38 ~FixedVSyncProvider() override {}
39
40 void GetVSyncParameters(const UpdateVSyncCallback& callback) override;
41
42 private:
43 base::TimeTicks timebase_;
44 base::TimeDelta interval_;
45 };
46
31 } // namespace gfx 47 } // namespace gfx
32 48
33 #endif // UI_GFX_VSYNC_PROVIDER_H_ 49 #endif // UI_GFX_VSYNC_PROVIDER_H_
OLDNEW
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/vsync_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698