diff options
author | Weiliang Chen <weiliangc@chromium.org> | 2018-07-12 17:13:35 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-13 19:18:34 +0000 |
commit | 1e04b3659cd35dfb47a9843fd42123bb6bdcaa5d (patch) | |
tree | 09d3b88935cde08d7048558c2e35d7eb5bd03405 /src | |
parent | 79ad3a1d99d7ab16d24f18524cf680b7a06496e5 (diff) |
Reland: Check for ANGLE's implementation of texture_rectangle
ANGLE has implemented extension to support for texture_rectangle. Check
for its existence as well as GL_ARB_texture_rectangle extension.
Intended to follow up on Chrome side to avoid copy into texture 2d for
PaintCanvasVideoRenderer.
Bug: skia:7903
Origin change's info:
> Change-Id: I450aa7fcd08628831251a9e142fd50719723282d
> Reviewed-on: https://skia-review.googlesource.com/130962
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Weiliang Chen <weiliangc@chromium.org>
Change-Id: Ifec92bdc07ec2b2dae38ffe99ec275924cbd37d8
Reviewed-on: https://skia-review.googlesource.com/139272
Commit-Queue: Weiliang Chen <weiliangc@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 5 | ||||
-rw-r--r-- | src/gpu/gl/GrGLDefines.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 8525a7b2b5..0e5ed52350 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -220,7 +220,8 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, fBindUniformLocationSupport = ctxInfo.hasExtension("GL_CHROMIUM_bind_uniform_location"); if (kGL_GrGLStandard == standard) { - if (version >= GR_GL_VER(3, 1) || ctxInfo.hasExtension("GL_ARB_texture_rectangle")) { + if (version >= GR_GL_VER(3, 1) || ctxInfo.hasExtension("GL_ARB_texture_rectangle") || + ctxInfo.hasExtension("GL_ANGLE_texture_rectangle")) { // We also require textureSize() support for rectangle 2D samplers which was added in // GLSL 1.40. if (ctxInfo.glslGeneration() >= k140_GrGLSLGeneration) { @@ -2893,5 +2894,3 @@ GrBackendFormat GrGLCaps::onCreateFormatFromBackendTexture( return GrBackendFormat::MakeGL(glInfo.fFormat, glInfo.fTarget); } #endif - - diff --git a/src/gpu/gl/GrGLDefines.h b/src/gpu/gl/GrGLDefines.h index 8e7809f642..d861d866c7 100644 --- a/src/gpu/gl/GrGLDefines.h +++ b/src/gpu/gl/GrGLDefines.h @@ -1039,7 +1039,7 @@ /* GL_OES_EGL_image_external */ #define GR_GL_TEXTURE_EXTERNAL 0x8D65 -/* GL_ARB_texture_rectangle */ +/* GL_ARB_texture_rectangle or GL_ANGLE_texture_rectangle */ #define GR_GL_TEXTURE_RECTANGLE 0x84F5 /* GL_EXT_window_rectangles */ |