summaryrefslogtreecommitdiffstats
path: root/cc/frame_rate_counter.cc
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 08:13:51 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 08:13:51 +0000
commit6a144160dfb2945b0099071662d2dd392594a24f (patch)
tree0a01d645fbbd22e2ce3a2d5c47c5501ae3e932a2 /cc/frame_rate_counter.cc
parent74b81dae8774b9f3888ef2aede971f5eb009cce5 (diff)
downloadchromium_src-6a144160dfb2945b0099071662d2dd392594a24f.zip
chromium_src-6a144160dfb2945b0099071662d2dd392594a24f.tar.gz
chromium_src-6a144160dfb2945b0099071662d2dd392594a24f.tar.bz2
Use base/metrics/histogram.h instead of WebKit::Platform::histogramCustomCounts in cc
The base/ macros are chromium style and marginally more efficient since the histogram bucket lookup is cached in a static local. This produced yet more LOG vs LOG collisions. I rewrote the LayerSorter's logging from WTF channels to use VLOG - it can be turned on by adding "--vmodule=layer_sorter=2" to the command line. BUG=154451,144577 Review URL: https://chromiumcodereview.appspot.com/11209002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162672 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/frame_rate_counter.cc')
-rw-r--r--cc/frame_rate_counter.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/cc/frame_rate_counter.cc b/cc/frame_rate_counter.cc
index a02486b..f9b203c 100644
--- a/cc/frame_rate_counter.cc
+++ b/cc/frame_rate_counter.cc
@@ -9,7 +9,10 @@
#include <cmath>
#include "CCProxy.h"
-#include <public/Platform.h>
+#ifdef LOG
+#undef LOG
+#endif
+#include "base/metrics/histogram.h"
namespace cc {
@@ -55,8 +58,7 @@ void CCFrameRateCounter::markBeginningOfFrame(base::TimeTicks timestamp)
base::TimeDelta frameIntervalSeconds = frameInterval(m_currentFrameNumber);
if (CCProxy::hasImplThread() && m_currentFrameNumber > 0) {
- double drawDelayMs = frameIntervalSeconds.InMillisecondsF();
- WebKit::Platform::current()->histogramCustomCounts("Renderer4.CompositorThreadImplDrawDelay", static_cast<int>(drawDelayMs), 1, 120, 60);
+ HISTOGRAM_CUSTOM_COUNTS("Renderer4.CompositorThreadImplDrawDelay", frameIntervalSeconds.InMilliseconds(), 1, 120, 60);
}
if (!isBadFrameInterval(frameIntervalSeconds) &&