Gecko:CrossProcessLayers: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 76: Line 76:


= Concurrency model for remote layers =
= Concurrency model for remote layers =
Kinda somewhat a lower-level implementation detail, kinda somewhat not.
Assume we have a master process M and a slave process S.  M and S maintain their own local layer trees M_l and S_l.  M_l may have a leaf RemoteContainer layer R into which updates from S are published.  The contents of R are immutable wrt M, but M may freely modify R.  R contains the "shadow layer tree" R_s published by S.  R_s is semantically a copy of a (possibly) partially-composited S_l.
Updates to R_s are atomic wrt painting.  When S wishes to publish updates to M, it sends an "Update(cset)" message to M containing all R_s changes to be applied.  This message is processed in its own "task" ("event") in M.  This task will (?? create a layer tree transaction and ??) apply cset.  cset will include layer additions, removals, and attribute changes.  Initially we probably want Update(cset) to be synchronous.  (cjones believes it can be made asynchronous, but that would add unnecessary complexity for a first implementation.)  Under the covers (opaque to M), in-place updates will be made to existing R_s layers.
Question: how should M publish updates of R_s to its own master MM?  One approach is to apply Update(cset) to R_s, then synchronously publish Update(cset union M_cset) to its master MM.
A cset C can be constructed by implementing a TransactionRecorder interface for layers (layer managers?).  The recorder will observe all mutations performed on a tree and package them into an IPC message.  (This interface could also be used for debugging, to dump layer modifications to stdout.)
Confirmed users
699

edits

Navigation menu