mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1052063 - Small changes to clarify the existing ancestor transform build-up. r=botond
This commit is contained in:
parent
953ef9eefe
commit
1a2d62570d
@ -189,7 +189,7 @@ ComputeTouchSensitiveRegion(GeckoContentController* aController,
|
|||||||
AsyncPanZoomController*
|
AsyncPanZoomController*
|
||||||
APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
||||||
Layer* aLayer, uint64_t aLayersId,
|
Layer* aLayer, uint64_t aLayersId,
|
||||||
Matrix4x4 aTransform,
|
const Matrix4x4& aAncestorTransform,
|
||||||
AsyncPanZoomController* aParent,
|
AsyncPanZoomController* aParent,
|
||||||
AsyncPanZoomController* aNextSibling,
|
AsyncPanZoomController* aNextSibling,
|
||||||
bool aIsFirstPaint,
|
bool aIsFirstPaint,
|
||||||
@ -283,7 +283,7 @@ APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
|||||||
apzc->SetScrollHandoffParentId(aLayer->GetScrollHandoffParentId());
|
apzc->SetScrollHandoffParentId(aLayer->GetScrollHandoffParentId());
|
||||||
|
|
||||||
nsIntRegion unobscured = ComputeTouchSensitiveRegion(state->mController, metrics, aObscured);
|
nsIntRegion unobscured = ComputeTouchSensitiveRegion(state->mController, metrics, aObscured);
|
||||||
apzc->SetLayerHitTestData(unobscured, aTransform, transform);
|
apzc->SetLayerHitTestData(unobscured, aAncestorTransform, transform);
|
||||||
APZCTM_LOG("Setting region %s as visible region for APZC %p\n",
|
APZCTM_LOG("Setting region %s as visible region for APZC %p\n",
|
||||||
Stringify(unobscured).c_str(), apzc);
|
Stringify(unobscured).c_str(), apzc);
|
||||||
|
|
||||||
@ -366,11 +366,14 @@ APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
|||||||
|
|
||||||
// Accumulate the CSS transform between layers that have an APZC, but exclude any
|
// Accumulate the CSS transform between layers that have an APZC, but exclude any
|
||||||
// any layers that do have an APZC, and reset the accumulation at those layers.
|
// any layers that do have an APZC, and reset the accumulation at those layers.
|
||||||
if (apzc) {
|
// In the terminology of the big comment above APZCTreeManager::GetInputTransforms, if
|
||||||
aTransform = Matrix4x4();
|
// we are at layer M, then aAncestorTransform is NC * OC, and we left-multiply MC and
|
||||||
} else {
|
// compute ancestorTransform to be MC * NC * OC. This gets passed down as the ancestor
|
||||||
// Multiply child layer transforms on the left so they get applied first
|
// transform to layer L when we recurse into the children below. If we are at a layer
|
||||||
aTransform = transform * aTransform;
|
// with an APZC, such as P, then we leave the ancestorTransform empty to "reset" it.
|
||||||
|
Matrix4x4 ancestorTransform;
|
||||||
|
if (!apzc) {
|
||||||
|
ancestorTransform = transform * aAncestorTransform;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t childLayersId = (aLayer->AsRefLayer() ? aLayer->AsRefLayer()->GetReferentId() : aLayersId);
|
uint64_t childLayersId = (aLayer->AsRefLayer() ? aLayer->AsRefLayer()->GetReferentId() : aLayersId);
|
||||||
@ -397,7 +400,7 @@ APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
|||||||
AsyncPanZoomController* next = apzc ? nullptr : aNextSibling;
|
AsyncPanZoomController* next = apzc ? nullptr : aNextSibling;
|
||||||
for (Layer* child = aLayer->GetLastChild(); child; child = child->GetPrevSibling()) {
|
for (Layer* child = aLayer->GetLastChild(); child; child = child->GetPrevSibling()) {
|
||||||
gfx::TreeAutoIndent indent(mApzcTreeLog);
|
gfx::TreeAutoIndent indent(mApzcTreeLog);
|
||||||
next = UpdatePanZoomControllerTree(aCompositor, child, childLayersId, aTransform, aParent, next,
|
next = UpdatePanZoomControllerTree(aCompositor, child, childLayersId, ancestorTransform, aParent, next,
|
||||||
aIsFirstPaint, aOriginatingLayersId,
|
aIsFirstPaint, aOriginatingLayersId,
|
||||||
aPaintLogger, aApzcsToDestroy, aApzcMap, obscured);
|
aPaintLogger, aApzcsToDestroy, aApzcMap, obscured);
|
||||||
|
|
||||||
|
@ -370,7 +370,7 @@ private:
|
|||||||
*/
|
*/
|
||||||
AsyncPanZoomController* UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
AsyncPanZoomController* UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
||||||
Layer* aLayer, uint64_t aLayersId,
|
Layer* aLayer, uint64_t aLayersId,
|
||||||
gfx::Matrix4x4 aTransform,
|
const gfx::Matrix4x4& aAncestorTransform,
|
||||||
AsyncPanZoomController* aParent,
|
AsyncPanZoomController* aParent,
|
||||||
AsyncPanZoomController* aNextSibling,
|
AsyncPanZoomController* aNextSibling,
|
||||||
bool aIsFirstPaint,
|
bool aIsFirstPaint,
|
||||||
|
Loading…
Reference in New Issue
Block a user