diff options
author | bsalomon <bsalomon@google.com> | 2016-05-11 06:33:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-11 06:33:06 -0700 |
commit | 8b7451aaf6b1c71e9d343a4df107893db277b6aa (patch) | |
tree | b1416c3e9a154a74ff004135d41b5eefd68c0ed9 /tools/gpu/GrContextFactory.h | |
parent | 70142347f7b4ef49745e828d93026fc153a72845 (diff) |
Turn ContextInfos returned by GrContextFactory into structs.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1966013002
Review-Url: https://codereview.chromium.org/1966013002
Diffstat (limited to 'tools/gpu/GrContextFactory.h')
-rw-r--r-- | tools/gpu/GrContextFactory.h | 13 |
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; }; /** |