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

Side by Side Diff: ui/gl/gpu_timing.cc

Issue 1424703003: Kills TraceTicks, which was functionally the same as TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed win compile error. Created 5 years, 1 month 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 | « ui/gl/angle_platform_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/gl/gpu_timing.h" 5 #include "ui/gl/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_bindings.h"
9 #include "ui/gl/gl_context.h" 9 #include "ui/gl/gl_context.h"
10 #include "ui/gl/gl_version_info.h" 10 #include "ui/gl/gl_version_info.h"
(...skipping 21 matching lines...) Expand all
32 uint32_t GetDisjointCount(); 32 uint32_t GetDisjointCount();
33 int64 CalculateTimerOffset(); 33 int64 CalculateTimerOffset();
34 34
35 scoped_refptr<QueryResult> BeginElapsedTimeQuery(); 35 scoped_refptr<QueryResult> BeginElapsedTimeQuery();
36 void EndElapsedTimeQuery(scoped_refptr<QueryResult> result); 36 void EndElapsedTimeQuery(scoped_refptr<QueryResult> result);
37 37
38 scoped_refptr<QueryResult> DoTimeStampQuery(); 38 scoped_refptr<QueryResult> DoTimeStampQuery();
39 39
40 int64 GetCurrentCPUTime() { 40 int64 GetCurrentCPUTime() {
41 return cpu_time_for_testing_.is_null() 41 return cpu_time_for_testing_.is_null()
42 ? (base::TraceTicks::Now() - base::TraceTicks()).InMicroseconds() 42 ? (base::TimeTicks::Now() - base::TimeTicks()).InMicroseconds()
43 : cpu_time_for_testing_.Run(); 43 : cpu_time_for_testing_.Run();
44 } 44 }
45 void SetCpuTimeForTesting(const base::Callback<int64(void)>& cpu_time) { 45 void SetCpuTimeForTesting(const base::Callback<int64(void)>& cpu_time) {
46 cpu_time_for_testing_ = cpu_time; 46 cpu_time_for_testing_ = cpu_time;
47 } 47 }
48 48
49 void UpdateQueryResults(); 49 void UpdateQueryResults();
50 50
51 int64_t GetMaxTimeStamp() { return max_time_stamp_; } 51 int64_t GetMaxTimeStamp() { return max_time_stamp_; }
52 void UpdateMaxTimeStamp(int64_t value) { 52 void UpdateMaxTimeStamp(int64_t value) {
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 624
625 void GPUTimingClient::ForceTimeElapsedQuery() { 625 void GPUTimingClient::ForceTimeElapsedQuery() {
626 DCHECK(gpu_timing_); 626 DCHECK(gpu_timing_);
627 gpu_timing_->ForceTimeElapsedQuery(); 627 gpu_timing_->ForceTimeElapsedQuery();
628 } 628 }
629 629
630 GPUTimingClient::~GPUTimingClient() { 630 GPUTimingClient::~GPUTimingClient() {
631 } 631 }
632 632
633 } // namespace gfx 633 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/angle_platform_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698