gpu, cmaa: don't blend the rightmost and topmost edges.

texelFetch() on out of range (i.e. outside of x = [0, width) or y = [0, height))
gives an undefined value. DETECT_EDGES2 pass fetches (width, _) or (_, height) texel,
which is an undefiend value. So DETECT_EDGES2 can mislead the right most
edge is dominant edge after comparing the undefined value and the right most
pixel.

This CL fixes parts of 3 WebGL conformance tests
https://www.khronos.org/registry/webgl/sdk/tests/conformance/rendering/multisample-corruption.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/bugs/gl-fragcoord-multisampling-bug.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/context/premultiplyalpha-test.html

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2110543002
Cr-Commit-Position: refs/heads/master@{#402890}
1 file changed