aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Weiliang Chen <weiliangc@chromium.org>2018-07-12 17:13:35 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-13 19:18:34 +0000
commit1e04b3659cd35dfb47a9843fd42123bb6bdcaa5d (patch)
tree09d3b88935cde08d7048558c2e35d7eb5bd03405 /tools
parent79ad3a1d99d7ab16d24f18524cf680b7a06496e5 (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 'tools')
-rw-r--r--tools/gpu/gl/GLTestContext.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/gpu/gl/GLTestContext.cpp b/tools/gpu/gl/GLTestContext.cpp
index 7a67a8a969..e11f1b0eef 100644
--- a/tools/gpu/gl/GLTestContext.cpp
+++ b/tools/gpu/gl/GLTestContext.cpp
@@ -317,8 +317,11 @@ void GLTestContext::finish() {
GrGLint GLTestContext::createTextureRectangle(int width, int height, GrGLenum internalFormat,
GrGLenum externalFormat, GrGLenum externalType,
GrGLvoid* data) {
- if (!(kGL_GrGLStandard == fGL->fStandard && GrGLGetVersion(fGL.get()) >= GR_GL_VER(3, 1)) &&
- !fGL->fExtensions.has("GL_ARB_texture_rectangle")) {
+ // Should match GrGLCaps check for fRectangleTextureSupport.
+ if (kGL_GrGLStandard != fGL->fStandard ||
+ (GrGLGetVersion(fGL.get()) < GR_GL_VER(3, 1) &&
+ !fGL->fExtensions.has("GL_ARB_texture_rectangle") &&
+ !fGL->fExtensions.has("GL_ANGLE_texture_rectangle"))) {
return 0;
}