Bug 1097776 - Don't leak the SkBitmapDevice. r=jrmuizel

This commit is contained in:
Markus Stange 2014-11-18 17:22:01 -05:00
parent 4bfc882827
commit fee32b29b7
3 changed files with 3 additions and 3 deletions

View File

@ -843,7 +843,7 @@ DrawTargetSkia::Init(unsigned char* aData, const IntSize &aSize, int32_t aStride
alphaType);
bitmap.setInfo(info, aStride);
bitmap.setPixels(aData);
mCanvas.adopt(new SkCanvas(new SkBitmapDevice(bitmap)));
mCanvas.adopt(new SkCanvas(bitmap));
mSize = aSize;
mFormat = aFormat;

View File

@ -203,7 +203,7 @@ SkiaTransform(DataSourceSurface* aDest,
SkBitmap destBitmap;
destBitmap.setInfo(destInfo, aDest->Stride());
destBitmap.setPixels((uint32_t*)aDest->GetData());
SkCanvas destCanvas(new SkBitmapDevice(destBitmap));
SkCanvas destCanvas(destBitmap);
IntSize srcSize = aSource->GetSize();
SkImageInfo srcInfo = SkImageInfo::Make(srcSize.width,

View File

@ -639,7 +639,7 @@ SkiaTransform(const gfxImageSurface* aDest,
SkBitmap destBitmap;
destBitmap.setInfo(destInfo, aDest->Stride());
destBitmap.setPixels((uint32_t*)aDest->Data());
SkCanvas destCanvas(new SkBitmapDevice(destBitmap));
SkCanvas destCanvas(destBitmap);
IntSize srcSize = aSrc->GetSize();
SkImageInfo srcInfo = SkImageInfo::Make(srcSize.width,