Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2553)

Unified Diff: Source/platform/graphics/BitmapImage.cpp

Issue 1242263011: Record UMA stats for Blink decoded image types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved logic to BitmapImage to avoid double counting for ICO/CUR Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/BitmapImage.cpp
diff --git a/Source/platform/graphics/BitmapImage.cpp b/Source/platform/graphics/BitmapImage.cpp
index e3a3a72d0a680ad01fc0836f3cdaa754899df775..d5fdd4973315845d1690bf16488ff22a6958dacf 100644
--- a/Source/platform/graphics/BitmapImage.cpp
+++ b/Source/platform/graphics/BitmapImage.cpp
@@ -340,6 +340,19 @@ bool BitmapImage::isSizeAvailable()
m_sizeAvailable = m_source.isSizeAvailable();
+ if (m_sizeAvailable && (size().width() > 1 || size().height() > 1)) {
Noel Gordon 2015/08/01 02:33:06 Yes better. Let's define a static inline hasVisib
urvang 2015/08/04 20:21:16 Done.
+ String fileExtention = m_source.filenameExtension();
+ DecodedImageType type =
+ fileExtention == "jpg" ? ImageJPEG :
+ fileExtention == "png" ? ImagePNG :
+ fileExtention == "gif" ? ImageGIF :
+ fileExtention == "webp" ? ImageWebP :
+ fileExtention == "ico" ? ImageICO :
+ fileExtention == "bmp" ? ImageBMP :
+ ImageUnknown;
+ Platform::current()->histogramEnumeration("Blink.DecodedImageType", type, DecodedImageTypeMax + 1);
+ }
+
return m_sizeAvailable;
}
« Source/platform/graphics/BitmapImage.h ('K') | « Source/platform/graphics/BitmapImage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698