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; |
} |