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

Unified Diff: src/core/SkTaskGroup.h

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 | « include/gpu/gl/command_buffer/SkCommandBufferGLContext.h ('k') | src/core/SkTaskGroup.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTaskGroup.h
diff --git a/src/core/SkTaskGroup.h b/src/core/SkTaskGroup.h
index 0d86cdb82934fefa17274c4a99e714f7751aa8b0..ce9a7b2b3326035ab67602cf7f5e7c08326073ef 100644
--- a/src/core/SkTaskGroup.h
+++ b/src/core/SkTaskGroup.h
@@ -18,8 +18,13 @@ class SkTaskGroup : SkNoncopyable {
public:
// Create one of these in main() to enable SkTaskGroups globally.
struct Enabler : SkNoncopyable {
- explicit Enabler(int threads = -1); // Default is system-reported core count.
+ // @param threads Default is system-reported core count.
+ // @param cleanupFn Function to call in each thread that may have
+ // scheduled SkTaskGroup tasks.
+ explicit Enabler(int threads = -1, std::function<void(void)> cleanupFn = nullptr);
~Enabler();
+ private:
+ std::function<void(void)> fCleanupFn;
};
SkTaskGroup();
« no previous file with comments | « include/gpu/gl/command_buffer/SkCommandBufferGLContext.h ('k') | src/core/SkTaskGroup.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698