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: 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: 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
« bench/nanobench.cpp ('K') | « 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..ab50c678e00446dc155c55c2eb328fad1ae29228 100644
--- a/include/gpu/GrContextFactory.h
+++ b/include/gpu/GrContextFactory.h
@@ -88,7 +88,8 @@ public:
}
}
- GrContextFactory() { }
+ explicit GrContextFactory(const GrContext::Options& opts) : fGlobalOptions(opts) { }
robertphillips 2014/08/13 13:59:29 Won't default ctor just fire here?
krajcevski 2014/08/13 14:46:00 Yes, C++ is great. :(
+ GrContextFactory() : fGlobalOptions(GrContext::Options()) { }
~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;
}
@@ -208,6 +209,7 @@ private:
GrContext* fGrContext;
};
robertphillips 2014/08/13 13:59:29 Line 'fContexts' up with 'fGlobalOptions' ?
krajcevski 2014/08/13 14:46:00 Done.
SkTArray<GPUContext, true> fContexts;
+ const GrContext::Options fGlobalOptions;
};
#endif
« bench/nanobench.cpp ('K') | « gm/gmmain.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698