[Webkit-unassigned] [Bug 74535] [chromium] Add postCancellable[Delayed]Task to CCThread

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 14 16:11:49 PST 2011


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





--- Comment #7 from Tien-Ren Chen <trchen at chromium.org>  2011-12-14 16:11:49 PST ---
Basically my opinion is the same as Nat's. There is some situation that we don't really want to create a CCScopedThreadProxy for each of the task target. One example is CCDelayBasedTimeSource, and another example is the fling driver in WebCompositorInputHandlerImpl (the latter case can actually make use of the former). Currently we solve the "destroyed before task fired" problem by playing with the reference counter, which I feel isn't really safe to do.

The CCTaskHandle provides a general, reusable way to cancel an individual task. Not only it can be used to avoid object lifespan problem, but also allows rescheduling of tasks (which will be handy for delayed animation). And it is relatively cheap (no reference counter is needed).

The cons of CCTaskHandle is that it requires a handle for each of the posted task, but I would say for many cases it is sufficient.

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