OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "ui/gl/vsync_provider_win.h" | 5 #include "ui/gl/vsync_provider_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
11 #include "base/win/windows_version.h" | 11 #include "base/win/windows_version.h" |
12 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gl { |
15 | 15 |
16 namespace { | 16 namespace { |
17 bool g_use_dwm_vsync; | 17 bool g_use_dwm_vsync; |
18 } // namespace | 18 } // namespace |
19 | 19 |
20 VSyncProviderWin::VSyncProviderWin(gfx::AcceleratedWidget window) | 20 VSyncProviderWin::VSyncProviderWin(gfx::AcceleratedWidget window) |
21 : window_(window) { | 21 : window_(window) { |
22 } | 22 } |
23 | 23 |
24 VSyncProviderWin::~VSyncProviderWin() {} | 24 VSyncProviderWin::~VSyncProviderWin() {} |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 base::Time::kMicrosecondsPerSecond); | 118 base::Time::kMicrosecondsPerSecond); |
119 } | 119 } |
120 } | 120 } |
121 } | 121 } |
122 | 122 |
123 if (interval.ToInternalValue() != 0) { | 123 if (interval.ToInternalValue() != 0) { |
124 callback.Run(timebase, interval); | 124 callback.Run(timebase, interval); |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 } // namespace gfx | 128 } // namespace gl |
OLD | NEW |