Bug 126155

Summary: ImageBufferBackingStoreCache should use DeferrableOneShotTimer
Product: WebKit Reporter: Tim Horton <thorton>
Component: PlatformAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren, mmaxfield, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch andersca: review+

Description Tim Horton 2013-12-23 03:31:00 PST
Right now, it uses plain old Timer, and reschedules it in every deallocate(), which can be very (very!) expensive (I'm seeing it at about 8% of main thread run time in my simple test case). That's why we have DeferrableOneShotTimer.

I have a patch.
Comment 1 Tim Horton 2013-12-23 03:46:42 PST
Created attachment 219905 [details]
patch
Comment 2 Tim Horton 2013-12-23 03:47:17 PST
Comment on attachment 219905 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219905&action=review

> Source/WebCore/platform/graphics/cg/ImageBufferBackingStoreCache.cpp:78
> +    {
> +    }

unindented obviously
Comment 3 Myles C. Maxfield 2014-01-02 11:17:41 PST
Comment on attachment 219905 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219905&action=review

> Source/WebCore/platform/graphics/cg/ImageBufferBackingStoreCache.cpp:32
> +static const double purgeInterval = 5;

shouldn't this be kPurgeInterval?

> Source/WebCore/platform/graphics/cg/ImageBufferBackingStoreCache.cpp:74
> +ImageBufferBackingStoreCache::ImageBufferBackingStoreCache()

Why did you move this into public?
Comment 4 Tim Horton 2014-01-02 11:22:48 PST
(In reply to comment #3)
> (From update of attachment 219905 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=219905&action=review
> 
> > Source/WebCore/platform/graphics/cg/ImageBufferBackingStoreCache.cpp:32
> > +static const double purgeInterval = 5;
> 
> shouldn't this be kPurgeInterval?

I think you'll find that that's generally not the case, nor do I see anything in the style guide.

> > Source/WebCore/platform/graphics/cg/ImageBufferBackingStoreCache.cpp:74
> > +ImageBufferBackingStoreCache::ImageBufferBackingStoreCache()
> 
> Why did you move this into public?

I didn't.
Comment 5 Tim Horton 2014-01-02 16:07:13 PST
http://trac.webkit.org/changeset/161239