Source code

Revision control

Other Tools

1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
* vim: sw=2 ts=8 et :
3
*/
4
/* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7
8
include "mozilla/GfxMessageUtils.h";
9
include "mozilla/layers/LayersMessageUtils.h";
10
11
include protocol PCompositorBridge;
12
13
using CSSRect from "Units.h";
14
using struct mozilla::layers::RepaintRequest from "mozilla/layers/RepaintRequest.h";
15
using struct mozilla::layers::ScrollableLayerGuid from "mozilla/layers/ScrollableLayerGuid.h";
16
using mozilla::layers::ScrollableLayerGuid::ViewID from "mozilla/layers/ScrollableLayerGuid.h";
17
using mozilla::layers::MaybeZoomConstraints from "mozilla/layers/ZoomConstraints.h";
18
using mozilla::layers::GeckoContentController::APZStateChange from "mozilla/layers/GeckoContentController.h";
19
using mozilla::layers::ScrollDirection from "mozilla/layers/LayersTypes.h";
20
using mozilla::layers::MatrixMessage from "mozilla/layers/MatrixMessage.h";
21
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
22
using mozilla::dom::ContentParentId from "mozilla/dom/ipc/IdType.h";
23
using mozilla::layers::AsyncDragMetrics from "mozilla/layers/AsyncDragMetrics.h";
24
using class nsRegion from "nsRegion.h";
25
26
namespace mozilla {
27
namespace layers {
28
29
30
/**
31
* PAPZ is a protocol for remoting a GeckoContentController. PAPZ lives on the
32
* PCompositorBridge protocol which either connects to the compositor thread
33
* in the main process, or to the compositor thread in the gpu processs.
34
*
35
* PAPZParent lives in the compositor thread, while PAPZChild lives wherever the remoted
36
* GeckoContentController lives (generally the main thread of the main or content process).
37
* RemoteContentController implements PAPZParent, while APZChild implements PAPZChild.
38
*
39
* PAPZ is always used for ContentProcessController and only used for ChromeProcessController
40
* when there is a gpu process, otherwhise ChromeProcessController is used directly on the
41
* compositor thread. Only the methods that are used by the [Chrome,Content]ProcessController
42
* are implemented. If a new method is needed then PAPZ, APZChild, and RemoteContentController
43
* must be updated to handle it.
44
*/
45
sync protocol PAPZ
46
{
47
manager PCompositorBridge;
48
49
parent:
50
async __delete__();
51
52
child:
53
async LayerTransforms(MatrixMessage[] aTransforms);
54
55
async RequestContentRepaint(RepaintRequest request);
56
57
async UpdateOverscrollVelocity(float aX, float aY, bool aIsRootContent);
58
59
async UpdateOverscrollOffset(float aX, float aY, bool aIsRootContent);
60
61
async NotifyMozMouseScrollEvent(ViewID aScrollId, nsString aEvent);
62
63
async NotifyAPZStateChange(ScrollableLayerGuid aGuid, APZStateChange aChange, int aArg);
64
65
async NotifyFlushComplete();
66
67
async NotifyAsyncScrollbarDragInitiated(uint64_t aDragBlockId, ViewID aScrollId, ScrollDirection aDirection);
68
69
async NotifyAsyncScrollbarDragRejected(ViewID aScrollId);
70
71
async NotifyAsyncAutoscrollRejected(ViewID aScrollId);
72
73
both:
74
async Destroy();
75
};
76
77
} // layers
78
} // mozilla