Switch SkPDFStream's internal storage from SkStream to SkData
Motivation: This makes SkPDFStream thread-safe for two threads
serializing it at once, since a SkStream has an internal position.
Updated SkPDFFont, SkPDFGraphicState, and SkPDFPage's use of
SkPDFStream to use the SkData constructor rather than the SkStream
constructor (saving a memcpy).
BUG=skia:2683
Committed: https://skia.googlesource.com/skia/+/c1dfa14b645ae274780f026dd86c9b633fbdad06
R=mtklein@google.com, djsollen@google.com, rmistry@google.com, robertphillips@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/340783013
diff --git a/src/images/SkImageDecoder_libbmp.cpp b/src/images/SkImageDecoder_libbmp.cpp
index f9dd247..7b87e40 100644
--- a/src/images/SkImageDecoder_libbmp.cpp
+++ b/src/images/SkImageDecoder_libbmp.cpp
@@ -12,7 +12,7 @@
#include "SkImageDecoder.h"
#include "SkScaledBitmapSampler.h"
#include "SkStream.h"
-#include "SkStreamHelpers.h"
+#include "SkStreamPriv.h"
#include "SkTDArray.h"
class SkBMPImageDecoder : public SkImageDecoder {
@@ -99,7 +99,7 @@
// Allocated space used to hold the data.
SkAutoMalloc storage;
// Byte length of all of the data.
- const size_t length = CopyStreamToStorage(&storage, stream);
+ const size_t length = SkCopyStreamToStorage(&storage, stream);
if (0 == length) {
return 0;
}