RESOLVED DUPLICATE of bug 39312 39443
Accelerated compositing leaks tons of GDI region objects
https://bugs.webkit.org/show_bug.cgi?id=39443
Summary Accelerated compositing leaks tons of GDI region objects
Adam Roben (:aroben)
Reported 2010-05-20 13:47:44 PDT
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
Adam Roben (:aroben)
Comment 1 2010-05-20 13:48:29 PDT
Adam Roben (:aroben)
Comment 2 2010-05-20 13:56:25 PDT
The GDIUsage tool from http://msdn.microsoft.com/en-us/magazine/cc188782.aspx#S9 shows that we're leaking region objects.
Adam Roben (:aroben)
Comment 3 2010-05-20 14:05:04 PDT
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)
Comment 4 2010-05-20 14:07:42 PDT
(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)
Comment 5 2010-05-20 14:16:01 PDT
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 ***
Note You need to log in before you can comment on or make changes to this bug.