aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/gl/GLTestContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpu/gl/GLTestContext.cpp')
-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;
}