Index: third_party/WebKit/Source/web/WebViewImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp |
index 451cfcd6d27ffd8aff9cfc85c819edd5bda164e4..ee312a34e5a328d2d59fefae21a0ebc7ab1ec24d 100644 |
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
@@ -99,6 +99,7 @@ |
#include "platform/ContextMenu.h" |
#include "platform/ContextMenuItem.h" |
#include "platform/Cursor.h" |
+#include "platform/Histogram.h" |
#include "platform/KeyboardCodes.h" |
#include "platform/Logging.h" |
#include "platform/NotImplemented.h" |
@@ -1992,8 +1993,10 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect) |
PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLocalMainFrame()); |
double paintEnd = currentTime(); |
double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); |
- Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30); |
- Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30); |
+ DEFINE_STATIC_LOCAL(CustomCountHistogram, softwarePaintDurationHistogram, ("Renderer4.SoftwarePaintDurationMS", 0, 120, 30)); |
+ softwarePaintDurationHistogram.count((paintEnd - paintStart) * 1000); |
+ DEFINE_STATIC_LOCAL(CustomCountHistogram, softwarePaintRateHistogram, ("Renderer4.SoftwarePaintMegapixPerSecond", 10, 210, 30)); |
+ softwarePaintRateHistogram.count(pixelsPerSec / 1000000); |
} |
#if OS(ANDROID) |