Changeset 69996 in webkit


Ignore:
Timestamp:
Oct 18, 2010 2:53:57 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-18 Adrienne Walker <enne@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@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):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r69990 r69996  
     12010-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
    1122010-10-18  Johnny Ding  <jnd@chromium.org>
    213
  • trunk/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt

    r63444 r69996  
    77PASS webGL = getWebGL('alphaOn', { alpha: true, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
    88PASS contextAttribs = webGL.getContextAttributes() is non-null.
    9 PASS contextAttribs.alpha is true
    10 PASS contextAttribs.depth is false
    11 PASS contextAttribs.stencil is false
    12 PASS contextAttribs.antialias is false
    13 PASS contextAttribs.premultipliedAlpha is true
     9PASS contextAttribs.alpha is non-null.
     10PASS contextAttribs.depth is non-null.
     11PASS contextAttribs.stencil is non-null.
     12PASS contextAttribs.antialias is non-null.
     13PASS contextAttribs.premultipliedAlpha is non-null.
    1414PASS pixel is correctColor
    1515Testing alpha = false
    1616PASS webGL = getWebGL('alphaOff', { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
    1717PASS contextAttribs = webGL.getContextAttributes() is non-null.
    18 PASS contextAttribs.alpha is false
    19 PASS contextAttribs.depth is false
    20 PASS contextAttribs.stencil is false
    21 PASS contextAttribs.antialias is false
    22 PASS contextAttribs.premultipliedAlpha is true
     18PASS contextAttribs.alpha is non-null.
     19PASS contextAttribs.depth is non-null.
     20PASS contextAttribs.stencil is non-null.
     21PASS contextAttribs.antialias is non-null.
     22PASS contextAttribs.premultipliedAlpha is non-null.
    2323PASS pixel is correctColor
    2424Testing depth = true
    2525PASS webGL = getWebGL('depthOn', { stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    2626PASS contextAttribs = webGL.getContextAttributes() is non-null.
    27 PASS contextAttribs.depth is true
    28 PASS contextAttribs.alpha is true
    29 PASS contextAttribs.stencil is false
    30 PASS contextAttribs.antialias is false
    31 PASS contextAttribs.premultipliedAlpha is true
     27PASS contextAttribs.depth is non-null.
     28PASS contextAttribs.alpha is non-null.
     29PASS contextAttribs.stencil is non-null.
     30PASS contextAttribs.antialias is non-null.
     31PASS contextAttribs.premultipliedAlpha is non-null.
    3232PASS pixel is correctColor
    3333Testing depth = false
    3434PASS webGL = getWebGL('depthOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    3535PASS contextAttribs = webGL.getContextAttributes() is non-null.
    36 PASS contextAttribs.depth is false
    37 PASS contextAttribs.alpha is true
    38 PASS contextAttribs.stencil is false
    39 PASS contextAttribs.antialias is false
    40 PASS contextAttribs.premultipliedAlpha is true
     36PASS contextAttribs.depth is non-null.
     37PASS contextAttribs.alpha is non-null.
     38PASS contextAttribs.stencil is non-null.
     39PASS contextAttribs.antialias is non-null.
     40PASS contextAttribs.premultipliedAlpha is non-null.
    4141PASS pixel is correctColor
    4242Testing stencil = true
    4343PASS webGL = getWebGL('stencilOn', { depth: false, stencil: true, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    4444PASS 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
     45PASS contextAttribs.depth is non-null.
     46PASS contextAttribs.alpha is non-null.
     47PASS contextAttribs.stencil is non-null.
     48PASS contextAttribs.antialias is non-null.
     49PASS contextAttribs.premultipliedAlpha is non-null.
    4950PASS pixel is correctColor
    5051Testing stencil = false
    5152PASS webGL = getWebGL('stencilOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    5253PASS 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
     54PASS contextAttribs.depth is non-null.
     55PASS contextAttribs.alpha is non-null.
     56PASS contextAttribs.stencil is non-null.
     57PASS contextAttribs.antialias is non-null.
     58PASS contextAttribs.premultipliedAlpha is non-null.
    5759PASS pixel is correctColor
    5860Testing antialias = true
    5961PASS webGL = getWebGL('antialiasOn', { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    6062PASS contextAttribs = webGL.getContextAttributes() is non-null.
    61 PASS contextAttribs.depth is false
    62 PASS contextAttribs.stencil is false
    63 PASS contextAttribs.alpha is false
    64 PASS contextAttribs.antialias == true || contextAttribs.antialias == false is true
    65 PASS contextAttribs.premultipliedAlpha is true
    66 PASS pixel[0] == 255 || pixel[0] == 0 is false
     63PASS contextAttribs.depth is non-null.
     64PASS contextAttribs.alpha is non-null.
     65PASS contextAttribs.stencil is non-null.
     66PASS contextAttribs.antialias is non-null.
     67PASS contextAttribs.premultipliedAlpha is non-null.
     68PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias
    6769Testing antialias = false
    6870PASS webGL = getWebGL('antialiasOff', { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
    6971PASS contextAttribs = webGL.getContextAttributes() is non-null.
    70 PASS contextAttribs.depth is false
    71 PASS contextAttribs.stencil is false
    72 PASS contextAttribs.alpha is false
    73 PASS contextAttribs.antialias == true || contextAttribs.antialias == false is true
    74 PASS contextAttribs.premultipliedAlpha is true
    75 PASS pixel[0] == 255 || pixel[0] == 0 is true
     72PASS contextAttribs.depth is non-null.
     73PASS contextAttribs.alpha is non-null.
     74PASS contextAttribs.stencil is non-null.
     75PASS contextAttribs.antialias is non-null.
     76PASS contextAttribs.premultipliedAlpha is non-null.
     77PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias
    7678PASS successfullyParsed is true
    7779
  • trunk/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html

    r65740 r69996  
    5656        return null;
    5757    }
    58     var actualContextAttribs = gl.getContextAttributes();
    5958
    6059    // Add a console
     
    142141        shouldBeNonNull("webGL = getWebGL('alphaOff', { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)");
    143142    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");
    149148
    150149    var buf = new Uint8Array(1 * 1 * 4);
     
    154153    pixel[2] = buf[2];
    155154    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]);
    157156    shouldBe("pixel", "correctColor");
    158157}
     
    166165        shouldBeNonNull("webGL = getWebGL('depthOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
    167166    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");
    173172
    174173    webGL.depthFunc(webGL.NEVER);
     
    194193    pixel[2] = buf[2];
    195194    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]);
    197196    shouldBe("pixel", "correctColor");
    198197}
     
    206205        shouldBeNonNull("webGL = getWebGL('stencilOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
    207206    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");
    213212
    214213    webGL.depthFunc(webGL.ALWAYS);
     
    237236    pixel[2] = buf[2];
    238237    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]);
    243239    shouldBe("pixel", "correctColor");
    244240}
     
    252248        shouldBeNonNull("webGL = getWebGL('antialiasOff', { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
    253249    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");
    259255
    260256    var vertices = new Float32Array([
     
    268264    var buf = drawAndReadPixel(webGL, vertices, colors, 0, 0);
    269265    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");
    274267}
    275268
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r69989 r69996  
    30513051BUGWK45898 : editing/selection/context-menu-on-text.html = TEXT
    30523052
    3053 BUGWEBGL WIN LINUX : fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html = TEXT
    30543053BUGWEBGL : fast/canvas/webgl/css-webkit-canvas-repaint.html = IMAGE
    30553054BUGWEBGL : fast/canvas/webgl/css-webkit-canvas.html = IMAGE
  • trunk/WebKit/chromium/ChangeLog

    r69993 r69996  
     12010-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
    1112010-10-18  James Robinson  <jamesr@chromium.org>
    212
  • trunk/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp

    r69627 r69996  
    197197        if (!isValidVendor || !strstr(extensions, "GL_EXT_framebuffer_multisample"))
    198198            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;
    199205    }
    200206    // FIXME: instead of enforcing premultipliedAlpha = true, implement the
Note: See TracChangeset for help on using the changeset viewer.