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

Unified Diff: src/core/SkTaskGroup.cpp

Issue 1705583003: clean up more dead code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/core/SkTaskGroup.h ('k') | src/utils/SkRunnable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTaskGroup.cpp
diff --git a/src/core/SkTaskGroup.cpp b/src/core/SkTaskGroup.cpp
index 1799256d6fe869a6d1fa58987302ecac739afdae..b3c23b649beaece214b2531a13569dc790aefd46 100644
--- a/src/core/SkTaskGroup.cpp
+++ b/src/core/SkTaskGroup.cpp
@@ -6,7 +6,6 @@
*/
#include "SkOnce.h"
-#include "SkRunnable.h"
#include "SkSemaphore.h"
#include "SkSpinlock.h"
#include "SkTArray.h"
@@ -40,13 +39,6 @@ namespace {
class ThreadPool : SkNoncopyable {
public:
- static void Add(SkRunnable* task, SkAtomic<int32_t>* pending) {
- if (!gGlobal) { // If we have no threads, run synchronously.
- return task->run();
- }
- gGlobal->add([task]() { task->run(); }, pending);
- }
-
static void Add(std::function<void(void)> fn, SkAtomic<int32_t>* pending) {
if (!gGlobal) {
return fn();
@@ -99,8 +91,6 @@ private:
SkSpinlock* fLock;
};
- static void CallRunnable(void* arg) { static_cast<SkRunnable*>(arg)->run(); }
-
struct Work {
std::function<void(void)> fn; // A function to call
SkAtomic<int32_t>* pending; // then decrement pending afterwards.
@@ -213,7 +203,6 @@ SkTaskGroup::Enabler::~Enabler() { delete ThreadPool::gGlobal; }
SkTaskGroup::SkTaskGroup() : fPending(0) {}
void SkTaskGroup::wait() { ThreadPool::Wait(&fPending); }
-void SkTaskGroup::add(SkRunnable* task) { ThreadPool::Add(task, &fPending); }
void SkTaskGroup::add(std::function<void(void)> fn) { ThreadPool::Add(fn, &fPending); }
void SkTaskGroup::batch(int N, std::function<void(int)> fn) {
ThreadPool::Batch(N, fn, &fPending);
« no previous file with comments | « src/core/SkTaskGroup.h ('k') | src/utils/SkRunnable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698