Changeset 70784 in webkit
- Timestamp:
- Oct 28, 2010 9:51:15 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r70783 r70784 1 2010-10-27 Zhenyao Mo <zmo@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Work around a Mac driver bug in generateMipmap 6 https://bugs.webkit.org/show_bug.cgi?id=48489 7 8 * fast/canvas/webgl/texture-npot-expected.txt: Add back the failing part due to the generateMipmap Mac driver bug. 9 * fast/canvas/webgl/texture-npot.html: Ditto. 10 1 11 2010-10-28 Mikhail Naganov <mnaganov@chromium.org> 2 12 -
trunk/LayoutTests/fast/canvas/webgl/texture-npot-expected.txt
r65277 r70784 25 25 PASS POT cubemap with TEXTURE_MIN_FILTER set to LINEAR_MIPMAP_LINEAR but no mips draw with 0,0,0,255 26 26 PASS getError was expected value: NO_ERROR : gl.generateMipmap with POT texture should return succeed 27 PASS POT cubemap with TEXTURE_MIN_FILTER set to LINEAR_MIPMAP_LINEAR should draw. 27 28 PASS successfullyParsed is true 28 29 -
trunk/LayoutTests/fast/canvas/webgl/texture-npot.html
r65277 r70784 189 189 "gl.generateMipmap with POT texture should return succeed"); 190 190 191 // FIXME: add the test back once the bug is fixed. 192 //wtu.drawQuad(gl); 193 //wtu.checkCanvas( 194 // gl, [0, 192, 128, 255], 195 // "POT cubemap with TEXTURE_MIN_FILTER set to LINEAR_MIPMAP_LINEAR should draw."); 191 wtu.drawQuad(gl); 192 wtu.checkCanvas( 193 gl, [0, 192, 128, 255], 194 "POT cubemap with TEXTURE_MIN_FILTER set to LINEAR_MIPMAP_LINEAR should draw."); 196 195 197 196 successfullyParsed = true; -
trunk/WebCore/ChangeLog
r70775 r70784 1 2010-10-27 Zhenyao Mo <zmo@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Work around a Mac driver bug in generateMipmap 6 https://bugs.webkit.org/show_bug.cgi?id=48489 7 8 * html/canvas/WebGLRenderingContext.cpp: 9 (WebCore::WebGLRenderingContext::generateMipmap): Make sure minFilter is set to NEAREST_MIPMAP_LINEAR before generateMipmap, and after the call, set it back to the original value. 10 * html/canvas/WebGLTexture.h: 11 (WebCore::WebGLTexture::getMinFilter): Return the cached minFilter value. 12 1 13 2010-10-28 Mikhail Naganov <mnaganov@chromium.org> 2 14 -
trunk/WebCore/html/canvas/WebGLRenderingContext.cpp
r70663 r70784 1152 1152 return; 1153 1153 } 1154 // generateMipmap won't work properly if minFilter is not NEAREST_MIPMAP_LINEAR 1155 // on Mac. Remove the hack once this driver bug is fixed. 1156 #if OS(DARWIN) 1157 bool needToResetMinFilter = false; 1158 if (tex->getMinFilter() != GraphicsContext3D::NEAREST_MIPMAP_LINEAR) { 1159 m_context->texParameteri(target, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::NEAREST_MIPMAP_LINEAR); 1160 needToResetMinFilter = true; 1161 } 1162 #endif 1154 1163 m_context->generateMipmap(target); 1164 #if OS(DARWIN) 1165 if (needToResetMinFilter) 1166 m_context->texParameteri(target, GraphicsContext3D::TEXTURE_MIN_FILTER, tex->getMinFilter()); 1167 #endif 1155 1168 tex->generateMipmapLevelInfo(); 1156 1169 cleanupAfterGraphicsCall(false); -
trunk/WebCore/html/canvas/WebGLTexture.h
r66509 r70784 44 44 void setParameteri(unsigned long pname, int param); 45 45 void setParameterf(unsigned long pname, float param); 46 47 int getMinFilter() const { return m_minFilter; } 46 48 47 49 void setLevelInfo(unsigned long target, int level, unsigned long internalFormat, int width, int height, unsigned long type);
Note: See TracChangeset
for help on using the changeset viewer.