Go to file
scroggo 9b2cdbf481 Allow creating multiple scanline decoders.
Make getScanlineDecoder return a new object each time, which is
owned by the caller, and independent from any existing scanline
decoders and the SkCodec itself.

Since the SkCodec already contains the entire state machine, and it
is used by the scanline decoders, simply create a new SkCodec which
is now owned by the scanline decoder.

Move code that cleans up after using a scanline decoder into its
destructor

One side effect is that creating the first scanline decoder requires
a duplication of the stream and re-reading the header. (With some
more complexity/changes, we could pass the state machine to the
scanline decoder and make the SkCodec recreate its own state machine
instead.) The typical client of the scanline decoder (region decoder)
uses an SkMemoryStream, so the duplication is cheap, although we
should consider the extra time to reread the header/recreate the state
machine. (If/when we use the scanline decoder for other purposes,
where the stream may not be cheaply duplicated, we should consider
passing the state machine.)

One (intended) result of this change is that a client can create a
new scanline decoder in a new thread, and decode different pieces of
the image simultaneously.

In SkPngCodec::decodePalette, use fBitDepth rather than a parameter.

Review URL: https://codereview.chromium.org/1230033004
2015-07-10 12:07:02 -07:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Allow creating multiple scanline decoders. 2015-07-10 12:07:02 -07:00
bin Change to use mean and to use stderr. 2015-07-09 10:50:24 -07:00
debugger Fix debugger compilation 2015-06-24 10:09:57 -07:00
dm Allow creating multiple scanline decoders. 2015-07-10 12:07:02 -07:00
example Propagate SkSurfaceProps to more call sites 2015-06-23 06:26:08 -07:00
experimental remove SkInstCnt 2015-06-26 11:45:03 -07:00
forth Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
gm Remove setFromPaint from GrPipelineBuilder 2015-07-09 13:25:02 -07:00
gyp Fix msvs builds 2015-07-10 10:59:47 -07:00
include Allow creating multiple scanline decoders. 2015-07-10 12:07:02 -07:00
infra Add a 64-bit ARM builder to the CQ. 2015-06-24 14:52:24 -07:00
platform_tools Move android_gdb_tmp into out/ 2015-07-10 11:05:10 -07:00
resources Use the upstream version of libwebp, v0.4.3. 2015-07-10 09:32:09 -07:00
samplecode Add normal map sample 2015-07-09 09:04:16 -07:00
site doc: more changes 2015-07-09 06:58:06 -07:00
src Allow creating multiple scanline decoders. 2015-07-10 12:07:02 -07:00
tests Allow creating multiple scanline decoders. 2015-07-10 12:07:02 -07:00
third_party Use the upstream version of libwebp, v0.4.3. 2015-07-10 09:32:09 -07:00
tools add runtime option to provide data->imagegenerator factory 2015-07-09 11:47:36 -07:00
.gitignore git: add skps to .gitignore 2015-02-13 18:57:33 -08:00
AUTHORS Return cropBitmap 2015-04-15 05:48:54 -07:00
codereview.settings Automatically add a docs preview link and NOTRY=true when there are only docs changes. 2015-02-26 10:16:13 -08:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Add benjaminwagner@ to CQ_COMMITTERS. 2015-06-08 10:22:34 -07:00
DEPS Use the upstream version of libwebp, v0.4.3. 2015-07-10 09:32:09 -07:00
Doxyfile Documentation: SkCanvas API 2015-05-19 10:21:29 -07:00
gyp_skia Support SKIA_OUT on Mac and ChromeOS 2015-05-04 08:04:28 -07:00
gyp_skia.py Roll gyp deps from 1765 to 1796. 2013-11-21 18:11:14 +00:00
HASHTAGS Fix cr SKPs naming 2015-03-31 08:03:02 -07:00
LICENSE Manually update copyright notices in files that defied the automated process 2011-07-28 14:24:55 +00:00
make.bat Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
make.py Run gyp on Win with --no-parallel -G config=$(BUILDTYPE), fix pylint 2015-03-03 13:15:38 -05:00
Makefile Add lua scripts for generating n-grams from SKPs 2015-06-25 07:47:41 -07:00
OWNERS add root files from chrome 2013-08-13 19:11:15 +00:00
PRESUBMIT.py Revert "Move headers used by headers in include/ to include/private." 2015-07-01 16:35:59 -04:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
skia.gyp Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
SKP_VERSION Update SKP version 2015-07-06 05:25:09 -07:00
whitespace.txt whitespace 2015-07-01 18:21:42 -04:00

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

See full details, and build instructions, at https://skia.org.