|
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.
Committed: https://skia.googlesource.com/skia/+/a1193e4b0e34a7e4e1bd33e9708d7341679f8321
Total comments: 10
Total comments: 6
Total comments: 2
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+274 lines, -337 lines) |
Patch |
|
M |
bench/nanobench.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
debugger/QT/SkDebuggerGUI.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
dm/DMSrcSink.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
dm/DMSrcSink.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
4 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
experimental/PdfViewer/inc/SkPdfRenderer.h
|
View
|
1
2
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.h
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
gm/coloremoji.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/dcshader.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gm/dftext.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
include/core/SkImageDecoder.h
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
include/core/SkPicture.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
include/core/SkStream.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
2 chunks |
+13 lines, -8 lines |
0 comments
|
Download
|
|
M |
include/core/SkTypeface.h
|
View
|
1
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
include/images/SkDecodingImageGenerator.h
|
View
|
|
1 chunk |
+2 lines, -14 lines |
0 comments
|
Download
|
|
M |
include/utils/SkFrontBufferedStream.h
|
View
|
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
include/utils/mac/SkCGUtils.h
|
View
|
|
1 chunk |
+7 lines, -10 lines |
0 comments
|
Download
|
|
M |
samplecode/SampleAnimator.cpp
|
View
|
|
1 chunk |
+4 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/animator/SkAnimateMaker.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/animator/SkAnimator.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/animator/SkDrawBitmap.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/core/SkFontDescriptor.h
|
View
|
1
|
3 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/core/SkFontMgr.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/core/SkPaint.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/core/SkPictureData.h
|
View
|
1
|
3 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/core/SkStream.cpp
|
View
|
|
6 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/core/SkTypeface.cpp
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/device/xps/SkXPSDevice.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/fonts/SkFontMgr_fontconfig.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/fonts/SkFontMgr_indirect.cpp
|
View
|
1
2
3
4
5
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGLPathRendering.cpp
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/images/SkDecodingImageGenerator.cpp
|
View
|
|
5 chunks |
+7 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/images/SkImageDecoder.cpp
|
View
|
|
2 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
|
M |
src/images/SkImageDecoder_libjpeg.cpp
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/images/SkImageDecoder_libpng.cpp
|
View
|
1
2
3
4
|
4 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/images/SkImageDecoder_libwebp.cpp
|
View
|
|
4 chunks |
+3 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/images/SkJpegUtility.h
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/images/SkJpegUtility.cpp
|
View
|
|
2 chunks |
+1 line, -5 lines |
0 comments
|
Download
|
|
M |
src/images/SkMovie.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/pdf/SkPDFFont.cpp
|
View
|
|
6 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/pdf/SkPDFFormXObject.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/pdf/SkPDFImage.h
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/pdf/SkPDFImage.cpp
|
View
|
|
4 chunks |
+16 lines, -16 lines |
0 comments
|
Download
|
|
M |
src/pdf/SkPDFShader.cpp
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/pdf/SkPDFStream.h
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
|
M |
src/pdf/SkPDFStream.cpp
|
View
|
|
2 chunks |
+5 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/ports/SkFontConfigTypeface.h
|
View
|
1
2
3
4
5
6
|
3 chunks |
+4 lines, -9 lines |
0 comments
|
Download
|
|
M |
src/ports/SkFontHost_FreeType.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+8 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/ports/SkFontHost_fontconfig.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/ports/SkFontHost_linux.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
4 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/ports/SkFontHost_win.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/ports/SkFontMgr_android.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/ports/SkFontMgr_fontconfig.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
4 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
|
M |
src/ports/SkFontMgr_win_dw.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
5 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/ports/SkImageDecoder_empty.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
2 chunks |
+8 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/ports/SkTypeface_win_dw.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/sfnt/SkOTUtils.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/utils/SkFrontBufferedStream.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/utils/SkPDFRasterizer.h
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/utils/SkPDFRasterizer.cpp
|
View
|
1
2
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/utils/mac/SkStream_mac.cpp
|
View
|
|
2 chunks |
+14 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/utils/win/SkDWriteFontFileStream.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/utils/win/SkDWriteFontFileStream.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/views/animated/SkWidgetViews.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tests/FontHostStreamTest.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/FrontBufferedStreamTest.cpp
|
View
|
|
6 chunks |
+24 lines, -21 lines |
0 comments
|
Download
|
|
M |
tests/ImageDecodingTest.cpp
|
View
|
|
5 chunks |
+3 lines, -67 lines |
0 comments
|
Download
|
|
M |
tests/KtxTest.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/PDFPrimitivesTest.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tests/SerializationTest.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tests/StreamTest.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
4 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
tools/dump_record.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tools/lua/lua_pictures.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 27 (7 generated)
|