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

Side by Side Diff: src/core/SkTaskGroup.cpp

Issue 684923002: MultiPictureDraw is taskgroup aware. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: actually call Reset() to free the data in each data Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/core/SkTaskGroup.h ('k') | src/utils/SkTaskGroup.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "SkTaskGroup.h" 1 #include "SkTaskGroup.h"
2 2
3 #include "SkCondVar.h" 3 #include "SkCondVar.h"
4 #include "SkRunnable.h"
4 #include "SkTDArray.h" 5 #include "SkTDArray.h"
5 #include "SkThread.h" 6 #include "SkThread.h"
6 #include "SkThreadUtils.h" 7 #include "SkThreadUtils.h"
7 8
8 #if defined(SK_BUILD_FOR_WIN32) 9 #if defined(SK_BUILD_FOR_WIN32)
9 static inline int num_cores() { 10 static inline int num_cores() {
10 SYSTEM_INFO sysinfo; 11 SYSTEM_INFO sysinfo;
11 GetSystemInfo(&sysinfo); 12 GetSystemInfo(&sysinfo);
12 return sysinfo.dwNumberOfProcessors; 13 return sysinfo.dwNumberOfProcessors;
13 } 14 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 SkTaskGroup::Enabler::~Enabler() { 152 SkTaskGroup::Enabler::~Enabler() {
152 SkDELETE(ThreadPool::gGlobal); 153 SkDELETE(ThreadPool::gGlobal);
153 } 154 }
154 155
155 SkTaskGroup::SkTaskGroup() : fPending(0) {} 156 SkTaskGroup::SkTaskGroup() : fPending(0) {}
156 157
157 void SkTaskGroup::add(SkRunnable* task) { ThreadPool::Add(task, &fPe nding); } 158 void SkTaskGroup::add(SkRunnable* task) { ThreadPool::Add(task, &fPe nding); }
158 void SkTaskGroup::add(void (*fn)(void*), void* arg) { ThreadPool::Add(fn, arg, & fPending); } 159 void SkTaskGroup::add(void (*fn)(void*), void* arg) { ThreadPool::Add(fn, arg, & fPending); }
159 void SkTaskGroup::wait() { ThreadPool::Wait(&fPending ); } 160 void SkTaskGroup::wait() { ThreadPool::Wait(&fPending ); }
160 161
OLDNEW
« no previous file with comments | « src/core/SkTaskGroup.h ('k') | src/utils/SkTaskGroup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698