diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2011-04-06 09:17:25 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-04-06 09:17:25 -0700 |
commit | 1073404d02b05a3ae3575b9780c2d28a2b7e4267 (patch) | |
tree | f1920a29d4266e7ba3781f6253bf98d556f02492 /WebCore/platform | |
parent | 80c06d24e31c7e1eb524eaf19fc98090bec94b0d (diff) | |
parent | 717aae031938e939a9dfc6a8f2fb80430deb49f2 (diff) | |
download | external_webkit-1073404d02b05a3ae3575b9780c2d28a2b7e4267.zip external_webkit-1073404d02b05a3ae3575b9780c2d28a2b7e4267.tar.gz external_webkit-1073404d02b05a3ae3575b9780c2d28a2b7e4267.tar.bz2 |
Merge "Fix EGL error"
Diffstat (limited to 'WebCore/platform')
-rw-r--r-- | WebCore/platform/graphics/android/SharedTexture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/WebCore/platform/graphics/android/SharedTexture.cpp b/WebCore/platform/graphics/android/SharedTexture.cpp index 495fdd0..040a28a 100644 --- a/WebCore/platform/graphics/android/SharedTexture.cpp +++ b/WebCore/platform/graphics/android/SharedTexture.cpp @@ -156,8 +156,9 @@ void SharedTexture::releaseSource() m_targetTexture.copyAttributes(&m_sourceTexture); } - // create an image from the texture - if (m_eglImage == EGL_NO_IMAGE_KHR) { + // create an image from the texture, only when the texture is valid + if (m_eglImage == EGL_NO_IMAGE_KHR && m_sourceTexture.m_width + && m_sourceTexture.m_height) { GLUtils::createEGLImageFromTexture(m_sourceTexture.m_textureId, &m_eglImage); LOGV("Generating Image (%d) 0x%x", m_sourceTexture.m_textureId, m_eglImage); |