зеркало из https://github.com/mozilla/pjs.git
Bug 719429. Fix canvas data leak in DrawTargetCG. r=ajuma
I forgot to fix this before landing and refound it using http://s3.zazub.com/games/circle_game/index.html
This commit is contained in:
Родитель
b2f7020fed
Коммит
e574104a89
|
@ -116,6 +116,7 @@ DrawTargetCG::~DrawTargetCG()
|
||||||
CGColorSpaceRelease(mColorSpace);
|
CGColorSpaceRelease(mColorSpace);
|
||||||
if (mCg)
|
if (mCg)
|
||||||
CGContextRelease(mCg);
|
CGContextRelease(mCg);
|
||||||
|
free(mData);
|
||||||
}
|
}
|
||||||
|
|
||||||
TemporaryRef<SourceSurface>
|
TemporaryRef<SourceSurface>
|
||||||
|
@ -845,7 +846,6 @@ DrawTargetCG::Init(const IntSize &aSize, SurfaceFormat &)
|
||||||
// XXX: currently we allocate ourselves so that we can easily return a gfxImageSurface
|
// XXX: currently we allocate ourselves so that we can easily return a gfxImageSurface
|
||||||
// we might not need to later if once we don't need to support gfxImageSurface
|
// we might not need to later if once we don't need to support gfxImageSurface
|
||||||
//XXX: currently Init implicitly clears, that can often be a waste of time
|
//XXX: currently Init implicitly clears, that can often be a waste of time
|
||||||
// XXX: leaked
|
|
||||||
mData = calloc(mSize.height * stride, 1);
|
mData = calloc(mSize.height * stride, 1);
|
||||||
// XXX: what should we do if this fails?
|
// XXX: what should we do if this fails?
|
||||||
mCg = CGBitmapContextCreate (mData,
|
mCg = CGBitmapContextCreate (mData,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче