Commit d31672ed authored by Noam Rosenthal's avatar Noam Rosenthal Committed by Chromium LUCI CQ

Obsolete and remove counts DensitySizeCorrectionDetected histogram

Blink.DecodedImage.DensitySizeCorrectionDetected was necessary to
test backwards compatibility of a new feature, this test is finished.

Removed all calls for the count, test, and obsoleted histogram.

Bug: 1152025
Change-Id: I16870a075271ead8ba46a44c6c0f4a485acc4551
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2567927Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833283}
parent 596bcfc4
......@@ -346,14 +346,8 @@ bool BitmapImage::IsSizeAvailable() {
return true;
size_available_ = decoder_ && decoder_->IsSizeAvailable();
if (size_available_ && HasVisibleImageSize(Size())) {
if (size_available_ && HasVisibleImageSize(Size()))
BitmapImageMetrics::CountDecodedImageType(decoder_->FilenameExtension());
if (decoder_->FilenameExtension() == "jpg") {
IntSize correctedSize = decoder_->DensityCorrectedSizeAtIndex(0);
BitmapImageMetrics::CountImageDensityCorrection(
!correctedSize.IsEmpty() && correctedSize != decoder_->Size());
}
}
return size_available_;
}
......
......@@ -39,11 +39,6 @@ void BitmapImageMetrics::CountDecodedImageType(const String& type) {
UMA_HISTOGRAM_ENUMERATION("Blink.DecodedImageType", decoded_image_type);
}
void BitmapImageMetrics::CountImageDensityCorrection(bool density_correction_present) {
UMA_HISTOGRAM_BOOLEAN("Blink.DecodedImage.DensitySizeCorrectionDetected",
density_correction_present);
}
void BitmapImageMetrics::CountImageJpegDensity(int image_min_side,
uint64_t density_centi_bpp,
size_t image_size_bytes) {
......
......@@ -55,7 +55,6 @@ class PLATFORM_EXPORT BitmapImageMetrics {
// |type| is the return value of ImageDecoder::FilenameExtension().
static void CountDecodedImageType(const String& type);
static void CountImageDensityCorrection(bool densityCorrectionPresent);
// Report the JPEG compression density in 0.01 bits per pixel for an image
// with a smallest side (width or length) of |image_min_side| and total size
// in bytes |image_size_bytes|.
......
......@@ -828,33 +828,6 @@ TEST_F(BitmapHistogramTest, DecodedImageType) {
#endif // BUILDFLAG(ENABLE_AV1_DECODER)
}
TEST_F(BitmapHistogramTest, DecodedImageDensitySizeCorrectionDetected) {
ExpectImageRecordsSample("exif-resolution-none.jpg",
"Blink.DecodedImage.DensitySizeCorrectionDetected",
false);
ExpectImageRecordsSample("exif-resolution-invalid-cm.jpg",
"Blink.DecodedImage.DensitySizeCorrectionDetected",
false);
ExpectImageRecordsSample("exif-resolution-invalid-no-match.jpg",
"Blink.DecodedImage.DensitySizeCorrectionDetected",
false);
ExpectImageRecordsSample("exif-resolution-invalid-partial.jpg",
"Blink.DecodedImage.DensitySizeCorrectionDetected",
false);
ExpectImageRecordsSample("exif-resolution-no-change.jpg",
"Blink.DecodedImage.DensitySizeCorrectionDetected",
false);
ExpectImageRecordsSample("exif-resolution-valid-hires.jpg",
"Blink.DecodedImage.DensitySizeCorrectionDetected",
true);
ExpectImageRecordsSample("exif-resolution-valid-lores.jpg",
"Blink.DecodedImage.DensitySizeCorrectionDetected",
true);
ExpectImageRecordsSample("exif-resolution-valid-non-uniform.jpg",
"Blink.DecodedImage.DensitySizeCorrectionDetected",
true);
}
TEST_F(BitmapHistogramTest, DecodedImageDensityKiBWeighted_JpegDensity) {
// Test a 64x64 image, which should be too small to report any metrics.
{
......
......@@ -540,6 +540,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Blink.DecodedImage.DensitySizeCorrectionDetected"
enum="BooleanPresent" expires_after="2021-01-03">
<obsolete>
Removed in M89.
</obsolete>
<owner>schenney@chromium.org</owner>
<owner>noam.j.rosenthal@gmail.com</owner>
<owner>paint-dev@chromium.org</owner>
......
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