gpu, cmaa: don't blend the left/right/top/bottom-most edges in the BLUR_EDGES path.

textureGatherOffset() on out of range (i.e. outside of x = [0, width) or y = [0, height))
gives an undefined value. BLUR_EDGES pass can fetche (-1,_), (_,-1), (w,_), (_,h) texel,
which is an undefiend value. So BLUR_EDGES can mislead the left most
edge is dominant edge after comparing the undefined value and the left most
pixel.

This CL fixes parts of 2 WebGL conformance tests
https://www.khronos.org/registry/webgl/sdk/tests/conformance/context/context-size-change.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/misc/copy-tex-image-and-sub-image-2d.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/2120983002
Cr-Commit-Position: refs/heads/master@{#403773}
1 file changed