Bug 69101
Summary: | [chromium] Memory leak when updating GPU layers | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alexandru Chiculita <achicu> |
Component: | Platform | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | schenney |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Alexandru Chiculita
Every time a GPU layer is updated the CG graphics context is leaked:
In http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/chromium/PlatformCanvas.h the m_contextCG and m_colorSpace members are RetainPtr, but the initial reference is never released. RetainPtr needs adoptCF in order to adopt the reference of the objects that were just created.
RetainPtr<CGColorSpaceRef> m_colorSpace;
RetainPtr<CGContextRef> m_contextCG;
http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/chromium/PlatformCanvas.cpp
m_colorSpace = CGColorSpaceCreateDeviceRGB();
size_t rowBytes = canvas->size().width() * 4;
m_contextCG = CGBitmapContextCreate(canvas->m_pixelData.get(),
canvas->size().width(), canvas->size().height(), 8, rowBytes,
m_colorSpace.get(),
kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Stephen Chenney
https://code.google.com/p/chromium/issues/detail?id=230803