summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorgavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-26 17:57:40 +0000
committergavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-26 17:57:40 +0000
commit37a78c32eaf3b6c35c944373505bed37afe16b45 (patch)
treefc0d367eab34e2032f43294204e8a208b6ee4f2e /cc
parent69de8e069b343f0c1a6c206e09ab0b028a517b5e (diff)
downloadchromium_src-37a78c32eaf3b6c35c944373505bed37afe16b45.zip
chromium_src-37a78c32eaf3b6c35c944373505bed37afe16b45.tar.gz
chromium_src-37a78c32eaf3b6c35c944373505bed37afe16b45.tar.bz2
Add base::TimeDelta::Max().
TimeDelta::Max() is a maximum timedelta, larger than any timedelta you can compare it to. The results of adding it to a time, or another time delta are undefined. R=ajwong@chromium.org,mkwst@chromium.org,jar@chromium.org TBR=jamesr@chomium.org,acolwell@chromium.org,nick@chromium.org BUG=None Review URL: https://codereview.chromium.org/163413004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/debug/rasterize_and_record_benchmark.cc3
-rw-r--r--cc/debug/rasterize_and_record_benchmark_impl.cc3
-rw-r--r--cc/resources/picture_pile.cc3
-rw-r--r--cc/resources/picture_pile_impl.cc3
4 files changed, 4 insertions, 8 deletions
diff --git a/cc/debug/rasterize_and_record_benchmark.cc b/cc/debug/rasterize_and_record_benchmark.cc
index 55f5677..ab8d1cb 100644
--- a/cc/debug/rasterize_and_record_benchmark.cc
+++ b/cc/debug/rasterize_and_record_benchmark.cc
@@ -108,8 +108,7 @@ void RasterizeAndRecordBenchmark::RunOnLayer(PictureLayer* layer) {
return;
- base::TimeDelta min_time =
- base::TimeDelta::FromInternalValue(std::numeric_limits<int64>::max());
+ base::TimeDelta min_time = base::TimeDelta::Max();
for (int i = 0; i < record_repeat_count_; ++i) {
base::TimeTicks start = Now();
scoped_refptr<Picture> picture = Picture::Create(
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.cc b/cc/debug/rasterize_and_record_benchmark_impl.cc
index 15cfd7a..fd0b7bd 100644
--- a/cc/debug/rasterize_and_record_benchmark_impl.cc
+++ b/cc/debug/rasterize_and_record_benchmark_impl.cc
@@ -104,8 +104,7 @@ void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) {
int tile_size = content_rect.width() * content_rect.height();
- base::TimeDelta min_time =
- base::TimeDelta::FromInternalValue(std::numeric_limits<int64>::max());
+ base::TimeDelta min_time = base::TimeDelta::Max();
bool is_solid_color = false;
for (int i = 0; i < rasterize_repeat_count_; ++i) {
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index 7e5a822..43b13c5 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -228,8 +228,7 @@ bool PicturePile::Update(
bool gather_pixel_refs = num_raster_threads > 1;
{
- base::TimeDelta best_duration = base::TimeDelta::FromInternalValue(
- std::numeric_limits<int64>::max());
+ base::TimeDelta best_duration = base::TimeDelta::Max();
for (int i = 0; i < repeat_count; i++) {
base::TimeTicks start_time = stats_instrumentation->StartRecording();
picture = Picture::Create(record_rect,
diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc
index b88a439..1254f13 100644
--- a/cc/resources/picture_pile_impl.cc
+++ b/cc/resources/picture_pile_impl.cc
@@ -247,8 +247,7 @@ void PicturePileImpl::RasterCommon(
total_clip.Union(positive_clip);
#endif // NDEBUG
- base::TimeDelta best_duration =
- base::TimeDelta::FromInternalValue(std::numeric_limits<int64>::max());
+ base::TimeDelta best_duration = base::TimeDelta::Max();
int repeat_count = std::max(1, slow_down_raster_scale_factor_for_debug_);
int rasterized_pixel_count = 0;