From 0770044da6d61dcbc8d9673fed8dd92460faa314 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 20 Dec 2010 19:46:07 +0000 Subject: add option to write PDFs from gm fix some compile warnings (reorder initializers, init local ptr) git-svn-id: http://skia.googlecode.com/svn/trunk@642 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/pdf/SkPDFDevice.cpp | 6 +++--- src/pdf/SkPDFImage.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index 9aefd0a258..fec9a4f883 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -131,10 +131,10 @@ static inline SkBitmap makeABitmap(int width, int height) { } SkPDFDevice::SkPDFDevice(int width, int height) - : fWidth(width), + : SkDevice(NULL, makeABitmap(width, height), false), + fWidth(width), fHeight(height), - fGraphicStackIndex(0), - SkDevice(NULL, makeABitmap(width, height), false) { + fGraphicStackIndex(0) { fGraphicStack[0].fColor = SK_ColorBLACK; fGraphicStack[0].fTextSize = SK_ScalarNaN; // This has no default value. fGraphicStack[0].fTextScaleX = SK_Scalar1; diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp index 65b9b24514..2162eaec66 100644 --- a/src/pdf/SkPDFImage.cpp +++ b/src/pdf/SkPDFImage.cpp @@ -29,7 +29,7 @@ namespace { SkMemoryStream* extractImageData(const SkBitmap& bitmap) { - SkMemoryStream* result; + SkMemoryStream* result = NULL; bitmap.lockPixels(); switch (bitmap.getConfig()) { -- cgit v1.2.3