[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 12:40:33 PDT 2012


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





--- Comment #33 from Christopher Cameron <ccameron at chromium.org>  2012-09-05 12:40:47 PST ---
(In reply to comment #32)

> The only thing I'm worried about here is whether backing objects could be destroyed/created by other means while this task is in flight. If so these pointers don't uniquely identify backing objects any more.

So there does exist a bug here -- a reduceMemory() call can destroy a backing that has been handed to the main thread, but the main thread hasn't deleted yet.  I don't see a way around that without basically going back to the scheme of having a list of evicted textures in the PTM which is protected by a mutex (so, going back to the old scheme).

> (From update of attachment 162173 [details])
> As a last thought, I wonder if we could avoid having two backing sets, and instead copy a custom vector of structs like:
> struct ImplBacking
> { 
>    Backing* backing,
>    int priority;
>    bool evicted;
> };
> Then we could just process that list before doing any other backing management in the commit (which all happens during updating textures). Thought for food.

>From this it sounds like we're converging to a place where the m_backings vector is controlled entirely by the impl thread.  This makes sense to me -- that way we wouldn't have to have the extra BackingSet for the impl thread.  The change to do this would be fairly simple;
- have prioritizeTextures() not touch the backings array because it's called on the main thread
- add a prioritizeBackings() function to be called during commit, which pushes the texture priorities to their backings, and sorts the backings array
- add a "int m_priority" to CCPrioritizedTexture::Backing

The mutex-protected list of evicted textures would still be needed, though.

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