| Index: ui/gl/gpu_timing.cc
|
| diff --git a/ui/gl/gpu_timing.cc b/ui/gl/gpu_timing.cc
|
| index 01a0e192e005ad44c84efe3599bbe6550d0015e9..dc720df58e03774b20fbe027460497a9b1d32cb1 100644
|
| --- a/ui/gl/gpu_timing.cc
|
| +++ b/ui/gl/gpu_timing.cc
|
| @@ -52,7 +52,7 @@ int64 GPUTiming::CalculateTimerOffset(base::Callback<int64(void)> cpu_time) {
|
| int64 now =
|
| cpu_time.is_null()
|
| ? (base::TraceTicks::Now() - base::TraceTicks()).InMicroseconds()
|
| - : cpu_time.Run();
|
| + : cpu_time.Run();
|
| offset_ = now - gl_now / base::Time::kNanosecondsPerMicrosecond;
|
| offset_valid_ = (timer_type_ == kTimerTypeARB);
|
| } else {
|
| @@ -251,6 +251,12 @@ void GPUTimingClient::SetCpuTimeForTesting(
|
| cpu_time_for_testing_ = cpu_time;
|
| }
|
|
|
| +int64 GPUTimingClient::GetCurrentCPUTime() {
|
| + return cpu_time_for_testing_.is_null()
|
| + ? (base::TraceTicks::Now() - base::TraceTicks()).InMicroseconds()
|
| + : cpu_time_for_testing_.Run();
|
| +}
|
| +
|
| GPUTimingClient::~GPUTimingClient() {
|
| }
|
|
|
|
|