Loading core/java/android/webkit/DebugFlags.java +1 −6 Original line number Diff line number Diff line Loading @@ -42,12 +42,7 @@ class DebugFlags { public static final boolean WEB_BACK_FORWARD_LIST = false; public static final boolean WEB_SETTINGS = false; public static final boolean WEB_SYNC_MANAGER = false; public static final boolean WEB_TEXT_VIEW = false; public static final boolean WEB_VIEW = false; public static final boolean WEB_VIEW_CORE = false; /* * Set to true to allow the WebTextView to draw on top of the web page in a * different color with no background so you can see how the two line up. */ public static final boolean DRAW_WEBTEXTVIEW = false; public static final boolean MEASURE_PAGE_SWAP_FPS = false; } core/java/android/webkit/WebViewClassic.java +13 −3 Original line number Diff line number Diff line Loading @@ -4717,10 +4717,10 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc queueFull = nativeSetBaseLayer(mNativeClass, layer, invalRegion, showVisualIndicator, isPictureAfterFirstLayout); if (layer == 0 || isPictureAfterFirstLayout) { mWebViewCore.resumeWebKitDraw(); } else if (queueFull) { if (queueFull) { mWebViewCore.pauseWebKitDraw(); } else { mWebViewCore.resumeWebKitDraw(); } if (mHTML5VideoViewProxy != null) { Loading Loading @@ -8615,9 +8615,19 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc void onPageSwapOccurred(boolean notifyAnimationStarted); } long mLastSwapTime; double mAverageSwapFps; /** Called by JNI when pages are swapped (only occurs with hardware * acceleration) */ protected void pageSwapCallback(boolean notifyAnimationStarted) { if (DebugFlags.MEASURE_PAGE_SWAP_FPS) { long now = System.currentTimeMillis(); long diff = now - mLastSwapTime; mAverageSwapFps = ((1000.0 / diff) + mAverageSwapFps) / 2; Log.d(LOGTAG, "page swap fps: " + mAverageSwapFps); mLastSwapTime = now; } mWebViewCore.resumeWebKitDraw(); if (notifyAnimationStarted) { mWebViewCore.sendMessage(EventHub.NOTIFY_ANIMATION_STARTED); Loading core/java/android/webkit/WebViewCore.java +1 −0 Original line number Diff line number Diff line Loading @@ -2271,6 +2271,7 @@ public final class WebViewCore { mFirstLayoutForNonStandardLoad = false; } if (DebugFlags.WEB_VIEW_CORE) Log.v(LOGTAG, "webkitDraw NEW_PICTURE_MSG_ID"); pauseWebKitDraw(); Message.obtain(mWebViewClassic.mPrivateHandler, WebViewClassic.NEW_PICTURE_MSG_ID, draw).sendToTarget(); } Loading Loading
core/java/android/webkit/DebugFlags.java +1 −6 Original line number Diff line number Diff line Loading @@ -42,12 +42,7 @@ class DebugFlags { public static final boolean WEB_BACK_FORWARD_LIST = false; public static final boolean WEB_SETTINGS = false; public static final boolean WEB_SYNC_MANAGER = false; public static final boolean WEB_TEXT_VIEW = false; public static final boolean WEB_VIEW = false; public static final boolean WEB_VIEW_CORE = false; /* * Set to true to allow the WebTextView to draw on top of the web page in a * different color with no background so you can see how the two line up. */ public static final boolean DRAW_WEBTEXTVIEW = false; public static final boolean MEASURE_PAGE_SWAP_FPS = false; }
core/java/android/webkit/WebViewClassic.java +13 −3 Original line number Diff line number Diff line Loading @@ -4717,10 +4717,10 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc queueFull = nativeSetBaseLayer(mNativeClass, layer, invalRegion, showVisualIndicator, isPictureAfterFirstLayout); if (layer == 0 || isPictureAfterFirstLayout) { mWebViewCore.resumeWebKitDraw(); } else if (queueFull) { if (queueFull) { mWebViewCore.pauseWebKitDraw(); } else { mWebViewCore.resumeWebKitDraw(); } if (mHTML5VideoViewProxy != null) { Loading Loading @@ -8615,9 +8615,19 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc void onPageSwapOccurred(boolean notifyAnimationStarted); } long mLastSwapTime; double mAverageSwapFps; /** Called by JNI when pages are swapped (only occurs with hardware * acceleration) */ protected void pageSwapCallback(boolean notifyAnimationStarted) { if (DebugFlags.MEASURE_PAGE_SWAP_FPS) { long now = System.currentTimeMillis(); long diff = now - mLastSwapTime; mAverageSwapFps = ((1000.0 / diff) + mAverageSwapFps) / 2; Log.d(LOGTAG, "page swap fps: " + mAverageSwapFps); mLastSwapTime = now; } mWebViewCore.resumeWebKitDraw(); if (notifyAnimationStarted) { mWebViewCore.sendMessage(EventHub.NOTIFY_ANIMATION_STARTED); Loading
core/java/android/webkit/WebViewCore.java +1 −0 Original line number Diff line number Diff line Loading @@ -2271,6 +2271,7 @@ public final class WebViewCore { mFirstLayoutForNonStandardLoad = false; } if (DebugFlags.WEB_VIEW_CORE) Log.v(LOGTAG, "webkitDraw NEW_PICTURE_MSG_ID"); pauseWebKitDraw(); Message.obtain(mWebViewClassic.mPrivateHandler, WebViewClassic.NEW_PICTURE_MSG_ID, draw).sendToTarget(); } Loading