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

Commit bc2e33b5 authored by Cary Clark's avatar Cary Clark
Browse files

don't swap out the history picture too soon

Wait until either the picture is not blank or
the progress is complete.
parent 843bbb85
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2844,7 +2844,7 @@ public class WebView extends AbsoluteLayout
    // Should only be called in UI thread
    void switchOutDrawHistory() {
        if (null == mWebViewCore) return; // CallbackProxy may trigger this
        if (mDrawHistory) {
        if (mDrawHistory && mWebViewCore.pictureReady()) {
            mDrawHistory = false;
            invalidate();
            int oldScrollX = mScrollX;
+9 −0
Original line number Diff line number Diff line
@@ -286,6 +286,11 @@ final class WebViewCore {
     */
    private native boolean nativeDrawContent(Canvas canvas, int color);

    /**
     * check to see if picture is blank and in progress
     */
    private native boolean nativePictureReady();
    
    /**
     * Redraw a portion of the picture set. The Point wh returns the
     * width and height of the overall picture.
@@ -1347,6 +1352,10 @@ final class WebViewCore {
        }
    }

    /* package */ boolean pictureReady() {
        return nativePictureReady();
    }

    /*package*/ Picture copyContentPicture() {
        Picture result = new Picture();
        nativeCopyContentToPicture(result);