diff options
author | Nicolas Roard <nicolas@android.com> | 2011-01-25 15:51:14 -0800 |
---|---|---|
committer | Nicolas Roard <nicolas@android.com> | 2011-01-25 16:34:46 -0800 |
commit | bc87f888df256a489e174b10c22d270f64903a3e (patch) | |
tree | 539f01b803f95150d59b19bc7101d4212d0065ec /WebCore/platform/graphics/android/GLUtils.cpp | |
parent | e5271873d9e1e31a104d4253395c333c67e26ab5 (diff) | |
download | external_webkit-bc87f888df256a489e174b10c22d270f64903a3e.zip external_webkit-bc87f888df256a489e174b10c22d270f64903a3e.tar.gz external_webkit-bc87f888df256a489e174b10c22d270f64903a3e.tar.bz2 |
Implement a workaround for the texture corruption
bug:3332441
Change-Id: Ifd5dfa8a5d7718ad754a8a7984b871bb84147f37
Diffstat (limited to 'WebCore/platform/graphics/android/GLUtils.cpp')
-rw-r--r-- | WebCore/platform/graphics/android/GLUtils.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/android/GLUtils.cpp b/WebCore/platform/graphics/android/GLUtils.cpp index 7a8fd26..b62072b 100644 --- a/WebCore/platform/graphics/android/GLUtils.cpp +++ b/WebCore/platform/graphics/android/GLUtils.cpp @@ -316,6 +316,16 @@ void GLUtils::createTextureWithBitmap(GLuint texture, SkBitmap& bitmap, GLint fi } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); + + // The following is a workaround -- remove when EGLImage texture upload is fixed. + GLuint fboID; + glGenFramebuffers(1, &fboID); + glBindFramebuffer(GL_FRAMEBUFFER, fboID); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0); + glCheckFramebufferStatus(GL_FRAMEBUFFER); // should return GL_FRAMEBUFFER_COMPLETE + + glBindFramebuffer(GL_FRAMEBUFFER, 0); // rebind the standard FBO + glDeleteFramebuffers(1, &fboID); } void GLUtils::updateTextureWithBitmap(GLuint texture, SkBitmap& bitmap, GLint filter) |