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

Unified Diff: tools/gpu/GrContextFactory.h

Issue 1860593002: One signature for creating unit tests that run on premade GrContexts (Closed) Base URL: https://skia.googlesource.com/skia.git@try_no_native
Patch Set: another guess to fix windows Created 4 years, 8 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/WritePixelsTest.cpp ('k') | tools/gpu/GrContextFactory.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 7c49faaf87a97f013bfe06ef595e789f577e4b4d..fe828195808491bcdfe8c82688c7999cc1237995 100644
--- a/tools/gpu/GrContextFactory.h
+++ b/tools/gpu/GrContextFactory.h
@@ -15,6 +15,17 @@
#include "SkTArray.h"
namespace sk_gpu_test {
+
+struct ContextInfo {
+ ContextInfo()
+ : fGrContext(nullptr), fGLContext(nullptr) { }
+ ContextInfo(GrContext* grContext, GLTestContext* glContext)
+ : fGrContext(grContext), fGLContext(glContext) { }
+ GrContext* fGrContext;
+ GLTestContext* fGLContext; //! Valid until the factory destroys it via abandonContexts() or
+ //! destroyContexts().
+};
+
/**
* This is a simple class that is useful in test apps that use different
* GrContexts backed by different types of GL contexts. It manages creating the
@@ -109,16 +120,6 @@ public:
void abandonContexts();
void releaseResourcesAndAbandonContexts();
- struct ContextInfo {
- ContextInfo()
- : fGrContext(nullptr), fGLContext(nullptr) { }
- ContextInfo(GrContext* grContext, GLTestContext* glContext)
- : fGrContext(grContext), fGLContext(glContext) { }
- GrContext* fGrContext;
- GLTestContext* fGLContext; //! Valid until the factory destroys it via abandonContexts() or
- //! destroyContexts().
- };
-
/**
* Get a context initialized with a type of GL context. It also makes the GL context current.
*/
« no previous file with comments | « tests/WritePixelsTest.cpp ('k') | tools/gpu/GrContextFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698