Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(703)

Unified Diff: src/pdf/SkPDFGraphicState.cpp

Issue 340783013: Switch SkPDFStream's internal storage from SkStream to SkData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: AnotherPatchSet Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/pdf/SkPDFGraphicState.cpp
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp
index 1b495341b9159065c7bde6e25edfad6543335c3c..6bccd45f829a7dbbdb2dd8142b91571a4e3f48e2 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,8 +121,8 @@ SkPDFObject* SkPDFGraphicState::GetInvertFunction() {
domainAndRange->appendInt(1);
static const char psInvert[] = "{1 exch sub}";
- SkAutoTUnref<SkMemoryStream> psInvertStream(
- new SkMemoryStream(&psInvert, strlen(psInvert), true));
+ SkAutoTUnref<SkData> psInvertStream(
+ SkData::NewWithProc(psInvert, strlen(psInvert), NULL, NULL));
mtklein 2014/06/26 13:21:59 NewWithCString?
hal.canary 2014/06/26 18:42:02 I was avoiding a copy. Also, NewWithCString inclu
invertFunction = new SkPDFStream(psInvertStream.get());
invertFunction->insertInt("FunctionType", 4);

Powered by Google App Engine
This is Rietveld 408576698