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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 5 22:46:19 PDT 2012


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





--- Comment #43 from James Robinson <jamesr at chromium.org>  2012-09-05 22:46:32 PST ---
(From update of attachment 162358)
View in context: https://bugs.webkit.org/attachment.cgi?id=162358&action=review

>>> Source/WebCore/platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:297
>>> +        destroyBacking((*it));
>> 
>> this call does a GL call if i understand it correctly - can you not do it inside the mutex? a fairly efficient way to do that would be to make a new vector, .swap() m_evictedBackings into the new vector under the lock, then outside the lock iterate through and actually destroy the backings
> 
> Wait sorry, this can't be right - we must have already issued the GL delete before we hit here.  What's this supposed to be doing on the main thread?

OK sorry, I think I see now - this is just supposed to remove it from this texture manager's set of live backings and unlink the CCPrioritizedTexture

So now I'm backing to wondering why this has a lock at all.  Why not just pass a vector of deleted backings to the main thread in the beginFrame message and have the main thread unlink these on the main thread prioritized texture manager on its own time?  There's no reason to keep track of this set on the impl thread after the GL textures have been deleted and we've passed the set to the main thread.  Passing a vector can be really efficient if you just .swap() the storage instead of copying element by element.

-- 
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