Commit 4b0adf81 authored by's avatar
Browse files

Don't leak the CGImage we create when drawing a sub image.

Reviewed by Geoff Garen.

git-svn-id: 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 43cd1a36
2009-11-23 Oliver Hunt <>
Reviewed by Geoff Garen.
Don't leak the CGImage we create when drawing a sub image.
* platform/graphics/cg/ImageCG.cpp:
2009-11-23 Adam Barth <>
Reviewed by Dimitri Glazkov.
......@@ -203,7 +203,7 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& destRect, const F
subimageRect.setHeight(ceilf(subimageRect.height() + topPadding));
adjustedDestRect.setHeight(subimageRect.height() / yScale);
image = CGImageCreateWithImageInRect(image.get(), subimageRect);
image.adoptCF(CGImageCreateWithImageInRect(image.get(), subimageRect));
if (currHeight < srcRect.bottom()) {
ASSERT(CGImageGetHeight(image.get()) == currHeight - CGRectIntegral(srcRect).origin.y);
adjustedDestRect.setHeight(CGImageGetHeight(image.get()) / yScale);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment