| Index: tools/gpu/GrContextFactory.h
|
| diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h
|
| index dc896a7bc8be32083cb399fa464807b2191b4594..ed8e6451999514aa001fb0870754a24b36282cd8 100644
|
| --- a/tools/gpu/GrContextFactory.h
|
| +++ b/tools/gpu/GrContextFactory.h
|
| @@ -28,6 +28,8 @@ public:
|
|
|
| GrContext* grContext() const { return fGrContext; }
|
|
|
| + TestContext* testContext() const { return fTestContext; }
|
| +
|
| GLTestContext* glContext() const {
|
| SkASSERT(kOpenGL_GrBackend == fBackend);
|
| return static_cast<GLTestContext*>(fTestContext);
|
| @@ -93,6 +95,18 @@ public:
|
| kRequireSRGBSupport_ContextOptions = 0x2,
|
| };
|
|
|
| + static ContextType NativeContextTypeForBackend(GrBackend backend) {
|
| + switch (backend) {
|
| + case kOpenGL_GrBackend:
|
| + return kNativeGL_ContextType;
|
| + case kVulkan_GrBackend:
|
| + return kVulkan_ContextType;
|
| + default:
|
| + SkFAIL("Unknown backend");
|
| + return kNullGL_ContextType;
|
| + }
|
| + }
|
| +
|
| static bool IsRenderingContext(ContextType type) {
|
| switch (type) {
|
| case kNullGL_ContextType:
|
|
|