[Webkit-unassigned] [Bug 95057] [chromium] Allow impl-thread deletion of only some resources

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 27 12:54:49 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=95057





--- Comment #8 from Christopher Cameron <ccameron at chromium.org>  2012-08-27 12:54:52 PST ---
(From update of attachment 160669)
View in context: https://bugs.webkit.org/attachment.cgi?id=160669&action=review

>>>> Source/WebCore/platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:271
>>>> +                resourcesToDelete.append((*it)->id());
>>> 
>>> It would be good to reset the resource ID here, making it harder to accidentally use a stale resource id.
>> 
>> Good idea.  I moved the deletion tracking to the CCTexture structure.  As a (not absolutely necessary) consequence of this change, I delete the resource via the resourceProvider while the m_backingsMutex is held (we already call into the resourceProvider while the mutex is held while creating resources, so no further harm is done).
>> 
>> I will also need to add an assert to the id() accessor to make sure that it isn't called on the main thread.  Because of all of this instrumentation, it may be best to use composition of a CCTexture instead of inheritance.
> 
> I'm not sure about moving things into CCTexture. The CCTexture structure should be agnostic about where it is used, and not tied to the texture manager. It's meant to be used in all use cases of textures, not just contents.

Yeah, it doesn't feel right.  I'll change it to composition to control access to the interface.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list