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

Side by Side Diff: ui/gfx/frame_time.h

Issue 668273003: Get high resolution frame timebase and interval on compatible systems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor whitespace cleanup Created 6 years, 2 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 | « no previous file | ui/gl/gl_surface_win.cc » ('j') | ui/gl/gl_surface_win.cc » ('J')
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_GFX_FRAME_TIME_H 5 #ifndef UI_GFX_FRAME_TIME_H
6 #define UI_GFX_FRAME_TIME_H 6 #define UI_GFX_FRAME_TIME_H
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 #if defined(OS_WIN) 23 #if defined(OS_WIN)
24 static base::TimeTicks FromQPCValue(LONGLONG qpc_value) { 24 static base::TimeTicks FromQPCValue(LONGLONG qpc_value) {
25 DCHECK(TimestampsAreHighRes()); 25 DCHECK(TimestampsAreHighRes());
26 return base::TimeTicks::FromQPCValue(qpc_value); 26 return base::TimeTicks::FromQPCValue(qpc_value);
27 } 27 }
28 #endif 28 #endif
29 29
30 static bool TimestampsAreHighRes() { 30 static bool TimestampsAreHighRes() {
31 // This should really return base::TimeTicks::IsHighResNowFastAndReliable(); 31 return base::TimeTicks::IsHighResClockWorking();
32 // Returning false makes sure we are only using low-res timestamps until we
33 // use FrameTime everywhere we need to. See crbug.com/315334
brianderson 2014/10/22 23:05:29 Note: This comment is a bit missleading. "until we
34 return false;
35 } 32 }
36 }; 33 };
37 34
38 } 35 }
39 36
40 #endif // UI_GFX_FRAME_TIME_H 37 #endif // UI_GFX_FRAME_TIME_H
OLDNEW
« no previous file with comments | « no previous file | ui/gl/gl_surface_win.cc » ('j') | ui/gl/gl_surface_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698