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

Side by Side Diff: trunk/src/cc/resources/picture_pile_impl.cc

Issue 179763006: Revert 253502 "Add base::TimeDelta::Max()." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 7
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/base/region.h" 9 #include "cc/base/region.h"
10 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 ++it) { 240 ++it) {
241 Picture* picture = it->first; 241 Picture* picture = it->first;
242 Region negated_clip_region = it->second; 242 Region negated_clip_region = it->second;
243 243
244 #ifndef NDEBUG 244 #ifndef NDEBUG
245 Region positive_clip = content_rect; 245 Region positive_clip = content_rect;
246 positive_clip.Subtract(negated_clip_region); 246 positive_clip.Subtract(negated_clip_region);
247 total_clip.Union(positive_clip); 247 total_clip.Union(positive_clip);
248 #endif // NDEBUG 248 #endif // NDEBUG
249 249
250 base::TimeDelta best_duration = base::TimeDelta::Max(); 250 base::TimeDelta best_duration =
251 base::TimeDelta::FromInternalValue(std::numeric_limits<int64>::max());
251 int repeat_count = std::max(1, slow_down_raster_scale_factor_for_debug_); 252 int repeat_count = std::max(1, slow_down_raster_scale_factor_for_debug_);
252 int rasterized_pixel_count = 0; 253 int rasterized_pixel_count = 0;
253 254
254 for (int j = 0; j < repeat_count; ++j) { 255 for (int j = 0; j < repeat_count; ++j) {
255 base::TimeTicks start_time; 256 base::TimeTicks start_time;
256 if (rendering_stats_instrumentation) 257 if (rendering_stats_instrumentation)
257 start_time = rendering_stats_instrumentation->StartRecording(); 258 start_time = rendering_stats_instrumentation->StartRecording();
258 259
259 rasterized_pixel_count = picture->Raster( 260 rasterized_pixel_count = picture->Raster(
260 canvas, callback, negated_clip_region, contents_scale); 261 canvas, callback, negated_clip_region, contents_scale);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 ++it) { 407 ++it) {
407 Picture* picture = it->second.GetPicture(); 408 Picture* picture = it->second.GetPicture();
408 if (picture && (processed_pictures.count(picture) == 0)) { 409 if (picture && (processed_pictures.count(picture) == 0)) {
409 picture->EmitTraceSnapshot(); 410 picture->EmitTraceSnapshot();
410 processed_pictures.insert(picture); 411 processed_pictures.insert(picture);
411 } 412 }
412 } 413 }
413 } 414 }
414 415
415 } // namespace cc 416 } // namespace cc
OLDNEW
« no previous file with comments | « trunk/src/cc/resources/picture_pile.cc ('k') | trunk/src/content/renderer/media/websourcebuffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698