[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:44:03 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 7900c0fcbf34cbf569751acd108b0428354cc0a9
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 18 21:53:57 2010 +0000

    2010-10-18  Adrienne Walker  <enne at google.com>
    
            Reviewed by Kenneth Russell.
    
            Update context attribute conformance test from updated Khronos source.
            https://bugs.webkit.org/show_bug.cgi?id=47697
    
            * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt:
            * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html:
            * platform/chromium/test_expectations.txt:
    2010-10-18  Adrienne Walker  <enne at google.com>
    
            Reviewed by Kenneth Russell.
    
            Turn off antialiasing when using Mesa during testing.
            https://bugs.webkit.org/show_bug.cgi?id=47697
    
            * src/WebGraphicsContext3DDefaultImpl.cpp:
            (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69996 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d99b741..c464bae 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-18  Adrienne Walker  <enne at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        Update context attribute conformance test from updated Khronos source.
+        https://bugs.webkit.org/show_bug.cgi?id=47697
+
+        * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt:
+        * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html:
+        * platform/chromium/test_expectations.txt:
+
 2010-10-18  Johnny Ding  <jnd at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt b/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt
index bdd5c8c..dd1885e 100644
--- a/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt
@@ -6,73 +6,75 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 Testing alpha = true
 PASS webGL = getWebGL('alphaOn', { alpha: true, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
 PASS contextAttribs = webGL.getContextAttributes() is non-null.
-PASS contextAttribs.alpha is true
-PASS contextAttribs.depth is false
-PASS contextAttribs.stencil is false
-PASS contextAttribs.antialias is false
-PASS contextAttribs.premultipliedAlpha is true
+PASS contextAttribs.alpha is non-null.
+PASS contextAttribs.depth is non-null.
+PASS contextAttribs.stencil is non-null.
+PASS contextAttribs.antialias is non-null.
+PASS contextAttribs.premultipliedAlpha is non-null.
 PASS pixel is correctColor
 Testing alpha = false
 PASS webGL = getWebGL('alphaOff', { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
 PASS contextAttribs = webGL.getContextAttributes() is non-null.
-PASS contextAttribs.alpha is false
-PASS contextAttribs.depth is false
-PASS contextAttribs.stencil is false
-PASS contextAttribs.antialias is false
-PASS contextAttribs.premultipliedAlpha is true
+PASS contextAttribs.alpha is non-null.
+PASS contextAttribs.depth is non-null.
+PASS contextAttribs.stencil is non-null.
+PASS contextAttribs.antialias is non-null.
+PASS contextAttribs.premultipliedAlpha is non-null.
 PASS pixel is correctColor
 Testing depth = true
 PASS webGL = getWebGL('depthOn', { stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
 PASS contextAttribs = webGL.getContextAttributes() is non-null.
-PASS contextAttribs.depth is true
-PASS contextAttribs.alpha is true
-PASS contextAttribs.stencil is false
-PASS contextAttribs.antialias is false
-PASS contextAttribs.premultipliedAlpha is true
+PASS contextAttribs.depth is non-null.
+PASS contextAttribs.alpha is non-null.
+PASS contextAttribs.stencil is non-null.
+PASS contextAttribs.antialias is non-null.
+PASS contextAttribs.premultipliedAlpha is non-null.
 PASS pixel is correctColor
 Testing depth = false
 PASS webGL = getWebGL('depthOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
 PASS contextAttribs = webGL.getContextAttributes() is non-null.
-PASS contextAttribs.depth is false
-PASS contextAttribs.alpha is true
-PASS contextAttribs.stencil is false
-PASS contextAttribs.antialias is false
-PASS contextAttribs.premultipliedAlpha is true
+PASS contextAttribs.depth is non-null.
+PASS contextAttribs.alpha is non-null.
+PASS contextAttribs.stencil is non-null.
+PASS contextAttribs.antialias is non-null.
+PASS contextAttribs.premultipliedAlpha is non-null.
 PASS pixel is correctColor
 Testing stencil = true
 PASS webGL = getWebGL('stencilOn', { depth: false, stencil: true, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
 PASS contextAttribs = webGL.getContextAttributes() is non-null.
-PASS contextAttribs.depth == contextAttribs.stencil is true
-PASS contextAttribs.alpha is true
-PASS contextAttribs.antialias is false
-PASS contextAttribs.premultipliedAlpha is true
+PASS contextAttribs.depth is non-null.
+PASS contextAttribs.alpha is non-null.
+PASS contextAttribs.stencil is non-null.
+PASS contextAttribs.antialias is non-null.
+PASS contextAttribs.premultipliedAlpha is non-null.
 PASS pixel is correctColor
 Testing stencil = false
 PASS webGL = getWebGL('stencilOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
 PASS contextAttribs = webGL.getContextAttributes() is non-null.
-PASS contextAttribs.depth == contextAttribs.stencil is true
-PASS contextAttribs.alpha is true
-PASS contextAttribs.antialias is false
-PASS contextAttribs.premultipliedAlpha is true
+PASS contextAttribs.depth is non-null.
+PASS contextAttribs.alpha is non-null.
+PASS contextAttribs.stencil is non-null.
+PASS contextAttribs.antialias is non-null.
+PASS contextAttribs.premultipliedAlpha is non-null.
 PASS pixel is correctColor
 Testing antialias = true
 PASS webGL = getWebGL('antialiasOn', { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
 PASS contextAttribs = webGL.getContextAttributes() is non-null.
-PASS contextAttribs.depth is false
-PASS contextAttribs.stencil is false
-PASS contextAttribs.alpha is false
-PASS contextAttribs.antialias == true || contextAttribs.antialias == false is true
-PASS contextAttribs.premultipliedAlpha is true
-PASS pixel[0] == 255 || pixel[0] == 0 is false
+PASS contextAttribs.depth is non-null.
+PASS contextAttribs.alpha is non-null.
+PASS contextAttribs.stencil is non-null.
+PASS contextAttribs.antialias is non-null.
+PASS contextAttribs.premultipliedAlpha is non-null.
+PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias
 Testing antialias = false
 PASS webGL = getWebGL('antialiasOff', { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
 PASS contextAttribs = webGL.getContextAttributes() is non-null.
-PASS contextAttribs.depth is false
-PASS contextAttribs.stencil is false
-PASS contextAttribs.alpha is false
-PASS contextAttribs.antialias == true || contextAttribs.antialias == false is true
-PASS contextAttribs.premultipliedAlpha is true
-PASS pixel[0] == 255 || pixel[0] == 0 is true
+PASS contextAttribs.depth is non-null.
+PASS contextAttribs.alpha is non-null.
+PASS contextAttribs.stencil is non-null.
+PASS contextAttribs.antialias is non-null.
+PASS contextAttribs.premultipliedAlpha is non-null.
+PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html b/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
index d75de36..4d0bdb8 100644
--- a/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
+++ b/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
@@ -55,7 +55,6 @@ function getWebGL(canvasName, contextAttribs, clearColor, clearDepth, clearStenc
         alert("No WebGL context found");
         return null;
     }
-    var actualContextAttribs = gl.getContextAttributes();
 
     // Add a console
     gl.console = ("console" in window) ? window.console : { log: function() { } };
@@ -141,11 +140,11 @@ function testAlpha(alpha)
     else
         shouldBeNonNull("webGL = getWebGL('alphaOff', { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)");
     shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
-    shouldBe("contextAttribs.alpha", (alpha ? "true" : "false"));
-    shouldBe("contextAttribs.depth", "false");
-    shouldBe("contextAttribs.stencil", "false");
-    shouldBe("contextAttribs.antialias", "false");
-    shouldBe("contextAttribs.premultipliedAlpha", "true");
+    shouldBeNonNull("contextAttribs.alpha");
+    shouldBeNonNull("contextAttribs.depth");
+    shouldBeNonNull("contextAttribs.stencil");
+    shouldBeNonNull("contextAttribs.antialias");
+    shouldBeNonNull("contextAttribs.premultipliedAlpha");
 
     var buf = new Uint8Array(1 * 1 * 4);
     webGL.readPixels(0, 0, 1, 1, webGL.RGBA, webGL.UNSIGNED_BYTE, buf);
@@ -153,7 +152,7 @@ function testAlpha(alpha)
     pixel[1] = buf[1];
     pixel[2] = buf[2];
     pixel[3] = buf[3];
-    correctColor = (alpha ? [0, 0, 0, 0] : [0, 0, 0, 255]);
+    correctColor = (contextAttribs.alpha ? [0, 0, 0, 0] : [0, 0, 0, 255]);
     shouldBe("pixel", "correctColor");
 }
 
@@ -165,11 +164,11 @@ function testDepth(depth)
     else
         shouldBeNonNull("webGL = getWebGL('depthOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
     shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
-    shouldBe("contextAttribs.depth", (depth ? "true" : "false"));
-    shouldBe("contextAttribs.alpha", "true");
-    shouldBe("contextAttribs.stencil", "false");
-    shouldBe("contextAttribs.antialias", "false");
-    shouldBe("contextAttribs.premultipliedAlpha", "true");
+    shouldBeNonNull("contextAttribs.depth");
+    shouldBeNonNull("contextAttribs.alpha");
+    shouldBeNonNull("contextAttribs.stencil");
+    shouldBeNonNull("contextAttribs.antialias");
+    shouldBeNonNull("contextAttribs.premultipliedAlpha");
 
     webGL.depthFunc(webGL.NEVER);
 
@@ -193,7 +192,7 @@ function testDepth(depth)
     pixel[1] = buf[1];
     pixel[2] = buf[2];
     pixel[3] = buf[3];
-    correctColor = (depth ? [0, 0, 0, 255] : [255, 0, 0, 255]);
+    correctColor = (contextAttribs.depth ? [0, 0, 0, 255] : [255, 0, 0, 255]);
     shouldBe("pixel", "correctColor");
 }
 
@@ -205,11 +204,11 @@ function testStencil(stencil)
     else
         shouldBeNonNull("webGL = getWebGL('stencilOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
     shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
-    // If EXT_packed_depth_stencil is supported, both depth & stencil will be true; otherwise, both will be false.
-    shouldBe("contextAttribs.depth == contextAttribs.stencil", "true");
-    shouldBe("contextAttribs.alpha", "true");
-    shouldBe("contextAttribs.antialias", "false");
-    shouldBe("contextAttribs.premultipliedAlpha", "true");
+    shouldBeNonNull("contextAttribs.depth");
+    shouldBeNonNull("contextAttribs.alpha");
+    shouldBeNonNull("contextAttribs.stencil");
+    shouldBeNonNull("contextAttribs.antialias");
+    shouldBeNonNull("contextAttribs.premultipliedAlpha");
 
     webGL.depthFunc(webGL.ALWAYS);
 
@@ -236,10 +235,7 @@ function testStencil(stencil)
     pixel[1] = buf[1];
     pixel[2] = buf[2];
     pixel[3] = buf[3];
-    correctColor = (stencil ? [0, 0, 0, 255] : [255, 0, 0, 255]);
-    // If stencil is requested but not supported, we fake the effect.
-    if (stencil && !contextAttribs.stencil)
-        pixel[0] = 0;
+    correctColor = (contextAttribs.stencil ? [0, 0, 0, 255] : [255, 0, 0, 255]);
     shouldBe("pixel", "correctColor");
 }
 
@@ -251,11 +247,11 @@ function testAntialias(antialias)
     else
         shouldBeNonNull("webGL = getWebGL('antialiasOff', { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
     shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
-    shouldBe("contextAttribs.depth", "false");
-    shouldBe("contextAttribs.stencil", "false");
-    shouldBe("contextAttribs.alpha", "false");
-    shouldBe("contextAttribs.antialias == true || contextAttribs.antialias == false", "true");
-    shouldBe("contextAttribs.premultipliedAlpha", "true");
+    shouldBeNonNull("contextAttribs.depth");
+    shouldBeNonNull("contextAttribs.alpha");
+    shouldBeNonNull("contextAttribs.stencil");
+    shouldBeNonNull("contextAttribs.antialias");
+    shouldBeNonNull("contextAttribs.premultipliedAlpha");
 
     var vertices = new Float32Array([
          1.0, 1.0, 0.0,
@@ -267,10 +263,7 @@ function testAntialias(antialias)
         255, 0, 0, 255]);
     var buf = drawAndReadPixel(webGL, vertices, colors, 0, 0);
     pixel[0] = buf[0];
-    // If antialias is requested but not supported, we fake the effect.
-    if (antialias && !contextAttribs.antialias)
-        pixel[0] = 127;
-    shouldBe("pixel[0] == 255 || pixel[0] == 0", (antialias ? "false" : "true"));
+    shouldBe("pixel[0] != 255 && pixel[0] != 0", "contextAttribs.antialias");
 }
 
 function runTest()
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 2d54ac5..209b467 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -3050,7 +3050,6 @@ BUGDPRANKE WIN LINUX : media/video-poster.html = PASS TEXT
 
 BUGWK45898 : editing/selection/context-menu-on-text.html = TEXT
 
-BUGWEBGL WIN LINUX : fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html = TEXT
 BUGWEBGL : fast/canvas/webgl/css-webkit-canvas-repaint.html = IMAGE
 BUGWEBGL : fast/canvas/webgl/css-webkit-canvas.html = IMAGE
 BUGWEBGL WIN MAC : fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html = TEXT PASS
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index ffce312..1977dc1 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-18  Adrienne Walker  <enne at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        Turn off antialiasing when using Mesa during testing.
+        https://bugs.webkit.org/show_bug.cgi?id=47697
+
+        * src/WebGraphicsContext3DDefaultImpl.cpp:
+        (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes):
+
 2010-10-18  James Robinson  <jamesr at chromium.org>
 
         Update the chromium DEPS from 62399 to 62813 to pick up skia fixes
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 12d43fd..1625eb8 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -196,6 +196,12 @@ void WebGraphicsContext3DDefaultImpl::validateAttributes()
 #endif
         if (!isValidVendor || !strstr(extensions, "GL_EXT_framebuffer_multisample"))
             m_attributes.antialias = false;
+
+        // Don't antialias when using Mesa to ensure more reliable testing and
+        // because it doesn't appear to multisample straight lines correctly.
+        const char* renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER));
+        if (!strncmp(renderer, "Mesa", 4))
+            m_attributes.antialias = false;
     }
     // FIXME: instead of enforcing premultipliedAlpha = true, implement the
     // correct behavior when premultipliedAlpha = false is requested.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list