mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 1097776 - Don't leak the SkBitmapDevice. r=jrmuizel
This commit is contained in:
parent
d758890dc7
commit
a3d313d208
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user