Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7c85b34 authored by John Reck's avatar John Reck
Browse files

Test aggressive throttling

Change-Id: Idebb269ae2c619db626aa5dfcf8443e731b27895
parent c0c66d33
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ final class JWebCoreJavaBridge extends Handler {
    private void fireSharedTimer() { 
        // clear the flag so that sharedTimerFired() can set a new timer
        mHasInstantTimer = false;
        removeMessages(TIMER_MESSAGE);
        sharedTimerFired();
    }

+8 −0
Original line number Diff line number Diff line
@@ -2212,11 +2212,19 @@ public final class WebViewCore {
                mEventHub.sendMessage(Message.obtain(null, EventHub.WEBKIT_DRAW));
            }
            m_skipDrawFlag = false;
            m_skipDrawFlagLock.notify();
        }
    }

    private void webkitDraw() {
        synchronized (m_skipDrawFlagLock) {
            if (m_skipDrawFlag) {
                try {
                    // Aggressively throttle webkit to give the UI more CPU
                    // to catch up with
                    m_skipDrawFlagLock.wait(50);
                } catch (InterruptedException e) {}
            }
            if (m_skipDrawFlag) {
                m_drawWasSkipped = true;
                return;