Chromium Code Reviews| 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 |