| Index: dm/DM.cpp
|
| diff --git a/dm/DM.cpp b/dm/DM.cpp
|
| index f37fc8b7fff8eeab49ac62ce5f0a098580aacb03..c616e66cad94056ee19c75226d72dfcf8e05717a 100644
|
| --- a/dm/DM.cpp
|
| +++ b/dm/DM.cpp
|
| @@ -1105,7 +1105,11 @@ int dm_main() {
|
|
|
| JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never missing.
|
| SkAutoGraphics ag;
|
| +#if SK_SUPPORT_GPU
|
| + SkTaskGroup::Enabler enabled(FLAGS_threads, GrContextFactory::ReleaseGpuAPIsInThread);
|
| +#else
|
| SkTaskGroup::Enabler enabled(FLAGS_threads);
|
| +#endif
|
| gCreateTypefaceDelegate = &create_from_name;
|
|
|
| {
|
| @@ -1183,6 +1187,11 @@ int dm_main() {
|
|
|
| print_status();
|
| SkDebugf("Finished!\n");
|
| +
|
| +#if SK_SUPPORT_GPU
|
| + // The main thread maybe ran GPU code.
|
| + GrContextFactory::ReleaseGpuAPIsInThread();
|
| +#endif
|
| return 0;
|
| }
|
|
|
|
|