skia2/experimental/PdfViewer
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
..
inc Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
pdfparser Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
scripts Add a script for running pdfviewer and comparing to existing results. 2013-11-12 14:52:47 +00:00
src Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
chop_transparency_main.cpp Cleanup: Rename SkOSPath functions. 2014-07-28 19:26:58 -07:00
pdf_viewer_main.cpp Revert "Revert "Move SkGpuDevice.h to src/gpu"" 2014-09-17 07:44:25 -07:00
SkNulCanvas.cpp pdfviewer: code cleanup - add licence on files, make replace __DEFINE__foo with foo_DEFINED to match skia project 2013-08-21 16:31:37 +00:00
SkNulCanvas.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkPdfConfig.h mode code cleanup (100c / l, comments) 2013-10-10 20:58:22 +00:00
SkPdfFont.cpp Small tweaks to be able to build everything target: 2014-01-08 21:16:14 +00:00
SkPdfFont.h Small tweaks to be able to build everything target: 2014-01-08 21:16:14 +00:00
SkPdfGraphicsState.cpp Factory methods for heap-allocated SkPathEffect and SkXfermode objects. 2014-02-20 20:40:19 +00:00
SkPdfGraphicsState.h Move SkPdfContext into its own files. 2013-11-20 22:33:39 +00:00
SkPdfReporter.cpp Changes to SkTDStackNester. 2013-11-20 21:40:57 +00:00
SkPdfReporter.h Changes to SkTDStackNester. 2013-11-20 21:40:57 +00:00
SkPdfUtils.cpp pdfviewer: code cleanup - add licence on files, make replace __DEFINE__foo with foo_DEFINED to match skia project 2013-08-21 16:31:37 +00:00
SkPdfUtils.h pdfviewer: more code comments + concat the pdf matrix with the existing matrix in canvas, instead of reseting it. 2013-10-11 18:26:45 +00:00
SkTrackDevice.cpp pdfviewer: code cleanup - add licence on files, make replace __DEFINE__foo with foo_DEFINED to match skia project 2013-08-21 16:31:37 +00:00
SkTrackDevice.h quick fix to land clear() change 2014-12-04 08:39:09 -08:00
SkTracker.cpp pdfviewer: code cleanup - add licence on files, make replace __DEFINE__foo with foo_DEFINED to match skia project 2013-08-21 16:31:37 +00:00
SkTracker.h pdfviewr: include what you use (stdio) 2013-11-07 22:07:34 +00:00