diff options
author | Chris Craik <ccraik@google.com> | 2012-06-20 13:41:12 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-06-20 18:03:59 -0700 |
commit | c6d9134e49f290332ca788d10104749a37e9a727 (patch) | |
tree | c67ffb7171387254f9ad0b05b922bb9f8839983b /Source | |
parent | 4dd92d0aeca7863ebbda83a97c37267c3fa09fb9 (diff) | |
download | external_webkit-c6d9134e49f290332ca788d10104749a37e9a727.zip external_webkit-c6d9134e49f290332ca788d10104749a37e9a727.tar.gz external_webkit-c6d9134e49f290332ca788d10104749a37e9a727.tar.bz2 |
Don't allow layers that draw via drawGL to merge with other surfaces
bug:6694807
They don't paint onto surfacebackings, and draw afterward, so ordering issues
occur. Ideally, they should still be allowed to merge onto surfaces and not
allow other painting layers to join the surface afterward, but this shouldn't be
wasteful in practice.
Change-Id: I7a8764bc2b8e531e718602c6114b027a9dbce42d
Diffstat (limited to 'Source')
3 files changed, 6 insertions, 2 deletions
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 @@ public: 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 @@ public: 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 @@ public: 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(); |