summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/SharedTexture.cpp
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2011-03-25 10:35:14 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-03-25 10:35:14 -0700
commit8527f14d378e1fb4ba315d791f3c8c7b776bff4c (patch)
tree57cf9f775f93718a128e13647d5283caa5a7081b /WebCore/platform/graphics/android/SharedTexture.cpp
parent70e1ff0b3913af6a122390bbe4768c2c0fea045d (diff)
parent92c3acf6b42939215be09fe379bfef07ab703216 (diff)
downloadexternal_webkit-8527f14d378e1fb4ba315d791f3c8c7b776bff4c.zip
external_webkit-8527f14d378e1fb4ba315d791f3c8c7b776bff4c.tar.gz
external_webkit-8527f14d378e1fb4ba315d791f3c8c7b776bff4c.tar.bz2
am 92c3acf6: Fix error where mediaLayer is derefed on UI thread prior to being derefed in Webkit.
* commit '92c3acf6b42939215be09fe379bfef07ab703216': Fix error where mediaLayer is derefed on UI thread prior to being derefed in Webkit.
Diffstat (limited to 'WebCore/platform/graphics/android/SharedTexture.cpp')
-rw-r--r--WebCore/platform/graphics/android/SharedTexture.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/WebCore/platform/graphics/android/SharedTexture.cpp b/WebCore/platform/graphics/android/SharedTexture.cpp
index 8c703d4..495fdd0 100644
--- a/WebCore/platform/graphics/android/SharedTexture.cpp
+++ b/WebCore/platform/graphics/android/SharedTexture.cpp
@@ -80,10 +80,7 @@ SharedTexture::SharedTexture()
// source texture and EGLImage is the responsibility of the caller.
SharedTexture::~SharedTexture()
{
- if (m_supportsEGLImage)
- GLUtils::deleteTexture(&m_targetTexture.m_textureId);
- else
- GLUtils::deleteTexture(&m_sourceTexture.m_textureId);
+ deleteTargetTexture();
}
void SharedTexture::initSourceTexture()
@@ -120,6 +117,14 @@ void SharedTexture::deleteSourceTexture()
}
}
+void SharedTexture::deleteTargetTexture()
+{
+ if (m_supportsEGLImage)
+ GLUtils::deleteTexture(&m_targetTexture.m_textureId);
+ else
+ GLUtils::deleteTexture(&m_sourceTexture.m_textureId);
+}
+
TextureInfo* SharedTexture::lockSource()
{
m_lock.lock();