skia2/experimental
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
..
AndroidPathRenderer Cleanup: Go with SkDebugf instead of GrPrintf. 2014-10-31 07:11:12 -07:00
ChromeUtils Sanitizing source files in Housekeeper-Nightly 2013-12-11 07:02:06 +00:00
DrawingBoard remove SkFloatToScalar macro 2013-11-25 19:44:07 +00:00
expectations/skp add headers to experimental SKP expectations 2014-08-20 11:51:39 -07:00
FileReaderApp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
go-skia patch from issue 697743002 2014-11-03 10:45:50 -08:00
Intersection Define NDEBUG instead of SK_DEBUG/SK_RELEASE. 2014-08-20 07:38:46 -07:00
iOSSampleApp Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
iOSShell ios fixes 2014-07-11 12:14:51 -07:00
LightSymbolsUtil Use lowercase windows.h in includes to fix Windows cross compilation using mingw. 2013-12-03 15:23:37 +00:00
nanomsg Change SkPicture::draw to playback 2014-09-04 08:42:50 -07:00
Networking Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
PdfViewer Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
pixman Sanitizing source files in Skia_Periodic_House_Keeping 2012-10-17 02:01:13 +00:00
SimpleCocoaApp Revert "If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get better performance." 2013-10-22 16:54:15 +00:00
SimpleiOSApp Cleanup: Remove SimpleiOSApp xcode project file. 2014-11-03 15:10:49 -08:00
SkiaExamples Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkV8Example Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
StrokePathRenderer Remove more unnamed namespace usages. 2014-01-23 02:02:57 +00:00
tools Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkSetPoly3To3_A.cpp remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats 2013-12-17 16:44:46 +00:00
SkSetPoly3To3_D.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkSetPoly3To3.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00