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

Side by Side Diff: ui/gl/sync_control_vsync_provider.h

Issue 1545113002: Switch to standard integer types in ui/gl/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/gl/scoped_make_current.h ('k') | ui/gl/sync_control_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_GL_SYNC_CONTROL_VSYNC_PROVIDER_H_ 5 #ifndef UI_GL_SYNC_CONTROL_VSYNC_PROVIDER_H_
6 #define UI_GL_SYNC_CONTROL_VSYNC_PROVIDER_H_ 6 #define UI_GL_SYNC_CONTROL_VSYNC_PROVIDER_H_
7 7
8 #include <stdint.h>
9
8 #include <queue> 10 #include <queue>
9 11
12 #include "base/macros.h"
10 #include "ui/gfx/vsync_provider.h" 13 #include "ui/gfx/vsync_provider.h"
11 14
12 namespace gfx { 15 namespace gfx {
13 16
14 // Base class for providers based on extensions like GLX_OML_sync_control and 17 // Base class for providers based on extensions like GLX_OML_sync_control and
15 // EGL_CHROMIUM_sync_control. 18 // EGL_CHROMIUM_sync_control.
16 class SyncControlVSyncProvider : public VSyncProvider { 19 class SyncControlVSyncProvider : public VSyncProvider {
17 public: 20 public:
18 SyncControlVSyncProvider(); 21 SyncControlVSyncProvider();
19 ~SyncControlVSyncProvider() override; 22 ~SyncControlVSyncProvider() override;
20 23
21 void GetVSyncParameters(const UpdateVSyncCallback& callback) override; 24 void GetVSyncParameters(const UpdateVSyncCallback& callback) override;
22 25
23 protected: 26 protected:
24 virtual bool GetSyncValues(int64* system_time, 27 virtual bool GetSyncValues(int64_t* system_time,
25 int64* media_stream_counter, 28 int64_t* media_stream_counter,
26 int64* swap_buffer_counter) = 0; 29 int64_t* swap_buffer_counter) = 0;
27 30
28 virtual bool GetMscRate(int32* numerator, int32* denominator) = 0; 31 virtual bool GetMscRate(int32_t* numerator, int32_t* denominator) = 0;
29 32
30 private: 33 private:
31 base::TimeTicks last_timebase_; 34 base::TimeTicks last_timebase_;
32 uint64 last_media_stream_counter_; 35 uint64_t last_media_stream_counter_;
33 base::TimeDelta last_good_interval_; 36 base::TimeDelta last_good_interval_;
34 bool invalid_msc_; 37 bool invalid_msc_;
35 38
36 // A short history of the last few computed intervals. 39 // A short history of the last few computed intervals.
37 // We use this to filter out the noise in the computation resulting 40 // We use this to filter out the noise in the computation resulting
38 // from configuration change (monitor reconfiguration, moving windows 41 // from configuration change (monitor reconfiguration, moving windows
39 // between monitors, suspend and resume, etc.). 42 // between monitors, suspend and resume, etc.).
40 std::queue<base::TimeDelta> last_computed_intervals_; 43 std::queue<base::TimeDelta> last_computed_intervals_;
41 44
42 DISALLOW_COPY_AND_ASSIGN(SyncControlVSyncProvider); 45 DISALLOW_COPY_AND_ASSIGN(SyncControlVSyncProvider);
43 }; 46 };
44 47
45 } // namespace gfx 48 } // namespace gfx
46 49
47 #endif // UI_GL_SYNC_CONTROL_VSYNC_PROVIDER_H_ 50 #endif // UI_GL_SYNC_CONTROL_VSYNC_PROVIDER_H_
OLDNEW
« no previous file with comments | « ui/gl/scoped_make_current.h ('k') | ui/gl/sync_control_vsync_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698