summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/SharedTexture.cpp
diff options
context:
space:
mode:
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();