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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp

Issue 2800343004: Add histograms for animated image types
Patch Set: Created 3 years, 8 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: third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp
index ccfd5fcd211ba2571fc51718cd0fef3552fc1dc9..f7ecd40869adc9db10519d97ae8257fdd3a4f7aa 100644
--- a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp
@@ -39,6 +39,7 @@
#include "platform/image-decoders/png/PNGImageReader.h"
#include <memory>
+#include "platform/graphics/BitmapImageMetrics.h"
#include "platform/image-decoders/FastSharedBufferReader.h"
#include "platform/image-decoders/SegmentReader.h"
#include "platform/image-decoders/png/PNGImageDecoder.h"
@@ -535,6 +536,10 @@ bool PNGImageReader::parseSize(const FastSharedBufferReader& reader) {
if (!m_isAnimated || 1 == m_reportedFrameCount)
m_decoder->setRepetitionCount(cAnimationNone);
m_decoder->headerAvailable();
+ if (m_isAnimated) {
+ BitmapImageMetrics::countAnimatedImageType(
+ BitmapImageMetrics::AnimatedPNG);
+ }
return true;
}

Powered by Google App Engine
This is Rietveld 408576698