Skip to content

Commit

Permalink
Revert antialias cases (KhronosGroup#2960)
Browse files Browse the repository at this point in the history
Previously modified canvas size to 3*3 for CMAA
algorithm, but CMAA had been removed from chromium,
revert canvas size to 2*2.
  • Loading branch information
xhcao authored and kenrussell committed Oct 31, 2019
1 parent 887bc42 commit 19f79b6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@

shouldBeTrue("webGL.canvas.width == webGL.canvas.height");
// Both the width and height of canvas are N.
// Note that "N = 2" doesn't work for some post processing AA per the discussion at https://github.com/KhronosGroup/WebGL/pull/1977.
var N = webGL.canvas.width;
var buf = new Uint8Array(N * N * 4);
webGL.readPixels(0, 0, N, N, webGL.RGBA, webGL.UNSIGNED_BYTE, buf);
Expand Down Expand Up @@ -235,8 +234,8 @@
<canvas id="depthOff" width="1px" height="1px"></canvas>
<canvas id="stencilOn" width="1px" height="1px"></canvas>
<canvas id="stencilOff" width="1px" height="1px"></canvas>
<canvas id="antialiasOn" width="3px" height="3px"></canvas>
<canvas id="antialiasOff" width="3px" height="3px"></canvas>
<canvas id="antialiasOn" width="2px" height="2px"></canvas>
<canvas id="antialiasOff" width="2px" height="2px"></canvas>
<div id="description"></div>
<div id="console"></div>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@
{
debug("Testing antialias = " + antialias);
// Both the width and height of canvas are N.
// Note that "N = 2" doesn't work for some post processing AA per the discussion at https://github.com/KhronosGroup/WebGL/pull/1977.
var N = 3;
var N = 2;
if (antialias)
shouldBeNonNull("webGL = getWebGL(" + N + ", " + N + ", { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0)");
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,7 @@
{
debug("Testing antialias = " + antialias);
// Both the width and height of canvas are N.
// Note that "N = 2" doesn't work for some post processing AA per the discussion at https://github.com/KhronosGroup/WebGL/pull/1977.
var N = 3;
var N = 2;
if (antialias)
shouldBeNonNull("gl = getWebGL(" + N + ", " + N + ", { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0)");
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@
{
debug("Testing antialias = " + antialias);
// Both the width and height of canvas are N.
// Note that "N = 2" doesn't work for some post processing AA per the discussion at https://github.com/KhronosGroup/WebGL/pull/1977.
var N = 3;
var N = 2;
if (antialias)
shouldBeNonNull("gl = getWebGL(" + N + ", " + N + ", { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0)");
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@
{
debug("Testing antialias = " + antialias);
// Both the width and height of canvas are N.
// Note that "N = 2" doesn't work for some post processing AA per the discussion at https://github.com/KhronosGroup/WebGL/pull/1977.
var N = 3;
var N = 2;
if (antialias)
shouldBeNonNull("gl = getWebGL(" + N + ", " + N + ", { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0)");
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@
{
debug("Testing antialias = " + antialias);
// Both the width and height of canvas are N.
// Note that "N = 2" doesn't work for some post processing AA per the discussion at https://github.com/KhronosGroup/WebGL/pull/1977.
var N = 3;
var N = 2;
if (antialias)
shouldBeNonNull("gl = getWebGL(" + N + ", " + N + ", { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0)");
else
Expand Down

0 comments on commit 19f79b6

Please sign in to comment.