skia2/src/images
scroggo a1193e4b0e Make SkStream *not* ref counted.
SkStream is a stateful object, so it does not make sense for it to have
multiple owners. Make SkStream inherit directly from SkNoncopyable.

Update methods which previously called SkStream::ref() (e.g.
SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(),
which required the existing owners to call SkStream::unref()) to take
ownership of their SkStream parameters and delete when done (including
on failure).

Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some
cases this means heap allocating streams that were previously stack
allocated.

Respect ownership rules of SkTypeface::CreateFromStream() and
SkImageDecoder::buildTileIndex().

Update the comments for exceptional methods which do not affect the
ownership of their SkStream parameters (e.g.
SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be
explicit about ownership.

Remove test_stream_life, which tested that buildTileIndex() behaved
correctly when SkStream was a ref counted object. The test does not
make sense now that it is not.

In SkPDFStream, remove the SkMemoryStream member. Instead of using it,
create a new SkMemoryStream to pass to fDataStream (which is now an
SkAutoTDelete).

Make other pdf rasterizers behave like SkPDFDocumentToBitmap.

SkPDFDocumentToBitmap delete the SkStream, so do the same in the
following pdf rasterizers:

SkPopplerRasterizePDF
SkNativeRasterizePDF
SkNoRasterizePDF

Requires a change to Android, which currently treats SkStreams as ref
counted objects.

Review URL: https://codereview.chromium.org/849103004
2015-01-21 12:09:53 -08:00
..
bmpdecoderhelper.cpp More Windows 64b compilation warning fixes 2013-11-21 14:24:16 +00:00
bmpdecoderhelper.h More Windows 64b compilation warning fixes 2013-11-21 14:24:16 +00:00
SkDecodingImageGenerator.cpp Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkForceLinking.cpp Ensure that we don't reference decoders that we don't build 2014-08-28 12:04:41 -07:00
SkImageDecoder_astc.cpp Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkImageDecoder_FactoryDefault.cpp Change SkImageDecoders to take an SkStreamRewindable. 2013-09-25 21:34:24 +00:00
SkImageDecoder_FactoryRegistrar.cpp Change SkImageDecoders to take an SkStreamRewindable. 2013-09-25 21:34:24 +00:00
SkImageDecoder_ktx.cpp Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkImageDecoder_libbmp.cpp Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkImageDecoder_libgif.cpp Upstream support for giflib >= 5.1. 2015-01-20 12:38:06 -08:00
SkImageDecoder_libico.cpp Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkImageDecoder_libjpeg.cpp Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkImageDecoder_libpng.cpp Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkImageDecoder_libwebp.cpp Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkImageDecoder_pkm.cpp Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkImageDecoder_wbmp.cpp Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkImageDecoder.cpp Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkImageEncoder_argb.cpp Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkImageEncoder_Factory.cpp Rewrite SkTRegistry to take any trivially-copyable type. 2013-09-04 17:20:18 +00:00
SkImageEncoder.cpp add const to encodePixels pixel parameter 2014-12-19 12:26:07 -08:00
SkJpegUtility.cpp Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkJpegUtility.h Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkMovie_gif.cpp Upstream support for giflib >= 5.1. 2015-01-20 12:38:06 -08:00
SkMovie.cpp Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkPageFlipper.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkScaledBitmapSampler.cpp Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkScaledBitmapSampler.h Add sampler options to SkScaledBitmapSampler 2014-06-09 14:29:11 -07:00
transform_scanline.h