Go to file
reed@google.com ff0da4ff48 Mutexes in pixelrefs were done very sloppily initially. The code (a) assumes all
pixelref subclasses want a mutex to guard their lock/unlock virtuals, and (b)
most subclasses use the same mutex for *all* of their instances, even when there
is no explicit need to guard modifying one instances with another.

When we try drawing bitmaps from multiple threads, we are seeing a lot of slow-
down from these mutexes. This CL has two changes to try to speed things up.

1. Add setPreLocked(), for pixelrefs who never need the onLockPixels
virtual to be called. This speeds up those subclasses in multithreaded environs
as it avoids the mutex lock all together (e.g. SkMallocPixelRef).

2. Add setMutex() to allow a subclass to change the mutex choice. ashmem wants
this, since its unflattening constructor cannot pass down the null, it needs
to cleanup afterwards.
Review URL: https://codereview.appspot.com/6199075

git-svn-id: http://skia.googlecode.com/svn/trunk@3985 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 13:14:52 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench WeakRefCnt 2012-05-16 18:21:56 +00:00
experimental shape ops: more work in progress 2012-05-07 21:09:32 +00:00
forth Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
gm Updated AAClips Sample slide and complexclip2 GM to exercise AA clipping 2012-05-15 17:03:16 +00:00
gyp WeakRefCnt 2012-05-16 18:21:56 +00:00
include Mutexes in pixelrefs were done very sloppily initially. The code (a) assumes all 2012-05-17 13:14:52 +00:00
samplecode Updated AAClips Sample slide and complexclip2 GM to exercise AA clipping 2012-05-15 17:03:16 +00:00
src Mutexes in pixelrefs were done very sloppily initially. The code (a) assumes all 2012-05-17 13:14:52 +00:00
tests WeakRefCnt 2012-05-16 18:21:56 +00:00
third_party Remove tesselated path renderer and supporting code, glu, and libtess target 2012-05-11 17:32:43 +00:00
tools test-only changes: add more image files to test more skdiff behavior 2012-05-16 18:06:54 +00:00
trybots_to_run Check in lists of trybots that are appropriate to run in various circumstances. 2012-05-08 15:26:58 +00:00
DEPS Update skia's gyp to r1320. 2012-04-09 13:57:45 +00:00
Doxyfile Create update-doxygen script that generates and uploads docs 2011-12-06 14:52:38 +00:00
gyp_skia Make all gyp targets automatically include common.gypi 2012-03-16 13:52:49 +00:00
LICENSE Manually update copyright notices in files that defied the automated process 2011-07-28 14:24:55 +00:00
make.bat Manually update copyright notices in files that defied the automated process 2011-07-28 14:24:55 +00:00
make.py Make "make gyp" work on Windows 2012-03-23 18:14:25 +00:00
Makefile Stop packaging command-line Mac tools as a bundle. 2011-08-15 19:22:39 +00:00
Makefile.old Higher resolution timers for bench. 2011-06-07 19:16:02 +00:00
README whitespace commit to trigger buildbot 2011-07-15 14:11:58 +00:00
skia.gyp Some final cleanups leading up to The Official Switch to Gyp 2011-06-07 14:48:41 +00:00
whitespace.txt whitespace change to test buildbot changes in r3746 2012-04-20 20:59:29 +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