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

Unified Diff: gpu/perftests/measurements.cc

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/perftests/measurements.h ('k') | gpu/perftests/texture_upload_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/perftests/measurements.cc
diff --git a/gpu/perftests/measurements.cc b/gpu/perftests/measurements.cc
index f94d1cb8dcd1c3638df78a41a98d19a3eaf5e0b9..db26fb3264008cb0b258e790923dbdb7afa65854 100644
--- a/gpu/perftests/measurements.cc
+++ b/gpu/perftests/measurements.cc
@@ -5,8 +5,8 @@
#include "gpu/perftests/measurements.h"
#include "base/logging.h"
-#include "gpu/command_buffer/service/gpu_timing.h"
#include "testing/perf/perf_test.h"
+#include "ui/gl/gpu_timing.h"
namespace gpu {
@@ -25,16 +25,16 @@ Measurement::Measurement(const std::string& name,
: name(name), wall_time(wall_time), cpu_time(cpu_time), gpu_time(gpu_time) {
}
-void Measurement::PrintResult() const {
- perf_test::PrintResult(name, "_wall", "", wall_time.InMillisecondsF(), "ms",
- true);
+void Measurement::PrintResult(const std::string& suffix) const {
+ perf_test::PrintResult(name, "_wall" + suffix, "",
+ wall_time.InMillisecondsF(), "ms", true);
if (cpu_time.InMicroseconds() >= 0) {
- perf_test::PrintResult(name, "_cpu", "", cpu_time.InMillisecondsF(), "ms",
- true);
+ perf_test::PrintResult(name, "_cpu" + suffix, "",
+ cpu_time.InMillisecondsF(), "ms", true);
}
if (gpu_time.InMicroseconds() >= 0) {
- perf_test::PrintResult(name, "_gpu", "", gpu_time.InMillisecondsF(), "ms",
- true);
+ perf_test::PrintResult(name, "_gpu" + suffix, "",
+ gpu_time.InMillisecondsF(), "ms", true);
}
}
@@ -52,9 +52,9 @@ Measurement Measurement::Divide(int a) const {
Measurement::~Measurement() {
}
-MeasurementTimers::MeasurementTimers(GPUTiming* gpu_timing)
+MeasurementTimers::MeasurementTimers(gfx::GPUTimingClient* gpu_timing_client)
: wall_time_start_(), cpu_time_start_(), gpu_timer_() {
- DCHECK(gpu_timing);
+ DCHECK(gpu_timing_client);
wall_time_start_ = base::TimeTicks::NowFromSystemTraceTime();
if (base::TimeTicks::IsThreadNowSupported()) {
cpu_time_start_ = base::TimeTicks::ThreadNow();
@@ -64,8 +64,8 @@ MeasurementTimers::MeasurementTimers(GPUTiming* gpu_timing)
logged_once = true;
}
- if (gpu_timing->IsAvailable()) {
- gpu_timer_.reset(new GPUTimer(gpu_timing));
+ if (gpu_timing_client->IsAvailable()) {
+ gpu_timer_ = gpu_timing_client->CreateGPUTimer();
gpu_timer_->Start();
}
}
« 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