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); |
}; |