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

Unified Diff: include/gpu/GrContextFactory.h

Issue 465073002: Add entry point for passing options to the GrContextFactory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Code review comments Created 6 years, 4 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 | « gm/gmmain.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContextFactory.h
diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h
index e73eb784a9af7859dd6ce5776892098bb8a31c26..f6677bbe291a70faf6f201a34a3599048644f7d3 100644
--- a/include/gpu/GrContextFactory.h
+++ b/include/gpu/GrContextFactory.h
@@ -88,6 +88,7 @@ public:
}
}
+ explicit GrContextFactory(const GrContext::Options& opts) : fGlobalOptions(opts) { }
GrContextFactory() { }
~GrContextFactory() { this->destroyContexts(); }
@@ -176,7 +177,7 @@ public:
glCtx->makeCurrent();
GrBackendContext p3dctx = reinterpret_cast<GrBackendContext>(glInterface.get());
- grCtx.reset(GrContext::Create(kOpenGL_GrBackend, p3dctx));
+ grCtx.reset(GrContext::Create(kOpenGL_GrBackend, p3dctx, &fGlobalOptions));
if (!grCtx.get()) {
return NULL;
}
@@ -207,7 +208,8 @@ private:
SkGLContextHelper* fGLContext;
GrContext* fGrContext;
};
- SkTArray<GPUContext, true> fContexts;
+ SkTArray<GPUContext, true> fContexts;
+ const GrContext::Options fGlobalOptions;
};
#endif
« no previous file with comments | « gm/gmmain.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698