skia2/include/core
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
..
SkAdvancedTypefaceMetrics.h [PDF] Fix font embedding restrictions. 2014-06-19 11:05:39 -07:00
SkAnnotation.h Factory methods for heap-allocated SkAnnotation objects. 2014-02-27 11:47:36 +00:00
SkBBHFactory.h Remove unused TileGridInfo 2015-01-20 05:57:06 -08:00
SkBitmap.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkBitmapDevice.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkBlitRow.h rename blitrow::proc and add (uncalled) hook for colorproc16 2015-01-13 13:51:00 -08:00
SkBlurTypes.h move common blur types into central header 2014-04-28 16:25:35 +00:00
SkCanvas.h remove (dead) SK_SUPPORT_LEGACY_DRAWDATA and SK_SUPPORT_LEGACY_CANVAS_VIRTUAL 2015-01-09 14:17:40 -08:00
SkChunkAlloc.h combine glyph and image bulk alloc, and adjust initial alloc size, to reduce total waste from 50% to 30% 2013-06-19 19:25:36 +00:00
SkClipStack.h Add dump() to SkClipStack to help with debugging. 2014-06-09 07:59:06 -07:00
SkColor.h SkAlpha constant defs 2013-07-19 17:43:27 +00:00
SkColorFilter.h Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. 2014-12-01 11:47:08 -08:00
SkColorPriv.h Address MSVC warnings about possible value truncation. In the process removes some apparently unused code. 2014-09-02 13:40:48 -07:00
SkColorTable.h Flail a little against LLVM crash. 2014-12-02 13:17:06 -08:00
SkComposeShader.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkData.h Stop overloading internal_dispose in SkTextBlob and SkData 2014-11-20 08:02:46 -08:00
SkDataTable.h Remove SkDataTable from SkFlattenable hierarchy. 2013-10-15 20:39:57 +00:00
SkDeque.h This CL addresses "SkCanvas::save flags are not respected by GPU backend" (https://code.google.com/p/skia/issues/detail?id=1503). 2013-08-16 00:53:34 +00:00
SkDevice.h remove dead SK_SUPPORT_LEGACY_DEVICE_CLEAR code 2014-12-21 11:03:36 -08:00
SkDither.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
SkDocument.h SkDocument SK_API 2014-11-14 13:24:18 -08:00
SkDraw.h pass dst-rect through from drawBitmapRect for better precision 2014-12-15 13:42:51 -08:00
SkDrawFilter.h Add GPU support for roundrects 2013-04-25 15:27:00 +00:00
SkDrawLooper.h SkDrawLooper: No need for virtual bounds computation methods. 2014-12-01 13:03:22 -08:00
SkDrawPictureCallback.h Rename SkDrawPictureCallback to SkPicture::AbortCallback 2015-01-07 07:28:41 -08:00
SkDynamicAnnotations.h Look at DYNAMIC_ANNOTATIONS_ENABLED now. 2014-12-15 13:38:07 -08:00
SkEndian.h fix size_t/int warnings 2014-04-23 19:19:44 +00:00
SkError.h Sanitizing source files in Housekeeper-Nightly 2013-09-05 07:01:19 +00:00
SkFixed.h Switch SkBitmapProcState's SkFractionalInt to 32.32. 2014-11-21 12:10:33 -08:00
SkFlattenable.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkFlattenableSerialization.h Removed unnecessary define 2013-11-08 15:24:12 +00:00
SkFloatBits.h remove unused SkIntToFloatCast_NoOverflowCheck 2014-08-19 07:39:41 -07:00
SkFloatingPoint.h use log2(scale) to compute mip level 2015-01-16 08:35:09 -08:00
SkFont.h Treat embedded bitmaps as a hinting method. 2014-08-19 13:18:58 -07:00
SkFontHost.h Remove a layer of indirection and code from SkFontHost. 2014-09-10 15:49:48 -07:00
SkFontLCDConfig.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-03-13 07:01:04 +00:00
SkFontStyle.h Replace SkTypeface::Style with SkFontStyle. 2014-10-20 13:33:19 -07:00
SkGraphics.h Cleanup: Remove unused InstallNewHandler() function from SkGraphics. 2014-11-05 07:20:51 -08:00
SkImage.h remove NewTexture? 2015-01-13 04:00:55 -08:00
SkImageDecoder.h Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkImageEncoder.h add const to encodePixels pixel parameter 2014-12-19 12:26:07 -08:00
SkImageFilter.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkImageGenerator.h need to rebaseline (changed) c_gms, update dox 2015-01-07 18:20:16 -08:00
SkImageInfo.h remove dead SK_SUPPORT_LEGACY_N32_NAME code 2014-12-21 14:29:05 -08:00
SkInstCnt.h Simplify SkInstCnt 2015-01-13 08:22:44 -08:00
SkLazyPtr.h Add SkTypeface::getBounds() 2014-10-22 13:20:58 -07:00
SkMallocPixelRef.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkMask.h remove unused kLCD_MaskFormat 2014-11-13 14:39:58 -08:00
SkMaskFilter.h remove view matrix from context 2014-12-17 15:50:11 -08:00
SkMath.h SK_CPU_ARM --> SK_CPU_ARM32 2014-06-03 12:07:31 -07:00
SkMatrix.h remove dead SkPersp macros 2015-01-20 19:58:36 -08:00
SkMetaData.h "NULL !=" = NULL 2014-09-05 13:34:00 -07:00
SkMultiPictureDraw.h SkTaskGroup::batch(fn, args, N) 2014-10-29 14:17:13 -07:00
SkOnce.h namespace {} trick for SK_DECLARE_STATIC_ONCE 2015-01-13 08:40:23 -08:00
SkOSFile.h Add option to dump images from nanobench. 2014-08-07 14:28:50 -07:00
SkPackBits.h Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
SkPaint.h add paint::getFontBounds() 2014-12-15 13:27:26 -08:00
SkPath.h Simplify SkInstCnt 2015-01-13 08:22:44 -08:00
SkPathEffect.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkPathMeasure.h use conics 2014-12-17 08:21:05 -08:00
SkPathRef.h Fix rrects that are large enough that we lose/gain a bit when we add the radius to a bounds coordinate. 2014-12-15 12:28:33 -08:00
SkPicture.h Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkPictureRecorder.h Remove legacy Picture defines. 2014-12-19 07:28:00 -08:00
SkPixelRef.h Add sRGB texture support. 2014-12-22 08:31:49 -08:00
SkPixelSerializer.h add const to encodePixels pixel parameter 2014-12-19 12:26:07 -08:00
SkPoint.h Rewrite NaN checks in terms of SkScalarIsNaN() 2014-12-15 12:08:47 -08:00
SkPostConfig.h Don't use 'defined' in macro expansion. 2014-10-15 13:53:55 -07:00
SkPreConfig.h Remove copile time enabling of SK_ARM_HAS_NEON. 2014-08-01 09:21:19 -04:00
SkRasterizer.h Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. 2014-12-01 11:47:08 -08:00
SkRect.h It is dangerous to ignore SkRect::intersect's return value 2015-01-07 12:16:10 -08:00
SkRefCnt.h Simplify SkInstCnt 2015-01-13 08:22:44 -08:00
SkRegion.h Add dump() to SkClipStack to help with debugging. 2014-06-09 07:59:06 -07:00
SkRRect.h Fill SkRRect::fType proactively. 2014-12-18 13:29:54 -08:00
SkScalar.h use log2(scale) to compute mip level 2015-01-16 08:35:09 -08:00
SkShader.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkSize.h deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients 2013-12-17 19:22:07 +00:00
SkStream.h Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkString.h document the SkStrAppend methods 2014-11-07 07:37:33 -08:00
SkStrokeRec.h Add color emoji fallback for nvpr text 2014-12-01 08:38:55 -08:00
SkSurface.h Require budget decision when creating a RenderTarget SkSurface. 2015-01-16 07:32:33 -08:00
SkSurfaceProps.h add SkImage::newSurface 2014-11-21 08:46:38 -08:00
SkTArray.h Enable unused param checking for public includes. 2014-11-14 11:11:46 -08:00
SkTDArray.h Remove debug-only fData from SKTDArray. 2014-11-19 09:41:27 -08:00
SkTDict.h move some headers out of public 2014-06-17 09:04:45 -07:00
SkTDStack.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkTemplates.h Adding check on input count 2015-01-07 13:28:08 -08:00
SkTextBlob.h Stop overloading internal_dispose in SkTextBlob and SkData 2014-11-20 08:02:46 -08:00
SkThread.h Allow -DGOOGLE3 to bypass our normal platform intrinsic dispatch. 2015-01-13 13:27:26 -08:00
SkThreadPriv.h Allow -DGOOGLE3 to bypass our normal platform intrinsic dispatch. 2015-01-13 13:27:26 -08:00
SkTime.h Revert of Add nanosecond timer. (https://codereview.chromium.org/250243002/) 2014-04-24 20:17:24 +00:00
SkTInternalLList.h "NULL !=" = NULL 2014-09-05 13:34:00 -07:00
SkTLazy.h "NULL !=" = NULL 2014-09-05 13:34:00 -07:00
SkTRegistry.h Rewrite SkTRegistry to take any trivially-copyable type. 2013-09-04 17:20:18 +00:00
SkTSearch.h One SkTSearch to rule them all. Allow key to be of different type than the array. 2013-05-17 19:05:03 +00:00
SkTypeface.h Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkTypes.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkUnPreMultiply.h Factor out UnPreMultiplyPreservingByteOrder 2014-01-15 22:24:58 +00:00
SkUtils.h SSE2 implementation of memcpy32 2014-05-21 12:43:07 +00:00
SkWeakRefCnt.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkWriteBuffer.h Replace EncodeBitmap with an interface. 2014-12-11 10:53:58 -08:00
SkWriter32.h SkCanvas::drawPatch param SkPoint[12] 2014-08-12 08:34:29 -07:00
SkXfermode.h Do more cleanup from xp changes 2015-01-20 10:19:22 -08:00