@@ -519,7 +519,12 @@ protected void enterFullscreenForVideoLayer(int layerId, String url) {
519519 /**
520520 * Update the layers' content
521521 */
522- private native boolean nativeUpdateLayers (int baseLayer );
522+ private native boolean nativeUpdateLayers (int nativeClass , int baseLayer );
523+
524+ /**
525+ * Notify webkit that animations have begun (on the hardware accelerated content)
526+ */
527+ private native void nativeNotifyAnimationStarted (int nativeClass );
523528
524529 private native boolean nativeFocusBoundsChanged ();
525530
@@ -1035,6 +1040,8 @@ public class EventHub {
10351040
10361041 static final int PLUGIN_SURFACE_READY = 195 ;
10371042
1043+ static final int NOTIFY_ANIMATION_STARTED = 196 ;
1044+
10381045 // private message ids
10391046 private static final int DESTROY = 200 ;
10401047
@@ -1594,6 +1601,10 @@ public void handleMessage(Message msg) {
15941601 nativePluginSurfaceReady ();
15951602 break ;
15961603
1604+ case NOTIFY_ANIMATION_STARTED :
1605+ nativeNotifyAnimationStarted (mNativeClass );
1606+ break ;
1607+
15971608 case ADD_PACKAGE_NAMES :
15981609 if (BrowserFrame .sJavaBridge == null ) {
15991610 throw new IllegalStateException ("No WebView " +
@@ -2015,7 +2026,7 @@ private void webkitDrawLayers() {
20152026 return ;
20162027 }
20172028 // Directly update the layers we last passed to the UI side
2018- if (nativeUpdateLayers (mLastDrawData .mBaseLayer )) {
2029+ if (nativeUpdateLayers (mNativeClass , mLastDrawData .mBaseLayer )) {
20192030 // If anything more complex than position has been touched, let's do a full draw
20202031 webkitDraw ();
20212032 }
0 commit comments