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

Unified Diff: cc/debug/rasterize_and_record_benchmark_impl.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/debug/rasterize_and_record_benchmark_impl.h ('k') | cc/layers/content_layer_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/rasterize_and_record_benchmark_impl.cc
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.cc b/cc/debug/rasterize_and_record_benchmark_impl.cc
index e276a41c17854347638006c67e027b094571fb04..c1fc80983228cb562c6b84af4e54b29114e7a4fe 100644
--- a/cc/debug/rasterize_and_record_benchmark_impl.cc
+++ b/cc/debug/rasterize_and_record_benchmark_impl.cc
@@ -173,6 +173,8 @@ void RasterizeAndRecordBenchmarkImpl::DidCompleteCommit(
scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
result->SetDouble("rasterize_time_ms",
rasterize_results_.total_best_time.InMillisecondsF());
+ result->SetDouble("total_pictures_in_pile_size",
+ rasterize_results_.total_memory_usage);
result->SetInteger("pixels_rasterized", rasterize_results_.pixels_rasterized);
result->SetInteger("pixels_rasterized_with_non_solid_color",
rasterize_results_.pixels_rasterized_with_non_solid_color);
@@ -263,16 +265,22 @@ void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) {
rasterize_results_.pixels_rasterized += tile_size;
rasterize_results_.total_best_time += min_time;
}
+
+ const RasterSource* layer_raster_source = layer->GetRasterSource();
+ rasterize_results_.total_memory_usage +=
+ layer_raster_source->GetPictureMemoryUsage();
}
RasterizeAndRecordBenchmarkImpl::RasterizeResults::RasterizeResults()
: pixels_rasterized(0),
pixels_rasterized_with_non_solid_color(0),
pixels_rasterized_as_opaque(0),
+ total_memory_usage(0),
total_layers(0),
total_picture_layers(0),
total_picture_layers_with_no_content(0),
- total_picture_layers_off_screen(0) {}
+ total_picture_layers_off_screen(0) {
+}
RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {}
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark_impl.h ('k') | cc/layers/content_layer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698