Bug 1291071 (Part 4) - Clean up Decoder::SpeedHistogram() and related code. r=edwin

This commit is contained in:
Seth Fowler
2016-08-02 16:45:22 -07:00
parent 251ed225e5
commit 7dce2e7e42
9 changed files with 37 additions and 34 deletions

View File

@@ -1619,11 +1619,8 @@ RasterImage::FinalizeDecoder(Decoder* aDecoder,
Telemetry::Accumulate(Telemetry::IMAGE_DECODE_TIME,
int32_t(aTelemetry.mDecodeTime.ToMicroseconds()));
// We record the speed for only some decoders. The rest have
// SpeedHistogram return HistogramCount.
Telemetry::ID id = aTelemetry.mSpeedHistogram;
if (id < Telemetry::HistogramCount) {
Telemetry::Accumulate(id, aTelemetry.Speed());
if (aTelemetry.mSpeedHistogram) {
Telemetry::Accumulate(*aTelemetry.mSpeedHistogram, aTelemetry.Speed());
}
}