[Webkit-unassigned] [Bug 96114] [chromium] Make prioritized texture manager not touch backings array on the main thread

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 9 16:39:52 PDT 2012


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





--- Comment #13 from Eric Penner <epenner at chromium.org>  2012-09-09 16:40:10 PST ---
(In reply to comment #12)
> Thanks!
> 
> (In reply to comment #11)
> > I don't follow this.  assertInvariants is for making sure that the sorting is correct.  It seems like you should either only assert when it's sorted or sort every time.  Why do you need to sometimes sort here?
> 
> This is idiosyncratic.  I wanted to add code to test the sorting algorithm, and code to verify that things are sorted at various points in the execution.  The flag "forceResort" is only used in a test which verifies the sorting scheme.  The alternative (which may be better) would be to have make prioritizeBackings public, and have the test explicitly call that (which then implicitly verifies the order in assertInvariants).  Would that be more straightforward.  The only downside of exposing a (basically) internal function just for testing.

An another option (could go either way really) we could always make the sort explicit in the commit and remove the lazy sort flag. It would make it harder to accidentally not sort IMO, but also reduces flexibility a bit I guess.

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