2017-10-28 02:10:06 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2017-04-20 17:38:04 +03:00
|
|
|
* 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/. */
|
|
|
|
|
|
|
|
#ifndef GFX_WEBRENDERSCROLLDATA_H
|
|
|
|
#define GFX_WEBRENDERSCROLLDATA_H
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
2017-06-13 22:45:03 +03:00
|
|
|
#include "chrome/common/ipc_message_utils.h"
|
2017-06-13 22:17:59 +03:00
|
|
|
#include "FrameMetrics.h"
|
2017-06-13 22:45:03 +03:00
|
|
|
#include "ipc/IPCMessageUtils.h"
|
|
|
|
#include "LayersTypes.h"
|
2017-10-25 20:22:04 +03:00
|
|
|
#include "mozilla/Attributes.h"
|
2017-06-09 07:32:13 +03:00
|
|
|
#include "mozilla/GfxMessageUtils.h"
|
2017-06-08 21:18:09 +03:00
|
|
|
#include "mozilla/layers/LayerAttributes.h"
|
2017-06-09 07:32:13 +03:00
|
|
|
#include "mozilla/layers/LayersMessageUtils.h"
|
2017-06-13 09:43:59 +03:00
|
|
|
#include "mozilla/layers/FocusTarget.h"
|
2019-03-22 21:28:42 +03:00
|
|
|
#include "mozilla/layers/RenderRootBoundary.h"
|
|
|
|
#include "mozilla/layers/WebRenderMessageUtils.h"
|
|
|
|
#include "mozilla/webrender/WebRenderTypes.h"
|
2019-07-24 17:10:56 +03:00
|
|
|
#include "mozilla/HashTable.h"
|
2017-04-20 17:38:04 +03:00
|
|
|
#include "mozilla/Maybe.h"
|
|
|
|
#include "nsTArrayForwardDeclare.h"
|
|
|
|
|
2017-08-03 08:55:13 +03:00
|
|
|
class nsDisplayItem;
|
|
|
|
|
2017-04-20 17:38:04 +03:00
|
|
|
namespace mozilla {
|
2017-07-31 22:27:29 +03:00
|
|
|
|
|
|
|
struct ActiveScrolledRoot;
|
|
|
|
|
2017-04-20 17:38:04 +03:00
|
|
|
namespace layers {
|
|
|
|
|
|
|
|
class Layer;
|
2018-03-16 23:28:19 +03:00
|
|
|
class WebRenderLayerManager;
|
2017-04-20 17:38:04 +03:00
|
|
|
class WebRenderScrollData;
|
|
|
|
|
|
|
|
// Data needed by APZ, per layer. One instance of this class is created for
|
|
|
|
// each layer in the layer tree and sent over PWebRenderBridge to the APZ code.
|
|
|
|
// Each WebRenderLayerScrollData is conceptually associated with an "owning"
|
|
|
|
// WebRenderScrollData.
|
2019-04-11 15:36:51 +03:00
|
|
|
class WebRenderLayerScrollData final {
|
2017-04-20 17:38:04 +03:00
|
|
|
public:
|
|
|
|
WebRenderLayerScrollData(); // needed for IPC purposes
|
|
|
|
~WebRenderLayerScrollData();
|
|
|
|
|
2017-07-26 21:47:48 +03:00
|
|
|
void InitializeRoot(int32_t aDescendantCount);
|
2017-07-26 21:47:48 +03:00
|
|
|
void Initialize(WebRenderScrollData& aOwner, nsDisplayItem* aItem,
|
2017-07-31 22:27:29 +03:00
|
|
|
int32_t aDescendantCount,
|
2018-03-28 13:32:06 +03:00
|
|
|
const ActiveScrolledRoot* aStopAtAsr,
|
2019-03-22 21:28:42 +03:00
|
|
|
const Maybe<gfx::Matrix4x4>& aAncestorTransform,
|
|
|
|
wr::RenderRoot aRenderRoot);
|
2017-04-20 17:38:04 +03:00
|
|
|
|
2017-04-20 17:38:05 +03:00
|
|
|
int32_t GetDescendantCount() const;
|
|
|
|
size_t GetScrollMetadataCount() const;
|
|
|
|
|
2017-07-31 22:27:29 +03:00
|
|
|
void AppendScrollMetadata(WebRenderScrollData& aOwner,
|
|
|
|
const ScrollMetadata& aData);
|
2017-04-20 17:38:05 +03:00
|
|
|
// Return the ScrollMetadata object that used to be on the original Layer
|
|
|
|
// at the given index. Since we deduplicate the ScrollMetadata objects into
|
|
|
|
// the array in the owning WebRenderScrollData object, we need to be passed
|
|
|
|
// in a reference to that owner as well.
|
|
|
|
const ScrollMetadata& GetScrollMetadata(const WebRenderScrollData& aOwner,
|
|
|
|
size_t aIndex) const;
|
|
|
|
|
2018-05-01 23:31:23 +03:00
|
|
|
gfx::Matrix4x4 GetAncestorTransform() const { return mAncestorTransform; }
|
2017-08-16 19:50:37 +03:00
|
|
|
void SetTransform(const gfx::Matrix4x4& aTransform) {
|
|
|
|
mTransform = aTransform;
|
|
|
|
}
|
2017-04-20 17:38:05 +03:00
|
|
|
gfx::Matrix4x4 GetTransform() const { return mTransform; }
|
2017-05-24 22:47:14 +03:00
|
|
|
CSSTransformMatrix GetTransformTyped() const;
|
2017-08-16 19:50:37 +03:00
|
|
|
void SetTransformIsPerspective(bool aTransformIsPerspective) {
|
|
|
|
mTransformIsPerspective = aTransformIsPerspective;
|
|
|
|
}
|
2017-04-20 17:38:05 +03:00
|
|
|
bool GetTransformIsPerspective() const { return mTransformIsPerspective; }
|
2017-08-18 20:06:31 +03:00
|
|
|
|
2018-11-21 14:55:46 +03:00
|
|
|
EventRegions GetEventRegions() const { return EventRegions(); }
|
2017-08-18 20:06:31 +03:00
|
|
|
void SetEventRegionsOverride(const EventRegionsOverride& aOverride) {
|
|
|
|
mEventRegionsOverride = aOverride;
|
|
|
|
}
|
|
|
|
EventRegionsOverride GetEventRegionsOverride() const {
|
|
|
|
return mEventRegionsOverride;
|
|
|
|
}
|
2017-08-18 20:06:31 +03:00
|
|
|
|
2018-10-29 22:40:09 +03:00
|
|
|
void SetVisibleRegion(const LayerIntRegion& aRegion) {
|
|
|
|
mVisibleRegion = aRegion;
|
|
|
|
}
|
2017-05-24 22:47:14 +03:00
|
|
|
const LayerIntRegion& GetVisibleRegion() const { return mVisibleRegion; }
|
2019-09-12 11:08:32 +03:00
|
|
|
void SetRemoteDocumentRect(const LayerIntRect& aRemoteDocumentRect) {
|
|
|
|
mRemoteDocumentRect = aRemoteDocumentRect;
|
|
|
|
}
|
|
|
|
const LayerIntRect& GetRemoteDocumentRect() const {
|
|
|
|
return mRemoteDocumentRect;
|
|
|
|
}
|
2018-03-25 02:06:01 +03:00
|
|
|
void SetReferentId(LayersId aReferentId) { mReferentId = Some(aReferentId); }
|
|
|
|
Maybe<LayersId> GetReferentId() const { return mReferentId; }
|
2017-07-31 22:27:30 +03:00
|
|
|
|
2019-03-22 21:28:42 +03:00
|
|
|
void SetReferentRenderRoot(RenderRootBoundary aBoundary) {
|
|
|
|
mReferentRenderRoot = Some(aBoundary);
|
|
|
|
}
|
|
|
|
Maybe<RenderRootBoundary> GetReferentRenderRoot() const {
|
|
|
|
return mReferentRenderRoot;
|
|
|
|
}
|
|
|
|
void SetBoundaryRoot(RenderRootBoundary aBoundary) {
|
|
|
|
mBoundaryRoot = Some(aBoundary);
|
|
|
|
}
|
|
|
|
Maybe<RenderRootBoundary> GetBoundaryRoot() const { return mBoundaryRoot; }
|
|
|
|
|
2018-03-02 21:00:03 +03:00
|
|
|
void SetScrollbarData(const ScrollbarData& aData) { mScrollbarData = aData; }
|
|
|
|
const ScrollbarData& GetScrollbarData() const { return mScrollbarData; }
|
2017-07-31 22:27:30 +03:00
|
|
|
void SetScrollbarAnimationId(const uint64_t& aId) {
|
2019-02-06 23:00:08 +03:00
|
|
|
mScrollbarAnimationId = Some(aId);
|
2017-07-31 22:27:30 +03:00
|
|
|
}
|
2019-02-06 23:00:08 +03:00
|
|
|
Maybe<uint64_t> GetScrollbarAnimationId() const {
|
2017-05-23 17:50:41 +03:00
|
|
|
return mScrollbarAnimationId;
|
|
|
|
}
|
2017-07-31 22:27:30 +03:00
|
|
|
|
2018-11-01 23:15:46 +03:00
|
|
|
void SetFixedPositionScrollContainerId(ScrollableLayerGuid::ViewID aId) {
|
|
|
|
mFixedPosScrollContainerId = aId;
|
|
|
|
}
|
|
|
|
ScrollableLayerGuid::ViewID GetFixedPositionScrollContainerId() const {
|
|
|
|
return mFixedPosScrollContainerId;
|
|
|
|
}
|
2017-04-20 17:38:05 +03:00
|
|
|
|
2019-03-22 21:28:42 +03:00
|
|
|
wr::RenderRoot GetRenderRoot() { return mRenderRoot; }
|
|
|
|
|
2018-11-10 00:13:10 +03:00
|
|
|
void SetZoomAnimationId(const uint64_t& aId) { mZoomAnimationId = Some(aId); }
|
|
|
|
Maybe<uint64_t> GetZoomAnimationId() const { return mZoomAnimationId; }
|
2019-06-12 19:51:22 +03:00
|
|
|
|
|
|
|
void SetAsyncZoomContainerId(const ScrollableLayerGuid::ViewID aId) {
|
|
|
|
mAsyncZoomContainerId = Some(aId);
|
|
|
|
}
|
|
|
|
Maybe<ScrollableLayerGuid::ViewID> GetAsyncZoomContainerId() const {
|
|
|
|
return mAsyncZoomContainerId;
|
|
|
|
}
|
|
|
|
bool IsAsyncZoomContainer() const { return mAsyncZoomContainerId.isSome(); }
|
2018-11-10 00:13:10 +03:00
|
|
|
|
2017-07-26 21:47:49 +03:00
|
|
|
void Dump(const WebRenderScrollData& aOwner) const;
|
|
|
|
|
2017-04-20 17:38:04 +03:00
|
|
|
friend struct IPC::ParamTraits<WebRenderLayerScrollData>;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// The number of descendants this layer has (not including the layer itself).
|
|
|
|
// This is needed to reconstruct the depth-first layer tree traversal
|
|
|
|
// efficiently. Leaf layers should always have 0 descendants.
|
|
|
|
int32_t mDescendantCount;
|
|
|
|
|
|
|
|
// Handles to the ScrollMetadata objects that were on this layer. The values
|
|
|
|
// stored in this array are indices into the owning WebRenderScrollData's
|
|
|
|
// mScrollMetadatas array. This indirection is used to deduplicate the
|
|
|
|
// ScrollMetadata objects, since there is usually heavy duplication of them
|
|
|
|
// within a layer tree.
|
|
|
|
nsTArray<size_t> mScrollIds;
|
2017-04-20 17:38:05 +03:00
|
|
|
|
|
|
|
// Various data that we collect from the Layer in Initialize(), serialize
|
|
|
|
// over IPC, and use on the parent side in APZ.
|
|
|
|
|
2018-05-01 23:31:23 +03:00
|
|
|
gfx::Matrix4x4 mAncestorTransform;
|
2017-04-20 17:38:05 +03:00
|
|
|
gfx::Matrix4x4 mTransform;
|
|
|
|
bool mTransformIsPerspective;
|
2017-05-24 22:47:14 +03:00
|
|
|
LayerIntRegion mVisibleRegion;
|
2019-09-12 11:08:32 +03:00
|
|
|
LayerIntRect mRemoteDocumentRect;
|
2018-03-25 02:06:01 +03:00
|
|
|
Maybe<LayersId> mReferentId;
|
2019-03-22 21:28:42 +03:00
|
|
|
Maybe<RenderRootBoundary> mReferentRenderRoot;
|
|
|
|
Maybe<RenderRootBoundary> mBoundaryRoot;
|
2017-04-20 17:38:05 +03:00
|
|
|
EventRegionsOverride mEventRegionsOverride;
|
2018-03-02 21:00:03 +03:00
|
|
|
ScrollbarData mScrollbarData;
|
2019-02-06 23:00:08 +03:00
|
|
|
Maybe<uint64_t> mScrollbarAnimationId;
|
2018-11-01 23:15:46 +03:00
|
|
|
ScrollableLayerGuid::ViewID mFixedPosScrollContainerId;
|
2019-03-22 21:28:42 +03:00
|
|
|
wr::RenderRoot mRenderRoot;
|
2018-11-10 00:13:10 +03:00
|
|
|
Maybe<uint64_t> mZoomAnimationId;
|
2019-06-12 19:51:22 +03:00
|
|
|
Maybe<ScrollableLayerGuid::ViewID> mAsyncZoomContainerId;
|
2017-04-20 17:38:04 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
// Data needed by APZ, for the whole layer tree. One instance of this class
|
|
|
|
// is created for each transaction sent over PWebRenderBridge. It is populated
|
|
|
|
// with information from the WebRender layer tree on the client side and the
|
|
|
|
// information is used by APZ on the parent side.
|
2019-04-11 15:36:51 +03:00
|
|
|
class WebRenderScrollData final {
|
2017-04-20 17:38:04 +03:00
|
|
|
public:
|
|
|
|
WebRenderScrollData();
|
2017-10-25 20:22:04 +03:00
|
|
|
explicit WebRenderScrollData(WebRenderLayerManager* aManager);
|
2017-04-20 17:38:04 +03:00
|
|
|
|
2017-10-25 20:22:04 +03:00
|
|
|
WebRenderLayerManager* GetManager() const;
|
|
|
|
|
2017-04-20 17:38:04 +03:00
|
|
|
// Add the given ScrollMetadata if it doesn't already exist. Return an index
|
|
|
|
// that can be used to look up the metadata later.
|
|
|
|
size_t AddMetadata(const ScrollMetadata& aMetadata);
|
2017-07-26 21:47:48 +03:00
|
|
|
// Add the provided WebRenderLayerScrollData and return the index that can
|
|
|
|
// be used to look it up via GetLayerData.
|
|
|
|
size_t AddLayerData(const WebRenderLayerScrollData& aData);
|
2017-04-20 17:38:04 +03:00
|
|
|
|
2017-04-20 17:38:05 +03:00
|
|
|
size_t GetLayerCount() const;
|
|
|
|
|
2017-04-20 17:38:04 +03:00
|
|
|
// Return a pointer to the scroll data at the given index. Use with caution,
|
|
|
|
// as the pointer may be invalidated if this WebRenderScrollData is mutated.
|
2017-04-20 17:38:05 +03:00
|
|
|
const WebRenderLayerScrollData* GetLayerData(size_t aIndex) const;
|
|
|
|
|
|
|
|
const ScrollMetadata& GetScrollMetadata(size_t aIndex) const;
|
2018-11-01 23:15:46 +03:00
|
|
|
Maybe<size_t> HasMetadataFor(
|
|
|
|
const ScrollableLayerGuid::ViewID& aScrollId) const;
|
2017-04-20 17:38:04 +03:00
|
|
|
|
2017-04-20 17:38:06 +03:00
|
|
|
void SetIsFirstPaint();
|
|
|
|
bool IsFirstPaint() const;
|
2017-06-05 05:29:35 +03:00
|
|
|
void SetPaintSequenceNumber(uint32_t aPaintSequenceNumber);
|
|
|
|
uint32_t GetPaintSequenceNumber() const;
|
2017-04-20 17:38:06 +03:00
|
|
|
|
2019-07-24 17:10:56 +03:00
|
|
|
void ApplyUpdates(ScrollUpdatesMap& aUpdates, uint32_t aPaintSequenceNumber);
|
2018-05-12 04:18:22 +03:00
|
|
|
|
2017-04-20 17:38:04 +03:00
|
|
|
friend struct IPC::ParamTraits<WebRenderScrollData>;
|
|
|
|
|
2017-07-26 21:47:49 +03:00
|
|
|
void Dump() const;
|
|
|
|
|
2018-05-12 04:18:21 +03:00
|
|
|
private:
|
|
|
|
// This is called by the ParamTraits implementation to rebuild mScrollIdMap
|
|
|
|
// based on mScrollMetadatas
|
|
|
|
bool RepopulateMap();
|
|
|
|
|
2017-04-20 17:38:04 +03:00
|
|
|
private:
|
2017-10-25 20:22:04 +03:00
|
|
|
// Pointer back to the layer manager; if this is non-null, it will always be
|
|
|
|
// valid, because the WebRenderLayerManager that created |this| will
|
|
|
|
// outlive |this|.
|
|
|
|
WebRenderLayerManager* MOZ_NON_OWNING_REF mManager;
|
|
|
|
|
2017-04-20 17:38:04 +03:00
|
|
|
// Internal data structure used to maintain uniqueness of mScrollMetadatas.
|
2018-05-12 04:18:21 +03:00
|
|
|
// This is not serialized/deserialized over IPC, but it is rebuilt on the
|
|
|
|
// parent side when mScrollMetadatas is deserialized. So it should always be
|
|
|
|
// valid on both the child and parent.
|
2017-04-20 17:38:04 +03:00
|
|
|
// The key into this map is the scrollId of a ScrollMetadata, and the value is
|
|
|
|
// an index into the mScrollMetadatas array.
|
2019-07-24 17:10:56 +03:00
|
|
|
HashMap<ScrollableLayerGuid::ViewID, size_t> mScrollIdMap;
|
2017-04-20 17:38:04 +03:00
|
|
|
|
|
|
|
// A list of all the unique ScrollMetadata objects from the layer tree. Each
|
|
|
|
// ScrollMetadata in this list must have a unique scroll id.
|
|
|
|
nsTArray<ScrollMetadata> mScrollMetadatas;
|
|
|
|
|
|
|
|
// A list of per-layer scroll data objects, generated via a depth-first,
|
|
|
|
// pre-order, last-to-first traversal of the layer tree (i.e. a recursive
|
|
|
|
// traversal where a node N first pushes itself, followed by its children in
|
|
|
|
// last-to-first order). Each layer's scroll data object knows how many
|
|
|
|
// descendants that layer had, which allows reconstructing the traversal on
|
|
|
|
// the other side.
|
|
|
|
nsTArray<WebRenderLayerScrollData> mLayerScrollData;
|
2017-04-20 17:38:06 +03:00
|
|
|
|
|
|
|
bool mIsFirstPaint;
|
2017-06-05 05:29:35 +03:00
|
|
|
uint32_t mPaintSequenceNumber;
|
2017-04-20 17:38:04 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
namespace IPC {
|
|
|
|
|
2019-03-22 21:28:42 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::layers::RenderRootBoundary>
|
|
|
|
: public PlainOldDataSerializer<mozilla::layers::RenderRootBoundary> {};
|
|
|
|
|
2018-03-02 21:00:03 +03:00
|
|
|
// When ScrollbarData is stored on the layer tree, it's part of
|
2017-05-04 03:25:09 +03:00
|
|
|
// SimpleAttributes which itself uses PlainOldDataSerializer, so
|
2018-03-02 21:00:03 +03:00
|
|
|
// we don't need a ParamTraits specialization for ScrollbarData
|
|
|
|
// separately. Here, however, ScrollbarData is stored as part
|
2017-05-04 03:25:09 +03:00
|
|
|
// of WebRenderLayerScrollData whose fields are serialized
|
|
|
|
// individually, so we do.
|
|
|
|
template <>
|
2018-03-02 21:00:03 +03:00
|
|
|
struct ParamTraits<mozilla::layers::ScrollbarData>
|
|
|
|
: public PlainOldDataSerializer<mozilla::layers::ScrollbarData> {};
|
2017-05-04 03:25:09 +03:00
|
|
|
|
2017-04-20 17:38:04 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::layers::WebRenderLayerScrollData> {
|
|
|
|
typedef mozilla::layers::WebRenderLayerScrollData paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mDescendantCount);
|
|
|
|
WriteParam(aMsg, aParam.mScrollIds);
|
2018-05-01 23:31:23 +03:00
|
|
|
WriteParam(aMsg, aParam.mAncestorTransform);
|
2017-04-20 17:38:05 +03:00
|
|
|
WriteParam(aMsg, aParam.mTransform);
|
|
|
|
WriteParam(aMsg, aParam.mTransformIsPerspective);
|
2017-05-24 22:47:14 +03:00
|
|
|
WriteParam(aMsg, aParam.mVisibleRegion);
|
2019-09-12 11:08:32 +03:00
|
|
|
WriteParam(aMsg, aParam.mRemoteDocumentRect);
|
2017-04-20 17:38:05 +03:00
|
|
|
WriteParam(aMsg, aParam.mReferentId);
|
2019-03-22 21:28:42 +03:00
|
|
|
WriteParam(aMsg, aParam.mReferentRenderRoot);
|
|
|
|
WriteParam(aMsg, aParam.mBoundaryRoot);
|
2017-04-20 17:38:05 +03:00
|
|
|
WriteParam(aMsg, aParam.mEventRegionsOverride);
|
2018-03-02 21:00:03 +03:00
|
|
|
WriteParam(aMsg, aParam.mScrollbarData);
|
2017-05-23 17:50:41 +03:00
|
|
|
WriteParam(aMsg, aParam.mScrollbarAnimationId);
|
2017-04-20 17:38:05 +03:00
|
|
|
WriteParam(aMsg, aParam.mFixedPosScrollContainerId);
|
2019-03-22 21:28:42 +03:00
|
|
|
WriteParam(aMsg, aParam.mRenderRoot);
|
2018-11-10 00:13:10 +03:00
|
|
|
WriteParam(aMsg, aParam.mZoomAnimationId);
|
2019-06-12 19:51:22 +03:00
|
|
|
WriteParam(aMsg, aParam.mAsyncZoomContainerId);
|
2017-04-20 17:38:04 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mDescendantCount) &&
|
2017-04-20 17:38:05 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mScrollIds) &&
|
2018-05-01 23:31:23 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mAncestorTransform) &&
|
2017-04-20 17:38:05 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mTransform) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTransformIsPerspective) &&
|
2017-05-24 22:47:14 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mVisibleRegion) &&
|
2019-09-12 11:08:32 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mRemoteDocumentRect) &&
|
2017-04-20 17:38:05 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mReferentId) &&
|
2019-03-22 21:28:42 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mReferentRenderRoot) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mBoundaryRoot) &&
|
2017-04-20 17:38:05 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mEventRegionsOverride) &&
|
2018-03-02 21:00:03 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mScrollbarData) &&
|
2017-05-23 17:50:41 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mScrollbarAnimationId) &&
|
2018-11-10 00:13:10 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mFixedPosScrollContainerId) &&
|
2019-03-22 21:28:42 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mRenderRoot) &&
|
2019-06-12 19:51:22 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mZoomAnimationId) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mAsyncZoomContainerId);
|
2017-04-20 17:38:04 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::layers::WebRenderScrollData> {
|
|
|
|
typedef mozilla::layers::WebRenderScrollData paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mScrollMetadatas);
|
|
|
|
WriteParam(aMsg, aParam.mLayerScrollData);
|
2017-04-20 17:38:06 +03:00
|
|
|
WriteParam(aMsg, aParam.mIsFirstPaint);
|
2017-06-05 05:29:35 +03:00
|
|
|
WriteParam(aMsg, aParam.mPaintSequenceNumber);
|
2017-04-20 17:38:04 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mScrollMetadatas) &&
|
2017-04-20 17:38:06 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mLayerScrollData) &&
|
2017-06-05 05:29:35 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsFirstPaint) &&
|
2018-05-12 04:18:21 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mPaintSequenceNumber) &&
|
|
|
|
aResult->RepopulateMap();
|
2017-04-20 17:38:04 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace IPC
|
|
|
|
|
|
|
|
#endif /* GFX_WEBRENDERSCROLLDATA_H */
|