forked from mirrors/gecko-dev
This remotes the APZInputBridge interface over the PAPZInputBridge
protocol in the case of the GPU process, and makes the GPU process'
main thread act as the APZ controller thread in that process. If
there is no GPU process we continue as before and the APZInputBridge
interface implementation is the concrete APZCTreeManager instance
in the UI process.
The main changes in this patch are moving all the code associated with
these messages out of APZCTreeManager{Parent,Child} and into
APZInputBridge{Parent,Child}. APZCTreeManagerChild now returns an
APZInputBridgeChild instance via InputBridge(), instead of returning
itself. The SetControllerThread call in the GPU process is also updated.
MozReview-Commit-ID: M4AaIW1Q0h
--HG--
extra : rebase_source : e5a8f14e23be34229fe80a47f6789d19b19e0a9f
93 lines
3.6 KiB
Text
93 lines
3.6 KiB
Text
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
using LayoutDeviceIntPoint from "Units.h";
|
|
using struct mozilla::layers::ScrollableLayerGuid from "FrameMetrics.h";
|
|
|
|
using nsEventStatus from "mozilla/EventForwards.h";
|
|
using EventMessage from "mozilla/EventForwards.h";
|
|
using class mozilla::MultiTouchInput from "InputData.h";
|
|
using class mozilla::MouseInput from "InputData.h";
|
|
using class mozilla::PanGestureInput from "InputData.h";
|
|
using class mozilla::PinchGestureInput from "InputData.h";
|
|
using class mozilla::TapGestureInput from "InputData.h";
|
|
using class mozilla::ScrollWheelInput from "InputData.h";
|
|
using class mozilla::KeyboardInput from "InputData.h";
|
|
|
|
include protocol PGPU;
|
|
|
|
namespace mozilla {
|
|
namespace layers {
|
|
|
|
/**
|
|
* This protocol is used to send input events from the UI process to the
|
|
* GPU process for handling by APZ. There is one instance per top-level
|
|
* compositor, or in other words, one instance per concrete APZCTreeManager
|
|
* instance. The child side lives on the main thread in the UI process,
|
|
* and the parent side lives on the main thread in the GPU process. If there
|
|
* is no GPU process, then this protocol is not instantiated.
|
|
*/
|
|
sync protocol PAPZInputBridge
|
|
{
|
|
manager PGPU;
|
|
|
|
parent:
|
|
// The following messages are used to
|
|
// implement the ReceiveInputEvent methods
|
|
|
|
sync ReceiveMultiTouchInputEvent(MultiTouchInput aEvent)
|
|
returns (nsEventStatus aOutStatus,
|
|
MultiTouchInput aOutEvent,
|
|
ScrollableLayerGuid aOutTargetGuid,
|
|
uint64_t aOutInputBlockId);
|
|
|
|
sync ReceiveMouseInputEvent(MouseInput aEvent)
|
|
returns (nsEventStatus aOutStatus,
|
|
MouseInput aOutEvent,
|
|
ScrollableLayerGuid aOutTargetGuid,
|
|
uint64_t aOutInputBlockId);
|
|
|
|
sync ReceivePanGestureInputEvent(PanGestureInput aEvent)
|
|
returns (nsEventStatus aOutStatus,
|
|
PanGestureInput aOutEvent,
|
|
ScrollableLayerGuid aOutTargetGuid,
|
|
uint64_t aOutInputBlockId);
|
|
|
|
sync ReceivePinchGestureInputEvent(PinchGestureInput aEvent)
|
|
returns (nsEventStatus aOutStatus,
|
|
PinchGestureInput aOutEvent,
|
|
ScrollableLayerGuid aOutTargetGuid,
|
|
uint64_t aOutInputBlockId);
|
|
|
|
sync ReceiveTapGestureInputEvent(TapGestureInput aEvent)
|
|
returns (nsEventStatus aOutStatus,
|
|
TapGestureInput aOutEvent,
|
|
ScrollableLayerGuid aOutTargetGuid,
|
|
uint64_t aOutInputBlockId);
|
|
|
|
sync ReceiveScrollWheelInputEvent(ScrollWheelInput aEvent)
|
|
returns (nsEventStatus aOutStatus,
|
|
ScrollWheelInput aOutEvent,
|
|
ScrollableLayerGuid aOutTargetGuid,
|
|
uint64_t aOutInputBlockId);
|
|
|
|
sync ReceiveKeyboardInputEvent(KeyboardInput aEvent)
|
|
returns (nsEventStatus aOutStatus,
|
|
KeyboardInput aOutEvent,
|
|
ScrollableLayerGuid aOutTargetGuid,
|
|
uint64_t aOutInputBlockId);
|
|
|
|
async UpdateWheelTransaction(LayoutDeviceIntPoint aRefPoint, EventMessage aEventMessage);
|
|
|
|
sync ProcessUnhandledEvent(LayoutDeviceIntPoint aRefPoint)
|
|
returns (LayoutDeviceIntPoint aOutRefPoint,
|
|
ScrollableLayerGuid aOutTargetGuid,
|
|
uint64_t aOutFocusSequenceNumber);
|
|
|
|
async __delete__();
|
|
};
|
|
|
|
} // namespace gfx
|
|
} // namespace mozilla
|