Index: src/pdf/SkPDFGraphicState.cpp |
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp |
index fa3baaf95e3bb9b5e1e48e25933585b0cb8cdebe..1b495341b9159065c7bde6e25edfad6543335c3c 100644 |
--- a/src/pdf/SkPDFGraphicState.cpp |
+++ b/src/pdf/SkPDFGraphicState.cpp |
@@ -5,10 +5,10 @@ |
* found in the LICENSE file. |
*/ |
-#include "SkData.h" |
#include "SkPDFFormXObject.h" |
#include "SkPDFGraphicState.h" |
#include "SkPDFUtils.h" |
+#include "SkStream.h" |
#include "SkTypes.h" |
static const char* blend_mode_from_xfermode(SkXfermode::Mode mode) { |
@@ -121,9 +121,8 @@ |
domainAndRange->appendInt(1); |
static const char psInvert[] = "{1 exch sub}"; |
- // Do not copy the trailing '\0' into the SkData. |
- SkAutoTUnref<SkData> psInvertStream( |
- SkData::NewWithCopy(psInvert, strlen(psInvert))); |
+ SkAutoTUnref<SkMemoryStream> psInvertStream( |
+ new SkMemoryStream(&psInvert, strlen(psInvert), true)); |
invertFunction = new SkPDFStream(psInvertStream.get()); |
invertFunction->insertInt("FunctionType", 4); |