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>
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
index b3ca1d9..1bc4655 100644
--- a/tools/gpu/GrContextFactory.cpp
+++ b/tools/gpu/GrContextFactory.cpp
@@ -116,7 +116,8 @@
context.fShareIndex == shareIndex &&
!context.fAbandoned) {
context.fTestContext->makeCurrent();
- return ContextInfo(context.fType, context.fTestContext, context.fGrContext);
+ return ContextInfo(context.fType, context.fTestContext, context.fGrContext,
+ context.fOptions);
}
}
@@ -288,7 +289,8 @@
context.fAbandoned = false;
context.fShareContext = shareContext;
context.fShareIndex = shareIndex;
- return ContextInfo(context.fType, context.fTestContext, context.fGrContext);
+ context.fOptions = grOptions;
+ return ContextInfo(context.fType, context.fTestContext, context.fGrContext, context.fOptions);
}
ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOverrides overrides) {