summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/src/APZCTreeManager.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
commitda4c7e7ed675c3bf405668739c3012d140856109 (patch)
treecdd868dba063fecba609a1d819de271f0d51b23e /gfx/layers/apz/src/APZCTreeManager.h
parentAdding upstream version 125.0.3. (diff)
downloadfirefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz
firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/src/APZCTreeManager.h')
-rw-r--r--gfx/layers/apz/src/APZCTreeManager.h80
1 files changed, 35 insertions, 45 deletions
diff --git a/gfx/layers/apz/src/APZCTreeManager.h b/gfx/layers/apz/src/APZCTreeManager.h
index 71d35fd5a6..939e7572a4 100644
--- a/gfx/layers/apz/src/APZCTreeManager.h
+++ b/gfx/layers/apz/src/APZCTreeManager.h
@@ -199,12 +199,10 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
LayersId aOriginatingLayersId, uint32_t aPaintSequenceNumber);
/**
- * Called when webrender is enabled, from the sampler thread. This function
- * populates the provided transaction with any async scroll offsets needed.
- * It also advances APZ animations to the specified sample time, and requests
- * another composite if there are still active animations.
- * In effect it is the webrender equivalent of (part of) the code in
- * AsyncCompositionManager.
+ * Called from the sampler thread. This function populates the provided
+ * transaction with any async scroll offsets needed. It also advances APZ
+ * animations to the specified sample time, and requests another composite if
+ * there are still active animations.
*/
void SampleForWebRender(const Maybe<VsyncId>& aVsyncId,
wr::TransactionWrapper& aTxn,
@@ -509,7 +507,7 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
void AssertOnUpdaterThread();
// Returns a pointer to the WebRenderAPI this APZCTreeManager is for.
- // This might be null (for example, if WebRender is not enabled).
+ // This might be null (for example, during GTests).
already_AddRefed<wr::WebRenderAPI> GetWebRenderAPI() const;
protected:
@@ -679,12 +677,8 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
struct FixedPositionInfo;
struct StickyPositionInfo;
- // Returns true if |aNode| is a fixed layer that is fixed to the root content
- // APZC.
- // The map lock is required within these functions; if the map lock is already
- // being held by the caller, the second overload should be used. If the map
- // lock is not being held at the call site, the first overload should be used.
- bool IsFixedToRootContent(const HitTestingTreeNode* aNode) const;
+ // Returns true if |aFixedInfo| represents a layer that is fixed to the root
+ // content APZC.
bool IsFixedToRootContent(const FixedPositionInfo& aFixedInfo,
const MutexAutoLock& aProofOfMapLock) const;
@@ -919,15 +913,14 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
}
};
/**
- * If this APZCTreeManager is being used with WebRender, this vector gets
- * populated during a layers update. It holds a package of information needed
- * to compute and set the async transforms on scroll thumbs. This information
- * is extracted from the HitTestingTreeNodes for the WebRender case because
- * accessing the HitTestingTreeNodes requires holding the tree lock which
- * we cannot do on the WR sampler thread. mScrollThumbInfo, however, can
+ * This vector gets populated during a layers update. It holds a package of
+ * information needed to compute and set the async transforms on scroll
+ * thumbs. This information is extracted from the HitTestingTreeNodes because
+ * accessing the HitTestingTreeNodes requires holding the tree lock which we
+ * cannot do on the WebRender sampler thread. mScrollThumbInfo, however, can
* be accessed while just holding the mMapLock which is safe to do on the
- * sampler thread.
- * mMapLock must be acquired while accessing or modifying mScrollThumbInfo.
+ * sampler thread. mMapLock must be acquired while accessing or modifying
+ * mScrollThumbInfo.
*/
std::vector<ScrollThumbInfo> mScrollThumbInfo;
@@ -945,12 +938,11 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
mScrollDirection(aScrollDirection) {}
};
/**
- * If this APZCTreeManager is being used with WebRender, this vector gets
- * populated during a layers update. It holds a package of information needed
- * to compute and set the async transforms on root scrollbars. This
- * information is extracted from the HitTestingTreeNodes for the WebRender
- * case because accessing the HitTestingTreeNodes requires holding the tree
- * lock which we cannot do on the WR sampler thread. mRootScrollbarInfo,
+ * This vector gets populated during a layers update. It holds a package of
+ * information needed to compute and set the async transforms on root
+ * scrollbars. This information is extracted from the HitTestingTreeNodes
+ * because accessing the HitTestingTreeNodes requires holding the tree lock
+ * which we cannot do on the WebRender sampler thread. mRootScrollbarInfo,
* however, can be accessed while just holding the mMapLock which is safe to
* do on the sampler thread.
* mMapLock must be acquired while accessing or modifying mRootScrollbarInfo.
@@ -970,15 +962,14 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
explicit FixedPositionInfo(const HitTestingTreeNode* aNode);
};
/**
- * If this APZCTreeManager is being used with WebRender, this vector gets
- * populated during a layers update. It holds a package of information needed
- * to compute and set the async transforms on fixed position content. This
- * information is extracted from the HitTestingTreeNodes for the WebRender
- * case because accessing the HitTestingTreeNodes requires holding the tree
- * lock which we cannot do on the WR sampler thread. mFixedPositionInfo,
- * however, can be accessed while just holding the mMapLock which is safe to
- * do on the sampler thread. mMapLock must be acquired while accessing or
- * modifying mFixedPositionInfo.
+ * This vector gets populated during a layers update. It holds a package of
+ * information needed to compute and set the async transforms on fixed
+ * position content. This information is extracted from the
+ * HitTestingTreeNodes because accessing the HitTestingTreeNodes requires
+ * holding the tree lock which we cannot do on the WebRender sampler thread.
+ * mFixedPositionInfo, however, can be accessed while just holding the
+ * mMapLock which is safe to do on the sampler thread. mMapLock must be
+ * acquired while accessing or modifying mFixedPositionInfo.
*/
std::vector<FixedPositionInfo> mFixedPositionInfo;
@@ -997,15 +988,14 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
explicit StickyPositionInfo(const HitTestingTreeNode* aNode);
};
/**
- * If this APZCTreeManager is being used with WebRender, this vector gets
- * populated during a layers update. It holds a package of information needed
- * to compute and set the async transforms on sticky position content. This
- * information is extracted from the HitTestingTreeNodes for the WebRender
- * case because accessing the HitTestingTreeNodes requires holding the tree
- * lock which we cannot do on the WR sampler thread. mStickyPositionInfo,
- * however, can be accessed while just holding the mMapLock which is safe to
- * do on the sampler thread. mMapLock must be acquired while accessing or
- * modifying mStickyPositionInfo.
+ * This vector gets populated during a layers update. It holds a package of
+ * information needed to compute and set the async transforms on sticky
+ * position content. This information is extracted from the
+ * HitTestingTreeNodes because accessing the HitTestingTreeNodes requires
+ * holding the tree lock which we cannot do on the WebRender sampler thread.
+ * mStickyPositionInfo, however, can be accessed while just holding the
+ * mMapLock which is safe to do on the sampler thread. mMapLock must be
+ * acquired while accessing or modifying mStickyPositionInfo.
*/
std::vector<StickyPositionInfo> mStickyPositionInfo;