Go to file
commit-bot@chromium.org 6ee68583f8 SkThreadPool: allow for Runnables that add other Runnables to the pool.
There's a scenario that we're currently not allowing for, but I'd really like to use in DM:

1) client calls add(SomeRunnable*) several times
2) client calls wait()
3) any of the runnables added by the client _themselves_ call add(SomeOtherRunnable*)
4-inf) maybe those SomeOtherRunnables too call add(SomeCrazyThirdRunnable*), etc.

Right now in this scenario we'll assert in debug mode in step 3) when we call
add() and we're waiting to stop, and do strange unspecified things in release
mode.

The old threadpool had basically two states: running, and waiting to stop.  If
a thread saw we were waiting to stop and the queue was empty, that thread shut
down.  This wasn't accounting for any work that other threads might be doing;
potentially they were about to add to the queue.

So now we have three states: running, waiting, and halting.  When the client
calls wait() (or the destructor triggers), we move into waiting.  When a thread
notices we're _really_ done, that is, have an empty queue and there are no
active threads, we move into halting.  The halting state actually triggers the
threads to stop, which wait() is patiently join()ing on.

BUG=
R=bungeman@google.com, bsalomon@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/26389005

git-svn-id: http://skia.googlecode.com/svn/trunk@11852 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-18 14:19:19 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Clear out SK_SCALAR_IS_FLOAT from SkRadialGradient, and merge the logic for radial_mirror and radial_repeat. 2013-10-16 18:59:44 +00:00
debugger Add texture filtering override to debugger 2013-10-17 17:56:10 +00:00
dm DM: duh, don't calculate digests unless we're going to look at them. 2013-10-16 19:13:38 +00:00
expectations Revert 11839 (rebaseline images after r11835) due to performance regression in 11835 2013-10-17 16:28:11 +00:00
experimental Revert r11842 (call drawRect to try GrAARectRenderer if the path is a rect - https://codereview.chromium.org/23484007) due to changes to the following GM images: 2013-10-17 17:34:20 +00:00
forth Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
gm Third wave of Win64 warning cleanup 2013-10-16 17:48:11 +00:00
gyp ARM Skia NEON patches - 30 - Xfermode: NEON modeprocs 2013-10-17 16:29:34 +00:00
include SkThreadPool: allow for Runnables that add other Runnables to the pool. 2013-10-18 14:19:19 +00:00
platform_tools fix android_gdb_exe script 2013-10-10 17:41:32 +00:00
resources Bench baseline for mostly 0 image. 2013-09-25 21:42:12 +00:00
samplecode SampleApp - reduce unnecessary verbosity [with --picture $path] 2013-10-14 12:47:37 +00:00
src SkThreadPool: allow for Runnables that add other Runnables to the pool. 2013-10-18 14:19:19 +00:00
tests Revert r11842 (call drawRect to try GrAARectRenderer if the path is a rect - https://codereview.chromium.org/23484007) due to changes to the following GM images: 2013-10-17 17:34:20 +00:00
third_party Add libpoppler for PDF rendering, take 2 2013-08-20 18:57:01 +00:00
tools add initial support ofr multi-threaded execution 2013-10-16 18:36:49 +00:00
trybots_to_run/chrome Deleting the hardcoded list of compile bots in trybots_to_run. 2013-04-09 11:59:42 +00:00
.gitignore leading slash confuses non-git tools that read .gitignore, like ag 2013-07-30 17:23:01 +00:00
codereview.settings Removing blank lines from codereview.settings. 2013-02-26 16:01:21 +00:00
DEPS Adds poppler and dependencies to DEPS. This is a pre-CL for 20220002, and getting DEPS committed first is necessary to get the trybots to run on the larger CL (since the trybots do 'gclient sync' before patching). 2013-08-02 19:10:06 +00:00
Doxyfile Pointing to http://skia-autogen.googlecode.com/svn/docs/html/index.html in Doxyfile 2012-07-03 11:35:07 +00:00
gyp_skia Fix ninja build on Android 2013-10-01 15:31:54 +00:00
LICENSE Manually update copyright notices in files that defied the automated process 2011-07-28 14:24:55 +00:00
make.bat Make make.bat and gyp_skia work with VS 2012. 2013-05-07 19:31:20 +00:00
make.py Use SKIA_OUT variable in make.py 2013-07-23 15:45:50 +00:00
Makefile Update Skia Android tools. 2013-08-12 12:30:04 +00:00
Makefile.old Replace GR_*_BUILD by their SK_BUILD_FOR_* equivalents. 2013-09-25 20:57:51 +00:00
OWNERS add root files from chrome 2013-08-13 19:11:15 +00:00
PRESUBMIT.py If any change is made to the public API then make sure there is an LGTM from an owner. 2013-08-12 14:51:20 +00:00
README whitespace commit to trigger buildbot 2011-07-15 14:11:58 +00:00
README.chromium add root files from chrome 2013-08-13 19:11:15 +00:00
skia.gyp gyp: generate "everything" and "most" targets instead of "all" 2012-10-25 16:32:07 +00:00
whitespace.txt Whitespace change to trigger build after several buildbot-side changes 2013-10-04 15:32:45 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at http://code.google.com/p/skia/wiki/DocRoot