Changeset 69996 in webkit
- Timestamp:
- Oct 18, 2010 2:53:57 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r69990 r69996 1 2010-10-18 Adrienne Walker <enne@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Update context attribute conformance test from updated Khronos source. 6 https://bugs.webkit.org/show_bug.cgi?id=47697 7 8 * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt: 9 * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html: 10 * platform/chromium/test_expectations.txt: 11 1 12 2010-10-18 Johnny Ding <jnd@chromium.org> 2 13 -
trunk/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt
r63444 r69996 7 7 PASS webGL = getWebGL('alphaOn', { alpha: true, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null. 8 8 PASS contextAttribs = webGL.getContextAttributes() is non-null. 9 PASS contextAttribs.alpha is true10 PASS contextAttribs.depth is false11 PASS contextAttribs.stencil is false12 PASS contextAttribs.antialias is false13 PASS contextAttribs.premultipliedAlpha is true9 PASS contextAttribs.alpha is non-null. 10 PASS contextAttribs.depth is non-null. 11 PASS contextAttribs.stencil is non-null. 12 PASS contextAttribs.antialias is non-null. 13 PASS contextAttribs.premultipliedAlpha is non-null. 14 14 PASS pixel is correctColor 15 15 Testing alpha = false 16 16 PASS webGL = getWebGL('alphaOff', { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null. 17 17 PASS contextAttribs = webGL.getContextAttributes() is non-null. 18 PASS contextAttribs.alpha is false19 PASS contextAttribs.depth is false20 PASS contextAttribs.stencil is false21 PASS contextAttribs.antialias is false22 PASS contextAttribs.premultipliedAlpha is true18 PASS contextAttribs.alpha is non-null. 19 PASS contextAttribs.depth is non-null. 20 PASS contextAttribs.stencil is non-null. 21 PASS contextAttribs.antialias is non-null. 22 PASS contextAttribs.premultipliedAlpha is non-null. 23 23 PASS pixel is correctColor 24 24 Testing depth = true 25 25 PASS webGL = getWebGL('depthOn', { stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 26 26 PASS contextAttribs = webGL.getContextAttributes() is non-null. 27 PASS contextAttribs.depth is true28 PASS contextAttribs.alpha is true29 PASS contextAttribs.stencil is false30 PASS contextAttribs.antialias is false31 PASS contextAttribs.premultipliedAlpha is true27 PASS contextAttribs.depth is non-null. 28 PASS contextAttribs.alpha is non-null. 29 PASS contextAttribs.stencil is non-null. 30 PASS contextAttribs.antialias is non-null. 31 PASS contextAttribs.premultipliedAlpha is non-null. 32 32 PASS pixel is correctColor 33 33 Testing depth = false 34 34 PASS webGL = getWebGL('depthOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 35 35 PASS contextAttribs = webGL.getContextAttributes() is non-null. 36 PASS contextAttribs.depth is false37 PASS contextAttribs.alpha is true38 PASS contextAttribs.stencil is false39 PASS contextAttribs.antialias is false40 PASS contextAttribs.premultipliedAlpha is true36 PASS contextAttribs.depth is non-null. 37 PASS contextAttribs.alpha is non-null. 38 PASS contextAttribs.stencil is non-null. 39 PASS contextAttribs.antialias is non-null. 40 PASS contextAttribs.premultipliedAlpha is non-null. 41 41 PASS pixel is correctColor 42 42 Testing stencil = true 43 43 PASS webGL = getWebGL('stencilOn', { depth: false, stencil: true, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 44 44 PASS contextAttribs = webGL.getContextAttributes() is non-null. 45 PASS contextAttribs.depth == contextAttribs.stencil is true 46 PASS contextAttribs.alpha is true 47 PASS contextAttribs.antialias is false 48 PASS contextAttribs.premultipliedAlpha is true 45 PASS contextAttribs.depth is non-null. 46 PASS contextAttribs.alpha is non-null. 47 PASS contextAttribs.stencil is non-null. 48 PASS contextAttribs.antialias is non-null. 49 PASS contextAttribs.premultipliedAlpha is non-null. 49 50 PASS pixel is correctColor 50 51 Testing stencil = false 51 52 PASS webGL = getWebGL('stencilOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 52 53 PASS contextAttribs = webGL.getContextAttributes() is non-null. 53 PASS contextAttribs.depth == contextAttribs.stencil is true 54 PASS contextAttribs.alpha is true 55 PASS contextAttribs.antialias is false 56 PASS contextAttribs.premultipliedAlpha is true 54 PASS contextAttribs.depth is non-null. 55 PASS contextAttribs.alpha is non-null. 56 PASS contextAttribs.stencil is non-null. 57 PASS contextAttribs.antialias is non-null. 58 PASS contextAttribs.premultipliedAlpha is non-null. 57 59 PASS pixel is correctColor 58 60 Testing antialias = true 59 61 PASS webGL = getWebGL('antialiasOn', { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 60 62 PASS contextAttribs = webGL.getContextAttributes() is non-null. 61 PASS contextAttribs.depth is false62 PASS contextAttribs. stencil is false63 PASS contextAttribs. alpha is false64 PASS contextAttribs.antialias == true || contextAttribs.antialias == false is true65 PASS contextAttribs.premultipliedAlpha is true66 PASS pixel[0] == 255 || pixel[0] == 0 is false63 PASS contextAttribs.depth is non-null. 64 PASS contextAttribs.alpha is non-null. 65 PASS contextAttribs.stencil is non-null. 66 PASS contextAttribs.antialias is non-null. 67 PASS contextAttribs.premultipliedAlpha is non-null. 68 PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias 67 69 Testing antialias = false 68 70 PASS webGL = getWebGL('antialiasOff', { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 69 71 PASS contextAttribs = webGL.getContextAttributes() is non-null. 70 PASS contextAttribs.depth is false71 PASS contextAttribs. stencil is false72 PASS contextAttribs. alpha is false73 PASS contextAttribs.antialias == true || contextAttribs.antialias == false is true74 PASS contextAttribs.premultipliedAlpha is true75 PASS pixel[0] == 255 || pixel[0] == 0 is true72 PASS contextAttribs.depth is non-null. 73 PASS contextAttribs.alpha is non-null. 74 PASS contextAttribs.stencil is non-null. 75 PASS contextAttribs.antialias is non-null. 76 PASS contextAttribs.premultipliedAlpha is non-null. 77 PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias 76 78 PASS successfullyParsed is true 77 79 -
trunk/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
r65740 r69996 56 56 return null; 57 57 } 58 var actualContextAttribs = gl.getContextAttributes();59 58 60 59 // Add a console … … 142 141 shouldBeNonNull("webGL = getWebGL('alphaOff', { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)"); 143 142 shouldBeNonNull("contextAttribs = webGL.getContextAttributes()"); 144 shouldBe ("contextAttribs.alpha", (alpha ? "true" : "false"));145 shouldBe ("contextAttribs.depth", "false");146 shouldBe ("contextAttribs.stencil", "false");147 shouldBe ("contextAttribs.antialias", "false");148 shouldBe ("contextAttribs.premultipliedAlpha", "true");143 shouldBeNonNull("contextAttribs.alpha"); 144 shouldBeNonNull("contextAttribs.depth"); 145 shouldBeNonNull("contextAttribs.stencil"); 146 shouldBeNonNull("contextAttribs.antialias"); 147 shouldBeNonNull("contextAttribs.premultipliedAlpha"); 149 148 150 149 var buf = new Uint8Array(1 * 1 * 4); … … 154 153 pixel[2] = buf[2]; 155 154 pixel[3] = buf[3]; 156 correctColor = ( alpha ? [0, 0, 0, 0] : [0, 0, 0, 255]);155 correctColor = (contextAttribs.alpha ? [0, 0, 0, 0] : [0, 0, 0, 255]); 157 156 shouldBe("pixel", "correctColor"); 158 157 } … … 166 165 shouldBeNonNull("webGL = getWebGL('depthOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)"); 167 166 shouldBeNonNull("contextAttribs = webGL.getContextAttributes()"); 168 shouldBe ("contextAttribs.depth", (depth ? "true" : "false"));169 shouldBe ("contextAttribs.alpha", "true");170 shouldBe ("contextAttribs.stencil", "false");171 shouldBe ("contextAttribs.antialias", "false");172 shouldBe ("contextAttribs.premultipliedAlpha", "true");167 shouldBeNonNull("contextAttribs.depth"); 168 shouldBeNonNull("contextAttribs.alpha"); 169 shouldBeNonNull("contextAttribs.stencil"); 170 shouldBeNonNull("contextAttribs.antialias"); 171 shouldBeNonNull("contextAttribs.premultipliedAlpha"); 173 172 174 173 webGL.depthFunc(webGL.NEVER); … … 194 193 pixel[2] = buf[2]; 195 194 pixel[3] = buf[3]; 196 correctColor = ( depth ? [0, 0, 0, 255] : [255, 0, 0, 255]);195 correctColor = (contextAttribs.depth ? [0, 0, 0, 255] : [255, 0, 0, 255]); 197 196 shouldBe("pixel", "correctColor"); 198 197 } … … 206 205 shouldBeNonNull("webGL = getWebGL('stencilOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)"); 207 206 shouldBeNonNull("contextAttribs = webGL.getContextAttributes()"); 208 // If EXT_packed_depth_stencil is supported, both depth & stencil will be true; otherwise, both will be false.209 shouldBe ("contextAttribs.depth == contextAttribs.stencil", "true");210 shouldBe ("contextAttribs.alpha", "true");211 shouldBe ("contextAttribs.antialias", "false");212 shouldBe ("contextAttribs.premultipliedAlpha", "true");207 shouldBeNonNull("contextAttribs.depth"); 208 shouldBeNonNull("contextAttribs.alpha"); 209 shouldBeNonNull("contextAttribs.stencil"); 210 shouldBeNonNull("contextAttribs.antialias"); 211 shouldBeNonNull("contextAttribs.premultipliedAlpha"); 213 212 214 213 webGL.depthFunc(webGL.ALWAYS); … … 237 236 pixel[2] = buf[2]; 238 237 pixel[3] = buf[3]; 239 correctColor = (stencil ? [0, 0, 0, 255] : [255, 0, 0, 255]); 240 // If stencil is requested but not supported, we fake the effect. 241 if (stencil && !contextAttribs.stencil) 242 pixel[0] = 0; 238 correctColor = (contextAttribs.stencil ? [0, 0, 0, 255] : [255, 0, 0, 255]); 243 239 shouldBe("pixel", "correctColor"); 244 240 } … … 252 248 shouldBeNonNull("webGL = getWebGL('antialiasOff', { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)"); 253 249 shouldBeNonNull("contextAttribs = webGL.getContextAttributes()"); 254 shouldBe ("contextAttribs.depth", "false");255 shouldBe ("contextAttribs.stencil", "false");256 shouldBe ("contextAttribs.alpha", "false");257 shouldBe ("contextAttribs.antialias == true || contextAttribs.antialias == false", "true");258 shouldBe ("contextAttribs.premultipliedAlpha", "true");250 shouldBeNonNull("contextAttribs.depth"); 251 shouldBeNonNull("contextAttribs.alpha"); 252 shouldBeNonNull("contextAttribs.stencil"); 253 shouldBeNonNull("contextAttribs.antialias"); 254 shouldBeNonNull("contextAttribs.premultipliedAlpha"); 259 255 260 256 var vertices = new Float32Array([ … … 268 264 var buf = drawAndReadPixel(webGL, vertices, colors, 0, 0); 269 265 pixel[0] = buf[0]; 270 // If antialias is requested but not supported, we fake the effect. 271 if (antialias && !contextAttribs.antialias) 272 pixel[0] = 127; 273 shouldBe("pixel[0] == 255 || pixel[0] == 0", (antialias ? "false" : "true")); 266 shouldBe("pixel[0] != 255 && pixel[0] != 0", "contextAttribs.antialias"); 274 267 } 275 268 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r69989 r69996 3051 3051 BUGWK45898 : editing/selection/context-menu-on-text.html = TEXT 3052 3052 3053 BUGWEBGL WIN LINUX : fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html = TEXT3054 3053 BUGWEBGL : fast/canvas/webgl/css-webkit-canvas-repaint.html = IMAGE 3055 3054 BUGWEBGL : fast/canvas/webgl/css-webkit-canvas.html = IMAGE -
trunk/WebKit/chromium/ChangeLog
r69993 r69996 1 2010-10-18 Adrienne Walker <enne@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Turn off antialiasing when using Mesa during testing. 6 https://bugs.webkit.org/show_bug.cgi?id=47697 7 8 * src/WebGraphicsContext3DDefaultImpl.cpp: 9 (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes): 10 1 11 2010-10-18 James Robinson <jamesr@chromium.org> 2 12 -
trunk/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
r69627 r69996 197 197 if (!isValidVendor || !strstr(extensions, "GL_EXT_framebuffer_multisample")) 198 198 m_attributes.antialias = false; 199 200 // Don't antialias when using Mesa to ensure more reliable testing and 201 // because it doesn't appear to multisample straight lines correctly. 202 const char* renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER)); 203 if (!strncmp(renderer, "Mesa", 4)) 204 m_attributes.antialias = false; 199 205 } 200 206 // FIXME: instead of enforcing premultipliedAlpha = true, implement the
Note: See TracChangeset
for help on using the changeset viewer.