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

Unified Diff: ui/gl/vsync_provider.h

Issue 13861016: CrOS: Look for consistency between successive vsync intervals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 7 years, 8 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 | « no previous file | ui/gl/vsync_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/vsync_provider.h
diff --git a/ui/gl/vsync_provider.h b/ui/gl/vsync_provider.h
index 5c7b2a46ed7022fca7c1357dcc1419fb7c2ffb0b..bec065ea5b22d1ccd8c1a8df60a99808f86f2aa5 100644
--- a/ui/gl/vsync_provider.h
+++ b/ui/gl/vsync_provider.h
@@ -5,6 +5,8 @@
#ifndef UI_GL_VSYNC_PROVIDER_H_
#define UI_GL_VSYNC_PROVIDER_H_
+#include <queue>
+
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/time.h"
@@ -54,6 +56,12 @@ class SyncControlVSyncProvider : public VSyncProvider {
uint64 last_media_stream_counter_;
base::TimeDelta last_good_interval_;
+ // A short history of the last few computed intervals.
+ // We use this to filter out the noise in the computation resulting
+ // from configuration change (monitor reconfiguration, moving windows
+ // between monitors, suspend and resume, etc.).
+ std::queue<base::TimeDelta> last_computed_intervals_;
+
DISALLOW_COPY_AND_ASSIGN(SyncControlVSyncProvider);
};
« no previous file with comments | « no previous file | ui/gl/vsync_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698