Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: tests/skia_test.cpp

Issue 1733323002: Clean up EGL thread state at thread exit in nanobench and DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix main thread usage also Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/skia_test.cpp
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index 65fbc3284297a9070737fbacd3994e08ac2502f5..d10f65bf2edf4af045c90071d9a19cc36e4533f5 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -174,7 +174,11 @@ int test_main() {
// Now run them.
int skipCount = 0;
+#if SK_SUPPORT_GPU
+ SkTaskGroup::Enabler enabled(FLAGS_threads, GrContextFactory::ReleaseGpuAPIsInThread);
+#else
SkTaskGroup::Enabler enabled(FLAGS_threads);
+#endif
SkTaskGroup cpuTests;
SkTArray<const Test*> gpuTests;
@@ -218,6 +222,10 @@ int test_main() {
}
SkDebugf("\n");
+#if SK_SUPPORT_GPU
+ // The main thread maybe ran GPU code.
+ GrContextFactory::ReleaseGpuAPIsInThread();
+#endif
return (status.failCount() == 0) ? 0 : 1;
}
« no previous file with comments | « src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698