[go: nahoru, domu]

cc: Remove unnecessary ImageDecodeMipLevel UMA.

This was added to collect data about how often the compositor rasterizes
downscaled images and the data is not required anymore.

R=ericrk@chromium.org,holte@chromium.org

Bug: 975326,976133
Change-Id: Id8224e1cb9653439dd93eb11126d19c6c44e547b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670276
Auto-Submit: Khushal <khushalsagar@chromium.org>
Commit-Queue: Steven Holte <holte@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672697}
diff --git a/cc/tiles/gpu_image_decode_cache.cc b/cc/tiles/gpu_image_decode_cache.cc
index 30ce3e4..c8ccc89 100644
--- a/cc/tiles/gpu_image_decode_cache.cc
+++ b/cc/tiles/gpu_image_decode_cache.cc
@@ -1661,7 +1661,6 @@
   }
 
   TRACE_EVENT0("cc,benchmark", "GpuImageDecodeCache::DecodeImage");
-  RecordImageMipLevelUMA(image_data->upload_scale_mip_level);
 
   image_data->decode.ResetData();
   std::unique_ptr<base::DiscardableMemory> backing_memory;
diff --git a/cc/tiles/image_decode_cache.cc b/cc/tiles/image_decode_cache.cc
index 7c83ee4..9c68e3c 100644
--- a/cc/tiles/image_decode_cache.cc
+++ b/cc/tiles/image_decode_cache.cc
@@ -4,7 +4,6 @@
 
 #include "cc/tiles/image_decode_cache.h"
 
-#include "base/metrics/histogram_macros.h"
 #include "cc/raster/tile_task.h"
 
 namespace cc {
@@ -19,11 +18,4 @@
 
 ImageDecodeCache::TaskResult::~TaskResult() = default;
 
-void ImageDecodeCache::RecordImageMipLevelUMA(int mip_level) {
-  DCHECK_GE(mip_level, 0);
-  DCHECK_LT(mip_level, 32);
-  UMA_HISTOGRAM_EXACT_LINEAR("Renderer4.ImageDecodeMipLevel", mip_level + 1,
-                             33);
-}
-
 }  // namespace cc
diff --git a/cc/tiles/image_decode_cache.h b/cc/tiles/image_decode_cache.h
index 6d7d339..241f577 100644
--- a/cc/tiles/image_decode_cache.h
+++ b/cc/tiles/image_decode_cache.h
@@ -143,9 +143,6 @@
   // image can directly be used for raster (for instance bitmaps in a software
   // draw).
   virtual bool UseCacheForDrawImage(const DrawImage& image) const = 0;
-
- protected:
-  void RecordImageMipLevelUMA(int mip_level);
 };
 
 }  // namespace cc
diff --git a/cc/tiles/software_image_decode_cache.cc b/cc/tiles/software_image_decode_cache.cc
index f858a18..6bfa52cd 100644
--- a/cc/tiles/software_image_decode_cache.cc
+++ b/cc/tiles/software_image_decode_cache.cc
@@ -318,8 +318,6 @@
 
   DecodeImageIfNecessary(key, paint_image, cache_entry);
   DCHECK(cache_entry->decode_failed || cache_entry->is_locked);
-  RecordImageMipLevelUMA(
-      MipMapUtil::GetLevelForSize(key.src_rect().size(), key.target_size()));
 }
 
 void SoftwareImageDecodeCache::DecodeImageIfNecessary(
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index da32ceb..6f44030 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -105583,6 +105583,9 @@
 
 <histogram name="Renderer4.ImageDecodeMipLevel" units="mip level"
     expires_after="M77">
+  <obsolete>
+    Deprecated 06/2019.
+  </obsolete>
   <owner>khushalsagar@chromium.org</owner>
   <summary>
     The mip level at which images are decoded for rasterization in the renderer.