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

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

Issue 2800193002: Add metrics for how often APNGs are used
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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6291f6ff4a3fb2882ac132bd5b7d6fc6ddae756d 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/Histogram.h"
#include "platform/image-decoders/FastSharedBufferReader.h"
#include "platform/image-decoders/SegmentReader.h"
#include "platform/image-decoders/png/PNGImageDecoder.h"
@@ -535,6 +536,12 @@ bool PNGImageReader::parseSize(const FastSharedBufferReader& reader) {
if (!m_isAnimated || 1 == m_reportedFrameCount)
m_decoder->setRepetitionCount(cAnimationNone);
m_decoder->headerAvailable();
+ {
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(
+ BooleanHistogram, apngHistogram,
+ new BooleanHistogram("Blink.DecodedImage.APNG"));
+ apngHistogram.count(m_isAnimated);
+ }
return true;
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698