skia2/include/utils
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
..
ios Drop executable flag from headers so that they can be packaged 2014-03-11 19:55:51 +00:00
mac Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
win "NULL !=" = NULL 2014-09-05 13:34:00 -07:00
SkBoundaryPatch.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkCamera.h Enable unused param checking for public includes. 2014-11-14 11:11:46 -08:00
SkCanvasStateUtils.h Turn SkCanvasStateUtils into a class with static functions. 2014-10-10 06:19:09 -07:00
SkCubicInterval.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkCullPoints.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkDebugUtils.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-02-15 07:16:57 +00:00
SkDeferredCanvas.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkDumpCanvas.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkEventTracer.h rename tracing parameter to be more consistent with other methods 2014-02-03 19:47:13 +00:00
SkFrontBufferedStream.h Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkInterpolator.h Promote SkInterpolator unit test to our tests driver. 2014-06-26 13:07:05 -07:00
SkJSONCPP.h upstream google3 include paths for jsoncpp 2015-01-14 05:02:39 -08:00
SkLayer.h Extended Inst counting to find "unknown" leaked object (SkTMaskGamma) 2012-08-16 14:58:06 +00:00
SkLua.h SkTextBlob plumbing 2014-08-26 07:56:44 -07:00
SkLuaCanvas.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkMatrix44.h Add isScale() helper function to SkMatrix44. 2014-10-24 08:07:05 -07:00
SkMeshUtils.h Start cleaning up 64bit Win warnings 2013-10-14 21:53:24 +00:00
SkNinePatch.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkNoSaveLayerCanvas.h Introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/)" 2014-09-22 07:29:03 -07:00
SkNullCanvas.h Add SK_API to null canvas create method 2012-06-11 15:41:25 +00:00
SkNWayCanvas.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkParse.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkParsePaint.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkParsePath.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkPathUtils.h Animated the PathUtils Sample to show path contours# Enter a description of the change. 2013-07-09 16:30:38 +00:00
SkPictureUtils.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkProxyCanvas.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkRandom.h There can be only one (SkRandom)! 2014-12-15 12:54:51 -08:00
SkRTConf.h Migrate SkRTConfRegistry test to DEF_TEST(). 2014-08-12 09:03:16 -07:00
SkTextBox.h add textblobs to lua 2014-11-03 19:55:41 -08:00