Merge "Make viewport dirtyness calculations recursive" into jb-dev
diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
index 79c84b4..41f6420 100644
--- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
+++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
@@ -274,7 +274,9 @@
 
     void setIntrinsicallyComposited(bool intCom) { m_intrinsicallyComposited = intCom; }
     virtual bool needsIsolatedSurface() {
-        return (needsTexture() && m_intrinsicallyComposited) || m_animations.size();
+        return (needsTexture() && m_intrinsicallyComposited)
+            || m_animations.size()
+            || m_imageCRC;
     }
 
     int setHwAccelerated(bool hwAccelerated);
diff --git a/Source/WebCore/platform/graphics/android/layers/MediaLayer.h b/Source/WebCore/platform/graphics/android/layers/MediaLayer.h
index 2f39d74..8e04681 100644
--- a/Source/WebCore/platform/graphics/android/layers/MediaLayer.h
+++ b/Source/WebCore/platform/graphics/android/layers/MediaLayer.h
@@ -39,6 +39,7 @@
     virtual bool drawGL(bool layerTilesDisabled);
     virtual void paintBitmapGL() const { };
     virtual bool needsTexture() { return false; }
+    virtual bool needsIsolatedSurface() { return true; }
 
     virtual bool isMedia() const { return true; }
     virtual LayerAndroid* copy() const { return new MediaLayer(*this); }
diff --git a/Source/WebCore/platform/graphics/android/layers/VideoLayerAndroid.h b/Source/WebCore/platform/graphics/android/layers/VideoLayerAndroid.h
index dd88a85..5ebf615 100644
--- a/Source/WebCore/platform/graphics/android/layers/VideoLayerAndroid.h
+++ b/Source/WebCore/platform/graphics/android/layers/VideoLayerAndroid.h
@@ -55,9 +55,10 @@
     virtual bool isVideo() const { return true; }
     virtual LayerAndroid* copy() const { return new VideoLayerAndroid(*this); }
 
-    // The following 3 functions are called in UI thread only.
+    // The following functions are called in UI thread only.
     virtual bool drawGL(bool layerTilesDisabled);
     void setSurfaceTexture(sp<SurfaceTexture> texture, int textureName, PlayerState playerState);
+    virtual bool needsIsolatedSurface() { return true; }
 
 private:
     void init();