diff options
author | 2014-08-13 10:46:31 -0700 | |
---|---|---|
committer | 2014-08-13 10:46:31 -0700 | |
commit | 69a5560ea5a8d26b120f5158e506a163d32b4a27 (patch) | |
tree | 2c43838d65a47c770a22604e7d3ec038c8701320 /include/gpu/GrContextFactory.h | |
parent | b3f319fbb01c74e757846d9fcfbf1da174c0cb17 (diff) |
Add entry point for passing options to the GrContextFactory
R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/465073002
Diffstat (limited to 'include/gpu/GrContextFactory.h')
-rw-r--r-- | include/gpu/GrContextFactory.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h index e73eb784a9..f6677bbe29 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 |