Loading core/java/android/webkit/WebView.java +8 −4 Original line number Diff line number Diff line Loading @@ -4604,13 +4604,14 @@ public class WebView extends AbsoluteLayout boolean UIAnimationsRunning = false; // Currently for each draw we compute the animation values; // We may in the future decide to do that independently. if (mNativeClass != 0 && nativeEvaluateLayersAnimations(mNativeClass)) { if (mNativeClass != 0 && !canvas.isHardwareAccelerated() && nativeEvaluateLayersAnimations(mNativeClass)) { UIAnimationsRunning = true; // If we have unfinished (or unstarted) animations, // we ask for a repaint. We only need to do this in software // rendering (with hardware rendering we already have a different // method of requesting a repaint) if (!canvas.isHardwareAccelerated()) mWebViewCore.sendMessage(EventHub.NOTIFY_ANIMATION_STARTED); invalidate(); } Loading Loading @@ -8796,10 +8797,13 @@ public class WebView extends AbsoluteLayout /** @hide Called by JNI when pages are swapped (only occurs with hardware * acceleration) */ protected void pageSwapCallback() { protected void pageSwapCallback(boolean notifyAnimationStarted) { if (inEditingMode()) { didUpdateWebTextViewDimensions(ANYWHERE); } if (notifyAnimationStarted) { mWebViewCore.sendMessage(EventHub.NOTIFY_ANIMATION_STARTED); } } void setNewPicture(final WebViewCore.DrawData draw, boolean updateBaseLayer) { Loading core/java/android/webkit/WebViewCore.java +13 −2 Original line number Diff line number Diff line Loading @@ -519,7 +519,12 @@ public final class WebViewCore { /** * Update the layers' content */ private native boolean nativeUpdateLayers(int baseLayer); private native boolean nativeUpdateLayers(int nativeClass, int baseLayer); /** * Notify webkit that animations have begun (on the hardware accelerated content) */ private native void nativeNotifyAnimationStarted(int nativeClass); private native boolean nativeFocusBoundsChanged(); Loading Loading @@ -1035,6 +1040,8 @@ public final class WebViewCore { static final int PLUGIN_SURFACE_READY = 195; static final int NOTIFY_ANIMATION_STARTED = 196; // private message ids private static final int DESTROY = 200; Loading Loading @@ -1594,6 +1601,10 @@ public final class WebViewCore { nativePluginSurfaceReady(); break; case NOTIFY_ANIMATION_STARTED: nativeNotifyAnimationStarted(mNativeClass); break; case ADD_PACKAGE_NAMES: if (BrowserFrame.sJavaBridge == null) { throw new IllegalStateException("No WebView " + Loading Loading @@ -2015,7 +2026,7 @@ public final class WebViewCore { return; } // Directly update the layers we last passed to the UI side if (nativeUpdateLayers(mLastDrawData.mBaseLayer)) { if (nativeUpdateLayers(mNativeClass, mLastDrawData.mBaseLayer)) { // If anything more complex than position has been touched, let's do a full draw webkitDraw(); } Loading tests/TileBenchmark/src/com/test/tilebenchmark/ProfiledWebView.java +2 −2 Original line number Diff line number Diff line Loading @@ -110,9 +110,9 @@ public class ProfiledWebView extends WebView { * been redrawn. */ @Override protected void pageSwapCallback() { protected void pageSwapCallback(boolean startAnim) { mContentInvalMillis = System.currentTimeMillis() - mContentInvalMillis; super.pageSwapCallback(); super.pageSwapCallback(startAnim); Log.d("ProfiledWebView", "REDRAW TOOK " + mContentInvalMillis + "millis"); mIsTesting = true; Loading Loading
core/java/android/webkit/WebView.java +8 −4 Original line number Diff line number Diff line Loading @@ -4604,13 +4604,14 @@ public class WebView extends AbsoluteLayout boolean UIAnimationsRunning = false; // Currently for each draw we compute the animation values; // We may in the future decide to do that independently. if (mNativeClass != 0 && nativeEvaluateLayersAnimations(mNativeClass)) { if (mNativeClass != 0 && !canvas.isHardwareAccelerated() && nativeEvaluateLayersAnimations(mNativeClass)) { UIAnimationsRunning = true; // If we have unfinished (or unstarted) animations, // we ask for a repaint. We only need to do this in software // rendering (with hardware rendering we already have a different // method of requesting a repaint) if (!canvas.isHardwareAccelerated()) mWebViewCore.sendMessage(EventHub.NOTIFY_ANIMATION_STARTED); invalidate(); } Loading Loading @@ -8796,10 +8797,13 @@ public class WebView extends AbsoluteLayout /** @hide Called by JNI when pages are swapped (only occurs with hardware * acceleration) */ protected void pageSwapCallback() { protected void pageSwapCallback(boolean notifyAnimationStarted) { if (inEditingMode()) { didUpdateWebTextViewDimensions(ANYWHERE); } if (notifyAnimationStarted) { mWebViewCore.sendMessage(EventHub.NOTIFY_ANIMATION_STARTED); } } void setNewPicture(final WebViewCore.DrawData draw, boolean updateBaseLayer) { Loading
core/java/android/webkit/WebViewCore.java +13 −2 Original line number Diff line number Diff line Loading @@ -519,7 +519,12 @@ public final class WebViewCore { /** * Update the layers' content */ private native boolean nativeUpdateLayers(int baseLayer); private native boolean nativeUpdateLayers(int nativeClass, int baseLayer); /** * Notify webkit that animations have begun (on the hardware accelerated content) */ private native void nativeNotifyAnimationStarted(int nativeClass); private native boolean nativeFocusBoundsChanged(); Loading Loading @@ -1035,6 +1040,8 @@ public final class WebViewCore { static final int PLUGIN_SURFACE_READY = 195; static final int NOTIFY_ANIMATION_STARTED = 196; // private message ids private static final int DESTROY = 200; Loading Loading @@ -1594,6 +1601,10 @@ public final class WebViewCore { nativePluginSurfaceReady(); break; case NOTIFY_ANIMATION_STARTED: nativeNotifyAnimationStarted(mNativeClass); break; case ADD_PACKAGE_NAMES: if (BrowserFrame.sJavaBridge == null) { throw new IllegalStateException("No WebView " + Loading Loading @@ -2015,7 +2026,7 @@ public final class WebViewCore { return; } // Directly update the layers we last passed to the UI side if (nativeUpdateLayers(mLastDrawData.mBaseLayer)) { if (nativeUpdateLayers(mNativeClass, mLastDrawData.mBaseLayer)) { // If anything more complex than position has been touched, let's do a full draw webkitDraw(); } Loading
tests/TileBenchmark/src/com/test/tilebenchmark/ProfiledWebView.java +2 −2 Original line number Diff line number Diff line Loading @@ -110,9 +110,9 @@ public class ProfiledWebView extends WebView { * been redrawn. */ @Override protected void pageSwapCallback() { protected void pageSwapCallback(boolean startAnim) { mContentInvalMillis = System.currentTimeMillis() - mContentInvalMillis; super.pageSwapCallback(); super.pageSwapCallback(startAnim); Log.d("ProfiledWebView", "REDRAW TOOK " + mContentInvalMillis + "millis"); mIsTesting = true; Loading