Index: tools/gpu/GrContextFactory.h |
diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h |
index 0dc8c20cd503f4b0c05ef0099181a074a118d2da..f5783fc1ae9ba23704a63ade1241eb08cd396039 100644 |
--- a/tools/gpu/GrContextFactory.h |
+++ b/tools/gpu/GrContextFactory.h |
@@ -18,14 +18,21 @@ struct GrVkBackendContext; |
namespace sk_gpu_test { |
-struct ContextInfo { |
+class ContextInfo { |
+public: |
+ GrContext* grContext() const { return fGrContext; } |
+ GLTestContext* glContext() const { return fGLContext; } |
+ |
+private: |
ContextInfo() |
- : fGrContext(nullptr), fGLContext(nullptr) { } |
+ : fGrContext(nullptr), fGLContext(nullptr) { } |
ContextInfo(GrContext* grContext, GLTestContext* glContext) |
- : fGrContext(grContext), fGLContext(glContext) { } |
+ : fGrContext(grContext), fGLContext(glContext) { } |
GrContext* fGrContext; |
GLTestContext* fGLContext; //! Valid until the factory destroys it via abandonContexts() or |
//! destroyContexts(). Null if context is not based on OpenGL. |
+ |
+ friend class GrContextFactory; |
}; |
/** |