Bug 687858. Avoid accumulating telemetry for size decodes. r=jlebar

These just add a bunch of noise to the data because they break some of the assumptions we have.
Currently this doesn't have much impact because decode on draw is disabled.

--HG--
extra : rebase_source : 1022ad9bd43ea5f8be342c05ab857bb44ed7e59c
This commit is contained in:
Jeff Muizelaar 2011-09-21 12:19:53 -04:00
Родитель e7f603f9d3
Коммит 52791bf5b7
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -2753,7 +2753,7 @@ imgDecodeWorker::Run()
}
TimeDuration decodeLatency = TimeStamp::Now() - start;
if (chunkCount) {
if (chunkCount && !image->mDecoder->IsSizeDecode()) {
Telemetry::Accumulate(Telemetry::IMAGE_DECODE_LATENCY, PRInt32(decodeLatency.ToMicroseconds()));
Telemetry::Accumulate(Telemetry::IMAGE_DECODE_CHUNKS, chunkCount);
}
@ -2772,7 +2772,11 @@ imgDecodeWorker::Run()
// If the decode finished, shutdown the decoder
if (image->mDecoder && image->IsDecodeFinished()) {
Telemetry::Accumulate(Telemetry::IMAGE_DECODE_TIME, PRInt32(mDecodeTime.ToMicroseconds()));
if (!image->mDecoder->IsSizeDecode()) {
Telemetry::Accumulate(Telemetry::IMAGE_DECODE_TIME, PRInt32(mDecodeTime.ToMicroseconds()));
}
rv = image->ShutdownDecoder(RasterImage::eShutdownIntent_Done);
if (NS_FAILED(rv)) {
image->DoError();