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

Unified Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp

Issue 1652983005: Remove Enumeration Histograms from the Blink Platform API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_blink_histograms_5a
Patch Set: Rebase two new histograms were added today Created 4 years, 10 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/graphics/Canvas2DLayerBridge.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
index 70b4ad1cf04c57b709ecbdb910502a23d87c5cbe..2fd95e25c1b08f313b7477f314562c0d3d702813 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -25,6 +25,7 @@
#include "platform/graphics/Canvas2DLayerBridge.h"
+#include "platform/Histogram.h"
#include "platform/TraceEvent.h"
#include "platform/graphics/CanvasMetrics.h"
#include "platform/graphics/ExpensiveCanvasHeuristicParameters.h"
@@ -345,7 +346,8 @@ void Canvas2DLayerBridge::disableDeferral(DisableDeferralReason reason)
if (!m_isDeferralEnabled)
return;
- Platform::current()->histogramEnumeration("Canvas.GPUAccelerated2DCanvasDisableDeferralReason", reason, DisableDeferralReasonCount);
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, gpuDisabledHistogram, ("Canvas.GPUAccelerated2DCanvasDisableDeferralReason", DisableDeferralReasonCount));
+ gpuDisabledHistogram.count(reason);
CanvasMetrics::countCanvasContextUsage(CanvasMetrics::GPUAccelerated2DCanvasDeferralDisabled);
flushRecordingOnly();
// Because we will be discarding the recorder, if the flush failed
@@ -825,7 +827,8 @@ Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other)
void Canvas2DLayerBridge::Logger::reportHibernationEvent(HibernationEvent event)
{
- blink::Platform::current()->histogramEnumeration("Canvas.HibernationEvents", event, HibernationEventCount);
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, ("Canvas.HibernationEvents", HibernationEventCount));
+ hibernationHistogram.count(event);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698