OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "gpu/command_buffer/service/gpu_timing.h" | 5 #include "gpu/command_buffer/service/gpu_timing.h" |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "ui/gl/gl_bindings.h" |
8 #include "ui/gl/gl_context.h" | 9 #include "ui/gl/gl_context.h" |
9 #include "ui/gl/gl_version_info.h" | 10 #include "ui/gl/gl_version_info.h" |
10 | 11 |
11 namespace gpu { | 12 namespace gpu { |
12 | 13 |
13 GPUTimer::GPUTimer(GPUTiming* gpu_timing) : gpu_timing_(gpu_timing) { | 14 GPUTimer::GPUTimer(GPUTiming* gpu_timing) : gpu_timing_(gpu_timing) { |
14 DCHECK(gpu_timing_); | 15 DCHECK(gpu_timing_); |
15 memset(queries_, 0, sizeof(queries_)); | 16 memset(queries_, 0, sizeof(queries_)); |
16 glGenQueriesARB(2, queries_); | 17 glGenQueriesARB(2, queries_); |
17 } | 18 } |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 void GPUTiming::SetOffsetForTesting(int64 offset, bool cache_it) { | 137 void GPUTiming::SetOffsetForTesting(int64 offset, bool cache_it) { |
137 offset_ = offset; | 138 offset_ = offset; |
138 offset_valid_ = cache_it; | 139 offset_valid_ = cache_it; |
139 } | 140 } |
140 | 141 |
141 void GPUTiming::SetTimerTypeForTesting(TimerType type) { | 142 void GPUTiming::SetTimerTypeForTesting(TimerType type) { |
142 timer_type_ = type; | 143 timer_type_ = type; |
143 } | 144 } |
144 | 145 |
145 } // namespace gpu | 146 } // namespace gpu |
OLD | NEW |