diff options
author | 2011-06-24 19:12:12 +0000 | |
---|---|---|
committer | 2011-06-24 19:12:12 +0000 | |
commit | 8a85d0c4938173476d037d7af0ee3b9436a1234e (patch) | |
tree | 3eac1645f722282933e2900f21cfc7c15ab81206 /gm | |
parent | dcab3a15c98dc56960cd0a4dc84ae69089e89be3 (diff) |
replace detach/getStream apis on dynamicwstream with SkData
http://codereview.appspot.com/4657046/
git-svn-id: http://skia.googlecode.com/svn/trunk@1714 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r-- | gm/gmmain.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp index 0408781358..0827ae6f5c 100644 --- a/gm/gmmain.cpp +++ b/gm/gmmain.cpp @@ -1,5 +1,6 @@ #include "gm.h" #include "SkColorPriv.h" +#include "SkData.h" #include "SkGraphics.h" #include "SkImageDecoder.h" #include "SkImageEncoder.h" @@ -180,7 +181,8 @@ static bool compare(const SkBitmap& target, const SkBitmap& base, static bool write_pdf(const SkString& path, const SkDynamicMemoryWStream& pdf) { SkFILEWStream stream(path.c_str()); - return stream.write(pdf.getStream(), pdf.getOffset()); + SkAutoDataUnref data(pdf.copyToData()); + return stream.writeData(data.get()); } enum Backend { |