Commit 4b0adf81 authored by oliver@apple.com's avatar oliver@apple.com
Browse files

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

Reviewed by Geoff Garen.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 43cd1a36
2009-11-23 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Don't leak the CGImage we create when drawing a sub image.
* platform/graphics/cg/ImageCG.cpp:
(WebCore::BitmapImage::draw):
2009-11-23 Adam Barth <abarth@webkit.org>
 
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