From bc87f888df256a489e174b10c22d270f64903a3e Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Tue, 25 Jan 2011 15:51:14 -0800 Subject: Implement a workaround for the texture corruption bug:3332441 Change-Id: Ifd5dfa8a5d7718ad754a8a7984b871bb84147f37 --- WebCore/platform/graphics/android/GLUtils.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'WebCore/platform/graphics/android/GLUtils.cpp') 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) -- cgit v1.1