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

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

Issue 163413004: Add base::TimeDelta::Max(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark.cc ('k') | cc/resources/picture_pile.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/rasterize_and_record_benchmark_impl.h" 5 #include "cc/debug/rasterize_and_record_benchmark_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 it; 97 it;
98 ++it) { 98 ++it) {
99 DCHECK(*it); 99 DCHECK(*it);
100 100
101 PicturePileImpl* picture_pile = (*it)->picture_pile(); 101 PicturePileImpl* picture_pile = (*it)->picture_pile();
102 gfx::Rect content_rect = (*it)->content_rect(); 102 gfx::Rect content_rect = (*it)->content_rect();
103 float contents_scale = (*it)->contents_scale(); 103 float contents_scale = (*it)->contents_scale();
104 104
105 int tile_size = content_rect.width() * content_rect.height(); 105 int tile_size = content_rect.width() * content_rect.height();
106 106
107 base::TimeDelta min_time = 107 base::TimeDelta min_time = base::TimeDelta::Max();
108 base::TimeDelta::FromInternalValue(std::numeric_limits<int64>::max());
109 108
110 bool is_solid_color = false; 109 bool is_solid_color = false;
111 for (int i = 0; i < rasterize_repeat_count_; ++i) { 110 for (int i = 0; i < rasterize_repeat_count_; ++i) {
112 SkBitmap bitmap; 111 SkBitmap bitmap;
113 bitmap.setConfig(SkBitmap::kARGB_8888_Config, 112 bitmap.setConfig(SkBitmap::kARGB_8888_Config,
114 content_rect.width(), 113 content_rect.width(),
115 content_rect.height()); 114 content_rect.height());
116 bitmap.allocPixels(); 115 bitmap.allocPixels();
117 116
118 SkBitmapDevice device(bitmap); 117 SkBitmapDevice device(bitmap);
(...skipping 29 matching lines...) Expand all
148 pixels_rasterized_with_non_solid_color(0), 147 pixels_rasterized_with_non_solid_color(0),
149 pixels_rasterized_as_opaque(0), 148 pixels_rasterized_as_opaque(0),
150 total_layers(0), 149 total_layers(0),
151 total_picture_layers(0), 150 total_picture_layers(0),
152 total_picture_layers_with_no_content(0), 151 total_picture_layers_with_no_content(0),
153 total_picture_layers_off_screen(0) {} 152 total_picture_layers_off_screen(0) {}
154 153
155 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} 154 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {}
156 155
157 } // namespace cc 156 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark.cc ('k') | cc/resources/picture_pile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698