diff options
-rw-r--r-- | src/core/SkCanvas.cpp | 8 | ||||
-rw-r--r-- | src/effects/SkBitmapCache.cpp | 5 | ||||
-rw-r--r-- | src/effects/SkLayerDrawLooper.cpp | 15 |
3 files changed, 18 insertions, 10 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 0b6f086313..f8dd0288f1 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -399,7 +399,9 @@ private: SkDevice* SkCanvas::init(SkDevice* device) { fBounder = NULL; + fLocalBoundsCompareType.setEmpty(); fLocalBoundsCompareTypeDirty = true; + fLocalBoundsCompareTypeBW.setEmpty(); fLocalBoundsCompareTypeDirtyBW = true; fLastDeviceToGainFocus = NULL; fDeviceCMDirty = false; @@ -411,6 +413,8 @@ SkDevice* SkCanvas::init(SkDevice* device) { fMCRec->fTopLayer = fMCRec->fLayer; fMCRec->fNext = NULL; + fExternalMatrix.reset(); + fExternalInverse.reset(); fUseExternalMatrix = false; return this->setDevice(device); @@ -434,7 +438,7 @@ SkCanvas::SkCanvas(SkDevice* device) : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) { inc_canvas(); - fDeviceFactory = device->getDeviceFactory();
+ fDeviceFactory = device->getDeviceFactory(); SkSafeRef(fDeviceFactory); this->init(device); @@ -445,7 +449,7 @@ SkCanvas::SkCanvas(const SkBitmap& bitmap) inc_canvas(); SkDevice* device = SkNEW_ARGS(SkDevice, (bitmap)); - fDeviceFactory = device->getDeviceFactory();
+ fDeviceFactory = device->getDeviceFactory(); SkSafeRef(fDeviceFactory); this->init(device)->unref(); diff --git a/src/effects/SkBitmapCache.cpp b/src/effects/SkBitmapCache.cpp index 2a3f87a7f8..404eace479 100644 --- a/src/effects/SkBitmapCache.cpp +++ b/src/effects/SkBitmapCache.cpp @@ -24,7 +24,10 @@ struct SkBitmapCache::Entry { size_t fSize; SkBitmap fBitmap; - Entry(const void* buffer, size_t size, const SkBitmap& bm) : fBitmap(bm) { + Entry(const void* buffer, size_t size, const SkBitmap& bm) + : fPrev(NULL), + fNext(NULL), + fBitmap(bm) { fBuffer = sk_malloc_throw(size); fSize = size; memcpy(fBuffer, buffer, size); diff --git a/src/effects/SkLayerDrawLooper.cpp b/src/effects/SkLayerDrawLooper.cpp index 3b21d4913c..b837fc0d1b 100644 --- a/src/effects/SkLayerDrawLooper.cpp +++ b/src/effects/SkLayerDrawLooper.cpp @@ -12,9 +12,10 @@ SkLayerDrawLooper::LayerInfo::LayerInfo() { fPostTranslate = false; } -SkLayerDrawLooper::SkLayerDrawLooper() { - fRecs = NULL; - fCount = 0; +SkLayerDrawLooper::SkLayerDrawLooper() + : fRecs(NULL), + fCount(0), + fCurrRec(NULL) { } SkLayerDrawLooper::~SkLayerDrawLooper() { @@ -200,10 +201,10 @@ void SkLayerDrawLooper::flatten(SkFlattenableWriteBuffer& buffer) { } SkLayerDrawLooper::SkLayerDrawLooper(SkFlattenableReadBuffer& buffer) - : INHERITED(buffer) { - fRecs = NULL; - fCount = 0; - + : INHERITED(buffer), + fRecs(NULL), + fCount(0), + fCurrRec(NULL) { int count = buffer.readInt(); for (int i = 0; i < count; i++) { |