aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/GrContextFactory.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-05-11 06:33:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-11 06:33:06 -0700
commit8b7451aaf6b1c71e9d343a4df107893db277b6aa (patch)
treeb1416c3e9a154a74ff004135d41b5eefd68c0ed9 /tools/gpu/GrContextFactory.h
parent70142347f7b4ef49745e828d93026fc153a72845 (diff)
Turn ContextInfos returned by GrContextFactory into structs.
Diffstat (limited to 'tools/gpu/GrContextFactory.h')
-rw-r--r--tools/gpu/GrContextFactory.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h
index 0dc8c20cd5..f5783fc1ae 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;
};
/**