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

Side by Side Diff: cc/debug/picture_record_benchmark.cc

Issue 864943002: Replaces instances of the deprecated TimeTicks::HighResNow() with TimeTicks::Now(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More changes based on review comments. Created 5 years, 11 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 | « cc/debug/lap_timer.cc ('k') | cc/debug/rendering_stats_instrumentation.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/debug/picture_record_benchmark.h" 5 #include "cc/debug/picture_record_benchmark.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 std::pair<int, int> dimensions = dimensions_[i]; 97 std::pair<int, int> dimensions = dimensions_[i];
98 int width = dimensions.first; 98 int width = dimensions.first;
99 int height = dimensions.second; 99 int height = dimensions.second;
100 100
101 int y_limit = std::max(1, content_bounds.height() - height); 101 int y_limit = std::max(1, content_bounds.height() - height);
102 int x_limit = std::max(1, content_bounds.width() - width); 102 int x_limit = std::max(1, content_bounds.width() - width);
103 for (int y = 0; y < y_limit; y += kPositionIncrement) { 103 for (int y = 0; y < y_limit; y += kPositionIncrement) {
104 for (int x = 0; x < x_limit; x += kPositionIncrement) { 104 for (int x = 0; x < x_limit; x += kPositionIncrement) {
105 gfx::Rect rect = gfx::Rect(x, y, width, height); 105 gfx::Rect rect = gfx::Rect(x, y, width, height);
106 106
107 base::TimeTicks start = base::TimeTicks::HighResNow(); 107 base::TimeTicks start = base::TimeTicks::Now();
108 108
109 scoped_refptr<Picture> picture = Picture::Create( 109 scoped_refptr<Picture> picture = Picture::Create(
110 rect, painter, tile_grid_size, false, Picture::RECORD_NORMALLY); 110 rect, painter, tile_grid_size, false, Picture::RECORD_NORMALLY);
111 111
112 base::TimeTicks end = base::TimeTicks::HighResNow(); 112 base::TimeTicks end = base::TimeTicks::Now();
113 base::TimeDelta duration = end - start; 113 base::TimeDelta duration = end - start;
114 TotalTime& total_time = times_[dimensions]; 114 TotalTime& total_time = times_[dimensions];
115 total_time.first += duration; 115 total_time.first += duration;
116 total_time.second++; 116 total_time.second++;
117 } 117 }
118 } 118 }
119 } 119 }
120 } 120 }
121 121
122 } // namespace cc 122 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/lap_timer.cc ('k') | cc/debug/rendering_stats_instrumentation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698