Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: tools/gpu/GrContextFactory.h

Issue 1966013002: Turn ContextInfos returned by GrContextFactory into structs. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Address comment Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/skbug5221.cpp ('k') | tools/kilobench/kilobench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
/**
« no previous file with comments | « tests/skbug5221.cpp ('k') | tools/kilobench/kilobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698