[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
This commit is contained in:
vandebo@chromium.org 2013-08-26 18:02:00 +00:00
parent 0dc546c37c
commit 6bb656b008

View File

@ -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");
}