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

Unified Diff: cc/resources/picture_pile_impl.cc

Issue 25353009: telemetry: Refactored rasterize_and_record measurement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made BenchmarkInstrumentation a class. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/picture_pile.cc ('k') | cc/resources/raster_worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile_impl.cc
diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc
index 8f98350abd9e3d753994db63a3a567af985a3044..95b333c3d606b995c49ced23e1c7665df938a9ac 100644
--- a/cc/resources/picture_pile_impl.cc
+++ b/cc/resources/picture_pile_impl.cc
@@ -7,7 +7,6 @@
#include "base/debug/trace_event.h"
#include "cc/base/region.h"
-#include "cc/debug/benchmark_instrumentation.h"
#include "cc/debug/debug_colors.h"
#include "cc/resources/picture_pile_impl.h"
#include "skia/ext/analysis_canvas.h"
@@ -201,14 +200,14 @@ void PicturePileImpl::RasterCommon(
base::TimeDelta best_duration =
base::TimeDelta::FromInternalValue(std::numeric_limits<int64>::max());
int repeat_count = std::max(1, slow_down_raster_scale_factor_for_debug_);
+ int rasterized_pixel_count = 0;
- TRACE_EVENT0(benchmark_instrumentation::kCategory,
- benchmark_instrumentation::kRasterLoop);
for (int j = 0; j < repeat_count; ++j) {
base::TimeTicks start_time;
if (rendering_stats_instrumentation)
start_time = rendering_stats_instrumentation->StartRecording();
- (*i)->Raster(canvas, callback, content_clip, contents_scale);
+ rasterized_pixel_count =
+ (*i)->Raster(canvas, callback, content_clip, contents_scale);
if (rendering_stats_instrumentation) {
base::TimeDelta duration =
rendering_stats_instrumentation->EndRecording(start_time);
@@ -216,8 +215,6 @@ void PicturePileImpl::RasterCommon(
}
}
if (rendering_stats_instrumentation) {
- int64 rasterized_pixel_count =
- repeat_count * content_clip.width() * content_clip.height();
rendering_stats_instrumentation->AddRaster(best_duration,
rasterized_pixel_count);
}
« no previous file with comments | « cc/resources/picture_pile.cc ('k') | cc/resources/raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698