Reland "webgl: use immutable texture for the default FBO."

Original CL: https://codereview.chromium.org/1449043005

Use immutable texture for the default FBO like chromium compositor.

In theory, it speeds up drawing speed, because immutable texture skips texture
validation on drawing call.

In addition, immutable texture allows GL_INTEL_framebuffer_CMAA more optimization.

BUG=557848, 535198
TEST=gl_tests GLCopyTextureCHROMIUMTest.ImmutableTexture
https://www.khronos.org/registry/webgl/sdk/tests/conformance/renderbuffers/framebuffer-state-restoration.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/misc/texture-size-cube-maps.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgba-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb8-rgb-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg32f-rg-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb5_a1-rgba-unsigned_short_5_5_5_1.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg8-rg-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb5_a1-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb9_e5-rgb-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r11f_g11f_b10f-rgb-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba32f-rgba-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb32f-rgb-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb9_e5-rgb-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba16f-rgba-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba8-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r8ui-red_integer-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r16f-red-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg16f-rg-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r8-red-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg8ui-rg_integer-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r11f_g11f_b10f-rgb-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg16f-rg-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r16f-red-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb8ui-rgb_integer-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb16f-rgb-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-srgb8_alpha8-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb565-rgb-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r32f-red-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba4-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba16f-rgba-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba4-rgba-unsigned_short_4_4_4_4.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb565-rgb-unsigned_short_5_6_5.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba8ui-rgba_integer-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb16f-rgb-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-srgb8-rgb-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/readpixel.html
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/2125023002
Cr-Commit-Position: refs/heads/master@{#404260}
11 files changed