Commit 4e7d5958 authored by Khushal's avatar Khushal Committed by Commit Bot

blink/images: Restore trace event for image decodes.

This trace event was removed in [1] but is needed by telemetry scripts
to measure the decode time for images in perf tests.

NOTE TO PERF SHERRIFS
A regression in blink_perf.image_decoder benchmark is expected from this
change since it restores this benchmark.

R=chrishtr@chromium.org

Bug: 881192
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I100082d30f2ebed4c8d7efa91a22c4670d4c2492
Reviewed-on: https://chromium-review.googlesource.com/1246272Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594492}
parent 8bf4bf24
......@@ -136,7 +136,13 @@ bool ImageDecoderWrapper::Decode(ImageDecoderFactory* factory,
ExternalMemoryAllocator external_memory_allocator(info_, pixels_, row_bytes_);
if (decode_to_external_memory)
decoder->SetMemoryAllocator(&external_memory_allocator);
ImageFrame* frame = decoder->DecodeFrameBufferAtIndex(frame_index_);
ImageFrame* frame = nullptr;
{
// This trace event is important since it is used by telemetry scripts to
// measure the decode time.
TRACE_EVENT0("blink", "ImageFrameGenerator::decode");
frame = decoder->DecodeFrameBufferAtIndex(frame_index_);
}
// SetMemoryAllocator() can try to access decoder's data, so we have to
// clear it before clearing SegmentReader.
if (decode_to_external_memory)
......
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