aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
authorGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-26 18:02:00 +0000
committerGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-26 18:02:00 +0000
commit6bb656b00868eb70b7647be4bf8194c48e34a1c5 (patch)
treeb936807443c5e886395b8581ddc5647af5892ca3 /src/pdf
parent0dc546c37c7dff3885188054d191cf852d899e32 (diff)
[PDF] Fix printing crashes caused by font streams that don't support getMemoryBase().
An apparently recently change started putting web fonts into SkStream objects that don't support getMemoryBase(). This change uses writeStream to avoid needing to call getMemoryBase(). BUG=chromium:274440 R=bungeman@google.com Review URL: https://codereview.chromium.org/23414007 git-svn-id: http://skia.googlecode.com/svn/trunk@10918 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkPDFStream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pdf/SkPDFStream.cpp b/src/pdf/SkPDFStream.cpp
index 4ae1f39d26..c96a70f2e5 100644
--- a/src/pdf/SkPDFStream.cpp
+++ b/src/pdf/SkPDFStream.cpp
@@ -64,7 +64,7 @@ void SkPDFStream::emitObject(SkWStream* stream, SkPDFCatalog* catalog,
this->INHERITED::emitObject(stream, catalog, false);
stream->writeText(" stream\n");
- stream->write(fData->getMemoryBase(), fData->getLength());
+ stream->writeStream(fData.get(), fData->getLength());
stream->writeText("\nendstream");
}