Gecko:CrossProcessLayers: Difference between revisions

Jump to navigation Jump to search
Line 75: Line 75:
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.
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.
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.  <s>(cjones believes it can be made asynchronous, but that would add unnecessary complexity for a first implementation.)</s> (asynchronous layer updates seem counterproductive wrt perf and introduce too many concurrency problems.  synchronous seems to be the way to go permanently.)  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.  This is an optimization that allows us to maintain copy semantics without actually copying.
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.  This is an optimization that allows us to maintain copy semantics without actually copying.
Confirmed users
699

edits

Navigation menu