summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebCore/platform/graphics/android/GLWebViewState.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp
index 0e7f559..8a88463 100644
--- a/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -306,8 +306,10 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, float scale, SkColo
double currentTime = WTF::currentTime();
double delta = currentTime - m_prevDrawTime;
- if (delta < FRAMERATE_CAP)
- return true;
+ if (delta < FRAMERATE_CAP) {
+ unsigned int usecs = (FRAMERATE_CAP - delta) * 1E6;
+ usleep(usecs);
+ }
m_prevDrawTime = currentTime;