Commit 2be063ba authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Fix crash in rasterize_and_record_micro benchmark

This is extracted from crrev.com/c/2459866.

Remove recording_source.UpdateDisplayItemList() which caused crash when
the same DisplayItemList is updated more than once. The call is not
necessary for the benchmark.

TBR=pdr@chromium.org,vmpstr@chromium.org

Bug: 922642
Change-Id: Iad8754bf82e6d51215bb0a2c7c18bd6f6904f5eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462231Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815849}
parent 46c00cfd
......@@ -125,14 +125,8 @@ void RasterizeAndRecordBenchmark::RunOnLayer(PictureLayer* layer) {
return;
ContentLayerClient* painter = layer->client();
RecordingSource recording_source;
scoped_refptr<DisplayItemList> display_list;
display_list = painter->PaintContentsToDisplayList();
recording_source.UpdateDisplayItemList(
display_list, painter->GetApproximateUnsharedMemoryUsage(),
layer_tree_host_->recording_scale_factor());
scoped_refptr<DisplayItemList> display_list =
painter->PaintContentsToDisplayList();
record_results_.painter_memory_usage +=
painter->GetApproximateUnsharedMemoryUsage();
record_results_.paint_op_memory_usage += display_list->BytesUsed();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment