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

Side by Side Diff: gpu/perftests/measurements.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 | « gpu/perftests/measurements.h ('k') | gpu/perftests/texture_upload_perftest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "gpu/perftests/measurements.h" 5 #include "gpu/perftests/measurements.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "testing/perf/perf_test.h" 10 #include "testing/perf/perf_test.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 return *this; 47 return *this;
48 } 48 }
49 49
50 Measurement Measurement::Divide(int a) const { 50 Measurement Measurement::Divide(int a) const {
51 return Measurement(name, wall_time / a, cpu_time / a, gpu_time / a); 51 return Measurement(name, wall_time / a, cpu_time / a, gpu_time / a);
52 } 52 }
53 53
54 Measurement::~Measurement() { 54 Measurement::~Measurement() {
55 } 55 }
56 56
57 MeasurementTimers::MeasurementTimers(gfx::GPUTimingClient* gpu_timing_client) 57 MeasurementTimers::MeasurementTimers(gl::GPUTimingClient* gpu_timing_client)
58 : wall_time_start_(), cpu_time_start_(), gpu_timer_() { 58 : wall_time_start_(), cpu_time_start_(), gpu_timer_() {
59 DCHECK(gpu_timing_client); 59 DCHECK(gpu_timing_client);
60 wall_time_start_ = base::TimeTicks::Now(); 60 wall_time_start_ = base::TimeTicks::Now();
61 if (base::ThreadTicks::IsSupported()) { 61 if (base::ThreadTicks::IsSupported()) {
62 base::ThreadTicks::WaitUntilInitialized(); 62 base::ThreadTicks::WaitUntilInitialized();
63 cpu_time_start_ = base::ThreadTicks::Now(); 63 cpu_time_start_ = base::ThreadTicks::Now();
64 } else { 64 } else {
65 static bool logged_once = false; 65 static bool logged_once = false;
66 LOG_IF(WARNING, !logged_once) << "ThreadTicks not supported."; 66 LOG_IF(WARNING, !logged_once) << "ThreadTicks not supported.";
67 logged_once = true; 67 logged_once = true;
(...skipping 30 matching lines...) Expand all
98 base::TimeDelta::FromMicroseconds(gpu_time)); 98 base::TimeDelta::FromMicroseconds(gpu_time));
99 } 99 }
100 100
101 MeasurementTimers::~MeasurementTimers() { 101 MeasurementTimers::~MeasurementTimers() {
102 if (gpu_timer_.get()) { 102 if (gpu_timer_.get()) {
103 gpu_timer_->Destroy(true); 103 gpu_timer_->Destroy(true);
104 } 104 }
105 } 105 }
106 106
107 } // namespace gpu 107 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/perftests/measurements.h ('k') | gpu/perftests/texture_upload_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698