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

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

Issue 1135943002: Pull in various gpu/command_buffer fixes from chromium (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/config/software_rendering_list_json.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('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 "base/logging.h" 7 #include "base/logging.h"
8 #include "testing/perf/perf_test.h" 8 #include "testing/perf/perf_test.h"
9 #include "ui/gl/gpu_timing.h" 9 #include "ui/gl/gpu_timing.h"
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 int64 gpu_time = -1; 90 int64 gpu_time = -1;
91 if (gpu_timer_.get() != nullptr && gpu_timer_->IsAvailable()) { 91 if (gpu_timer_.get() != nullptr && gpu_timer_->IsAvailable()) {
92 gpu_time = gpu_timer_->GetDeltaElapsed(); 92 gpu_time = gpu_timer_->GetDeltaElapsed();
93 } 93 }
94 return Measurement(name, wall_time_, cpu_time_, 94 return Measurement(name, wall_time_, cpu_time_,
95 base::TimeDelta::FromMicroseconds(gpu_time)); 95 base::TimeDelta::FromMicroseconds(gpu_time));
96 } 96 }
97 97
98 MeasurementTimers::~MeasurementTimers() { 98 MeasurementTimers::~MeasurementTimers() {
99 if (gpu_timer_.get()) {
100 gpu_timer_->Destroy(true);
101 }
99 } 102 }
100 103
101 } // namespace gpu 104 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/config/software_rendering_list_json.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698