summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-12 01:44:13 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-12 01:44:13 +0000
commitfc39aa16fdd4195fb6ab1e133832b2ba2934fe80 (patch)
treeaf8a57e714265bf68dcdd728be9f2ba0724029ae /cc
parent8a000dd636d22d254773bdf92e853ea74d5ae0d8 (diff)
downloadchromium_src-fc39aa16fdd4195fb6ab1e133832b2ba2934fe80.zip
chromium_src-fc39aa16fdd4195fb6ab1e133832b2ba2934fe80.tar.gz
chromium_src-fc39aa16fdd4195fb6ab1e133832b2ba2934fe80.tar.bz2
cc: Remove currentTime() use from ContentLayerChromium.
Use base/time.h API instead. BUG=154451 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org Review URL: https://codereview.chromium.org/11098061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161473 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/ContentLayerChromium.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cc/ContentLayerChromium.cpp b/cc/ContentLayerChromium.cpp
index c2bd8d1..ee8277b 100644
--- a/cc/ContentLayerChromium.cpp
+++ b/cc/ContentLayerChromium.cpp
@@ -8,6 +8,7 @@
#include "ContentLayerChromium.h"
+#include "base/time.h"
#include "BitmapCanvasLayerTextureUpdater.h"
#include "BitmapSkPictureCanvasLayerTextureUpdater.h"
#include "CCLayerTreeHost.h"
@@ -16,7 +17,6 @@
#include "FrameBufferSkPictureCanvasLayerTextureUpdater.h"
#include "LayerPainterChromium.h"
#include <public/Platform.h>
-#include <wtf/CurrentTime.h>
namespace cc {
@@ -32,11 +32,11 @@ PassOwnPtr<ContentLayerPainter> ContentLayerPainter::create(ContentLayerChromium
void ContentLayerPainter::paint(SkCanvas* canvas, const IntRect& contentRect, FloatRect& opaque)
{
- double paintStart = currentTime();
+ base::TimeTicks paintStart = base::TimeTicks::HighResNow();
m_client->paintContents(canvas, contentRect, opaque);
- double paintEnd = currentTime();
- double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintEnd - paintStart);
- WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelContentPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
+ base::TimeTicks paintEnd = base::TimeTicks::HighResNow();
+ double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintEnd - paintStart).InSecondsF();
+ WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelContentPaintDurationMS", (paintEnd - paintStart).InMillisecondsF(), 0, 120, 30);
WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelContentPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
}