зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1298246 - Update documentation for APZ IPDL protocols. r=kats
MozReview-Commit-ID: 6IYNycFmu7z --HG-- extra : rebase_source : 917aecd0b7dafc09db21c6993eb6eca0f01a8eba
This commit is contained in:
Родитель
265b20404d
Коммит
a624f81f28
|
@ -27,7 +27,11 @@ public:
|
||||||
/**
|
/**
|
||||||
* Requests a paint of the given FrameMetrics |aFrameMetrics| from Gecko.
|
* Requests a paint of the given FrameMetrics |aFrameMetrics| from Gecko.
|
||||||
* Implementations per-platform are responsible for actually handling this.
|
* Implementations per-platform are responsible for actually handling this.
|
||||||
* This method will always be called on the Gecko main thread.
|
*
|
||||||
|
* This method must always be called on the repaint thread, which depends
|
||||||
|
* on the GeckoContentController. For ChromeProcessController it is the
|
||||||
|
* Gecko main thread, while for RemoteContentController it is the compositor
|
||||||
|
* thread where it can send IPDL messages.
|
||||||
*/
|
*/
|
||||||
virtual void RequestContentRepaint(const FrameMetrics& aFrameMetrics) = 0;
|
virtual void RequestContentRepaint(const FrameMetrics& aFrameMetrics) = 0;
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,14 @@ namespace layers {
|
||||||
class IAPZCTreeManager;
|
class IAPZCTreeManager;
|
||||||
class APZEventState;
|
class APZEventState;
|
||||||
|
|
||||||
// A ChromeProcessController is attached to the root of a compositor's layer
|
/**
|
||||||
// tree.
|
* ChromeProcessController is a GeckoContentController attached to the root of
|
||||||
|
* a compositor's layer tree. It's used directly by APZ by default, and remoted
|
||||||
|
* using PAPZ if there is a gpu process.
|
||||||
|
*
|
||||||
|
* If ChromeProcessController needs to implement a new method on GeckoContentController
|
||||||
|
* PAPZ, APZChild, and RemoteContentController must be updated to handle it.
|
||||||
|
*/
|
||||||
class ChromeProcessController : public mozilla::layers::GeckoContentController
|
class ChromeProcessController : public mozilla::layers::GeckoContentController
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -21,6 +21,17 @@ namespace layers {
|
||||||
|
|
||||||
class APZChild;
|
class APZChild;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ContentProcessController is a GeckoContentController for a TabChild, and is always
|
||||||
|
* remoted using PAPZ/APZChild.
|
||||||
|
*
|
||||||
|
* ContentProcessController is created in ContentChild when a layer tree id has
|
||||||
|
* been allocated for a PBrowser that lives in that content process, and is destroyed
|
||||||
|
* when the Destroy message is received, or when the tab dies.
|
||||||
|
*
|
||||||
|
* If ContentProcessController needs to implement a new method on GeckoContentController
|
||||||
|
* PAPZ, APZChild, and RemoteContentController must be updated to handle it.
|
||||||
|
*/
|
||||||
class ContentProcessController final
|
class ContentProcessController final
|
||||||
: public GeckoContentController
|
: public GeckoContentController
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,6 +15,10 @@ namespace layers {
|
||||||
|
|
||||||
class GeckoContentController;
|
class GeckoContentController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APZChild implements PAPZChild and is used to remote a GeckoContentController
|
||||||
|
* that lives in a different process than where APZ lives.
|
||||||
|
*/
|
||||||
class APZChild final : public PAPZChild
|
class APZChild final : public PAPZChild
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -29,13 +29,19 @@ namespace layers {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If APZ is enabled then one PAPZ will be opened per PBrowser between the
|
* PAPZ is a protocol for remoting a GeckoContentController. PAPZ lives on the
|
||||||
* process where the PBrowser child actor lives and the main process (the
|
* PCompositorBridge protocol which either connects to the compositor thread
|
||||||
* PBrowser parent actor doesn't necessarily live in the main process, for
|
* in the main process, or to the compositor thread in the gpu processs.
|
||||||
* example with nested browsers). This will typically be set up when the layers
|
|
||||||
* id is allocated for the PBrowser.
|
|
||||||
*
|
*
|
||||||
* Opened through PContent and runs on the main thread in both parent and child.
|
* PAPZParent lives in the compositor thread, while PAPZChild lives wherever the remoted
|
||||||
|
* GeckoContentController lives (generally the main thread of the main or content process).
|
||||||
|
* RemoteContentController implements PAPZParent, while APZChild implements PAPZChild.
|
||||||
|
*
|
||||||
|
* PAPZ is always used for ContentProcessController and only used for ChromeProcessController
|
||||||
|
* when there is a gpu process, otherwhise ChromeProcessController is used directly on the
|
||||||
|
* compositor thread. Only the methods that are used by the [Chrome,Content]ProcessController
|
||||||
|
* are implemented. If a new method is needed then PAPZ, APZChild, and RemoteContentController
|
||||||
|
* must be updated to handle it.
|
||||||
*/
|
*/
|
||||||
sync protocol PAPZ
|
sync protocol PAPZ
|
||||||
{
|
{
|
||||||
|
@ -48,6 +54,7 @@ parent:
|
||||||
async __delete__();
|
async __delete__();
|
||||||
|
|
||||||
child:
|
child:
|
||||||
|
|
||||||
async RequestContentRepaint(FrameMetrics frame);
|
async RequestContentRepaint(FrameMetrics frame);
|
||||||
|
|
||||||
// The aCallTakeFocusForClickFromTap argument is used for eSingleTap types,
|
// The aCallTakeFocusForClickFromTap argument is used for eSingleTap types,
|
||||||
|
|
|
@ -34,6 +34,15 @@ using class mozilla::ScrollWheelInput from "InputData.h";
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PAPZCTreeManager is a protocol for remoting an IAPZCTreeManager. PAPZCTreeManager
|
||||||
|
* lives on the PCompositorBridge protocol which either connects to the compositor
|
||||||
|
* thread in the main process, or to the compositor thread in the gpu processs.
|
||||||
|
*
|
||||||
|
* PAPZCTreeManagerParent lives in the compositor thread, while PAPZCTreeManagerChild
|
||||||
|
* lives in the main thread of the main or the content process. APZCTreeManagerParent
|
||||||
|
* and APZCTreeManagerChild implement this protocol.
|
||||||
|
*/
|
||||||
sync protocol PAPZCTreeManager
|
sync protocol PAPZCTreeManager
|
||||||
{
|
{
|
||||||
manager PCompositorBridge;
|
manager PCompositorBridge;
|
||||||
|
|
|
@ -20,11 +20,14 @@ class TabParent;
|
||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RemoteContentController uses the PAPZ protocol to implement a
|
* RemoteContentController implements PAPZChild and is used to access a
|
||||||
* GeckoContentController for a browser living in a remote process.
|
* GeckoContentController that lives in a different process.
|
||||||
* Most of the member functions can be called on any thread, exceptions are
|
*
|
||||||
* annotated in comments. The PAPZ protocol runs on the main thread (so all the
|
* RemoteContentController lives on the compositor thread. All methods can
|
||||||
* Recv* member functions do too).
|
* be called off the compositor thread and will get dispatched to the right
|
||||||
|
* thread, with the exception of RequestContentRepaint and NotifyFlushComplete,
|
||||||
|
* which must be called on the repaint thread, which in this case is the compositor
|
||||||
|
* thread.
|
||||||
*/
|
*/
|
||||||
class RemoteContentController : public GeckoContentController
|
class RemoteContentController : public GeckoContentController
|
||||||
, public PAPZParent
|
, public PAPZParent
|
||||||
|
|
Загрузка…
Ссылка в новой задаче