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

Unified Diff: ui/surface/accelerated_surface_win.h

Issue 10825053: Use DwmGetCompositionTimingInfo to get vsync info on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix whitespace Created 8 years, 5 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
Index: ui/surface/accelerated_surface_win.h
diff --git a/ui/surface/accelerated_surface_win.h b/ui/surface/accelerated_surface_win.h
index 2abf0cedc8502d133663054de56b10eccf82f79f..527afdd2c29afeee169a6af5b6f695bb17c38e76 100644
--- a/ui/surface/accelerated_surface_win.h
+++ b/ui/surface/accelerated_surface_win.h
@@ -71,6 +71,13 @@ class SURFACE_EXPORT AcceleratedPresenter
bool DoRealPresent(HDC dc);
void DoReleaseSurface();
+ // This gets the timestamp and period of the display's last vsync.
+ // The period is represented as a ratio which, when divided, will give you
+ // the interval in seconds.
+ void GetPresentationStats(base::TimeTicks *timebase,
jbates 2012/07/30 18:37:51 - comments should explicitly say how to calculate
jbates 2012/07/30 19:27:00 Err, except in reverse since you already swap them
brianderson 2012/07/30 19:38:13 Yeah, I just swapped them in a recent commit. Wil
+ uint32 *interval_numerator,
+ uint32 *interval_denominator);
+
// The thread with which this presenter has affinity.
PresentThread* const present_thread_;

Powered by Google App Engine
This is Rietveld 408576698