Descriptionworkers: Slightly change how WorkerThread uses a WebThread.
Right now, a WorkerThread creates a WebThreadSupportingGC for each
WebThread that runs worker code. So, in the case of normal workers (i.e.
shared/dedicated/service), each WorkerThread spins up a new
WebThreadSupportingGC (which creates and owns a new WebThread instance).
For compositor-workers, a single WebThreadSupportingGC is created for all
workers by CompositorWorkerManager. This instance of WebThreadSupportingGC
creates and owns the thread that runs the compositor-workers.
However, we want to run the compositor workers in the same thread as the
compositor. This compositor-thread is created, owned, and maintained by the
Platform. Therefore, it is not possible for CompositorWorkerManager to
create a WebThreadSupportingGC instance. So, change the WorkerThread to
work directly with a WebThread. All the normal workers directly create a
WebThread instance, and WorkerThread manages the GC support for it. However,
CompositorWorkerManager directly creates both a WebThread instance, and
necessary code for adding support for GC (GCSupportForWebThread)
separately. In a subsequent CL, this will be changed so that instead of
creating and owning the WebThread instance, the CompositorWorkerManager
gets the WebThread for running the workers from the Platform.
BUG=518708
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : . #Patch Set 4 : . #
Total comments: 2
Patch Set 5 : . #Messages
Total messages: 13 (2 generated)
|