Bug 39443
Summary: | Accelerated compositing leaks tons of GDI region objects | ||
---|---|---|---|
Product: | WebKit | Reporter: | Adam Roben (:aroben) <aroben> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | cmarrin, enrica, sfalken, simon.fraser, sullivan |
Priority: | P2 | Keywords: | InRadar, PlatformOnly |
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Windows XP | ||
URL: | http://webkit.org/blog-files/3d-transforms/poster-circle.html |
Adam Roben (:aroben)
To reproduce:
1. Open Task Manager
2. Go to View > Select Columns...
3. Check "GDI Objects"
4. Click OK
5. Launch Safari and go to http://webkit.org/blog-files/3d-transforms/poster-circle.html
6. Watch Safari's GDI object count in Task Manager
The count goes up and up and up at about 40 objects/second. Closing the tab containing poster-circle.html doesn't cause the GDI objects to get reclaimed.
The same thing happens when watching <video>.
This might be the cause of bug 39312.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Adam Roben (:aroben)
<rdar://problem/8010240>
Adam Roben (:aroben)
The GDIUsage tool from http://msdn.microsoft.com/en-us/magazine/cc188782.aspx#S9 shows that we're leaking region objects.
Adam Roben (:aroben)
Looks like there's a leak in the getDirtyRects function in WKCACFLayerRenderer.cpp:
<http://trac.webkit.org/browser/trunk/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp?rev=59684#L455>
If we bail out early after calling CreateRectRgn, we forget to destroy the region. (Note that the extremely similar code in WebView.cpp does not have this bug, because it uses OwnPtr.)
Adam Roben (:aroben)
(In reply to comment #3)
> Looks like there's a leak in the getDirtyRects function in WKCACFLayerRenderer.cpp:
Plugging that leak fixes this bug entirely.
Adam Roben (:aroben)
This seems to be the root cause of bug 39312, as that bug doesn't reproduce with the fix for this bug applied. Duping.
*** This bug has been marked as a duplicate of bug 39312 ***