aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/GrContextFactory.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-09-29 09:49:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-29 09:49:06 -0700
commit50094fb489543655df026be4e4f99e09e57a1f49 (patch)
tree5c8a936664ddbf5c51e615533200957871a53b6d /tools/gpu/GrContextFactory.cpp
parent6b1da0a53864530257906e31f0023a7b8ffccd07 (diff)
Explicit control in tools of ANGLE frontend and backend
Update the ANGLE test GL context, GrContextFactory, and config parsing to allow explicit control of ANGLE front/backend. This will allow us to explicitly test ES2 vs ES3 interfaces to ANGLE as well as D3D9, D3D11, and OpenGL backends. Also makes the angle api types valid in all builds (but will just fail when SK_ANGLE=1 or not on windows for the d3d backends). BUG=skia:5804 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2381033002 NOTREECHECKS=true NOTRY=true NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2381033002
Diffstat (limited to 'tools/gpu/GrContextFactory.cpp')
-rw-r--r--tools/gpu/GrContextFactory.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
index 5e6494f778..4f189942bd 100644
--- a/tools/gpu/GrContextFactory.cpp
+++ b/tools/gpu/GrContextFactory.cpp
@@ -117,13 +117,24 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOptions op
glCtx = CreatePlatformGLTestContext(kGLES_GrGLStandard);
break;
#if SK_ANGLE
-# ifdef SK_BUILD_FOR_WIN
- case kANGLE_ContextType:
- glCtx = CreateANGLEDirect3DGLTestContext();
+ case kANGLE_D3D9_ES2_ContextType:
+ glCtx = CreateANGLETestContext(ANGLEBackend::kD3D9, ANGLEContextVersion::kES2);
break;
-# endif
- case kANGLE_GL_ContextType:
- glCtx = CreateANGLEOpenGLGLTestContext();
+ case kANGLE_D3D11_ES2_ContextType:
+ glCtx = CreateANGLETestContext(ANGLEBackend::kD3D11,
+ ANGLEContextVersion::kES2);
+ break;
+ case kANGLE_D3D11_ES3_ContextType:
+ glCtx = CreateANGLETestContext(ANGLEBackend::kD3D11,
+ ANGLEContextVersion::kES3);
+ break;
+ case kANGLE_GL_ES2_ContextType:
+ glCtx = CreateANGLETestContext(ANGLEBackend::kOpenGL,
+ ANGLEContextVersion::kES2);
+ break;
+ case kANGLE_GL_ES3_ContextType:
+ glCtx = CreateANGLETestContext(ANGLEBackend::kOpenGL,
+ ANGLEContextVersion::kES3);
break;
#endif
case kCommandBuffer_ContextType: