| Index: tools/gpu/GrContextFactory.cpp
|
| diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
|
| index bae73a4e1986a725de8f8afe7007708e7eee3777..c2321213326aed4bcd902532afd2e138dcc155e0 100755
|
| --- a/tools/gpu/GrContextFactory.cpp
|
| +++ b/tools/gpu/GrContextFactory.cpp
|
| @@ -63,6 +63,17 @@ void GrContextFactory::abandonContexts() {
|
| }
|
| }
|
|
|
| +void GrContextFactory::releaseResourcesAndAbandonContexts() {
|
| + for (Context& context : fContexts) {
|
| + if (context.fGLContext) {
|
| + context.fGLContext->makeCurrent();
|
| + context.fGrContext->releaseResourcesAndAbandonContext();
|
| + delete(context.fGLContext);
|
| + context.fGLContext = nullptr;
|
| + }
|
| + }
|
| +}
|
| +
|
| GrContextFactory::ContextInfo GrContextFactory::getContextInfo(GLContextType type,
|
| GLContextOptions options) {
|
| for (int i = 0; i < fContexts.count(); ++i) {
|
|
|