diff options
author | Brian Salomon <bsalomon@google.com> | 2017-10-18 08:33:29 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-18 12:55:06 +0000 |
commit | 43f8bf0f784f4182ed0fca9053ecf570caf7ad70 (patch) | |
tree | 2a705f6737fceb0d322d6a91d51b01160d68e844 /tools/gpu/GrContextFactory.h | |
parent | 57caa660c024cf6fda5e1fba8cb21224b51375fe (diff) |
Move clear-as-draw workaround to GrGLGpu and expose via GrContextOptions.
Bug: skia:7154
Change-Id: I23ffc11dab4a377fbd6b7e4e33722b3fa0793d58
Reviewed-on: https://skia-review.googlesource.com/60681
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools/gpu/GrContextFactory.h')
-rw-r--r-- | tools/gpu/GrContextFactory.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h index 8d3e69c765..1073f6a594 100644 --- a/tools/gpu/GrContextFactory.h +++ b/tools/gpu/GrContextFactory.h @@ -159,6 +159,7 @@ private: struct Context { ContextType fType; ContextOverrides fOverrides; + GrContextOptions fOptions; GrBackend fBackend; TestContext* fTestContext; GrContext* fGrContext; @@ -189,19 +190,18 @@ public: return static_cast<GLTestContext*>(fTestContext); } + const GrContextOptions& options() const { return fOptions; } + private: - ContextInfo(GrContextFactory::ContextType type, - TestContext* testContext, - GrContext* grContext) - : fType(type) - , fTestContext(testContext) - , fGrContext(grContext) { - } + ContextInfo(GrContextFactory::ContextType type, TestContext* testContext, GrContext* grContext, + const GrContextOptions& options) + : fType(type), fTestContext(testContext), fGrContext(grContext), fOptions(options) {} GrContextFactory::ContextType fType = GrContextFactory::kGL_ContextType; // Valid until the factory destroys it via abandonContexts() or destroyContexts(). - TestContext* fTestContext = nullptr; - GrContext* fGrContext = nullptr; + TestContext* fTestContext = nullptr; + GrContext* fGrContext = nullptr; + GrContextOptions fOptions; friend class GrContextFactory; }; |