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

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: Rebase on top of commited base/time changes Created 8 years, 4 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/surface/accelerated_surface_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/surface/accelerated_surface_win.h
diff --git a/ui/surface/accelerated_surface_win.h b/ui/surface/accelerated_surface_win.h
index ca465230b22bc7f086aee4d1e2ce219d8095fbf1..b904e4f6ae6315fb1fdb3e931d6e841320ba13ee 100644
--- a/ui/surface/accelerated_surface_win.h
+++ b/ui/surface/accelerated_surface_win.h
@@ -77,6 +77,18 @@ 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. i.e.:
+ // inteval_in_seconds = interval_numerator / interval_denominator;
+ // For example, some machines will return an interval_numerator of 1001
+ // and an interval_denominator of 60000, resulting in an interval of
+ // 1001/60000 ~= .016683 seconds
+ // Note: This function assumes lock_ is acquired.
+ void GetPresentationStats(base::TimeTicks* timebase,
+ uint32* interval_numerator,
+ uint32* interval_denominator);
+
// The thread with which this presenter has affinity.
PresentThread* const present_thread_;
« no previous file with comments | « no previous file | ui/surface/accelerated_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698