зеркало из https://github.com/mozilla/gecko-dev.git
Bug 952977: More gfx::Matrix cleanup in TiledContentClient r=nical
This commit is contained in:
Родитель
1c4b5d248a
Коммит
fd6f91bb65
|
@ -58,12 +58,12 @@ ClientTiledThebesLayer::FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
|
|||
}
|
||||
|
||||
static LayerRect
|
||||
ApplyParentLayerToLayerTransform(const gfx3DMatrix& aTransform, const ParentLayerRect& aParentLayerRect)
|
||||
ApplyParentLayerToLayerTransform(const gfx::Matrix4x4& aTransform, const ParentLayerRect& aParentLayerRect)
|
||||
{
|
||||
return TransformTo<LayerPixel>(aTransform, aParentLayerRect);
|
||||
return TransformTo<LayerPixel>(gfx::To3DMatrix(aTransform), aParentLayerRect);
|
||||
}
|
||||
|
||||
static gfx3DMatrix
|
||||
static gfx::Matrix4x4
|
||||
GetTransformToAncestorsParentLayer(Layer* aStart, Layer* aAncestor)
|
||||
{
|
||||
gfx::Matrix4x4 transform;
|
||||
|
@ -77,7 +77,7 @@ GetTransformToAncestorsParentLayer(Layer* aStart, Layer* aAncestor)
|
|||
}
|
||||
transform = transform * iter->GetTransform();
|
||||
}
|
||||
return gfx::To3DMatrix(transform);
|
||||
return transform;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -145,8 +145,9 @@ ClientTiledThebesLayer::BeginPaint()
|
|||
|
||||
// Calculate the transform required to convert ParentLayer space of our
|
||||
// display port ancestor to the Layer space of this layer.
|
||||
gfx3DMatrix transformDisplayPortToLayer =
|
||||
GetTransformToAncestorsParentLayer(this, displayPortAncestor).Inverse();
|
||||
gfx::Matrix4x4 transformDisplayPortToLayer =
|
||||
GetTransformToAncestorsParentLayer(this, displayPortAncestor);
|
||||
transformDisplayPortToLayer.Invert();
|
||||
|
||||
// Note that below we use GetZoomToParent() in a number of places. Because this
|
||||
// code runs on the client side, the mTransformScale field of the FrameMetrics
|
||||
|
@ -171,8 +172,10 @@ ClientTiledThebesLayer::BeginPaint()
|
|||
// Store the applicable composition bounds in this layer's Layer units.
|
||||
mPaintData.mTransformToCompBounds =
|
||||
GetTransformToAncestorsParentLayer(this, scrollAncestor);
|
||||
gfx::Matrix4x4 transformToBounds = mPaintData.mTransformToCompBounds;
|
||||
transformToBounds.Invert();
|
||||
mPaintData.mCompositionBounds = ApplyParentLayerToLayerTransform(
|
||||
mPaintData.mTransformToCompBounds.Inverse(), scrollMetrics.mCompositionBounds);
|
||||
transformToBounds, scrollMetrics.mCompositionBounds);
|
||||
TILING_LOG("TILING %p: Composition bounds %s\n", this, Stringify(mPaintData.mCompositionBounds).c_str());
|
||||
|
||||
// Calculate the scroll offset since the last transaction
|
||||
|
|
|
@ -1228,7 +1228,7 @@ ClientTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& aInval
|
|||
|
||||
LayerRect transformedCompositionBounds =
|
||||
GetCompositorSideCompositionBounds(scrollAncestor,
|
||||
aPaintData->mTransformToCompBounds,
|
||||
To3DMatrix(aPaintData->mTransformToCompBounds),
|
||||
viewTransform);
|
||||
|
||||
TILING_LOG("TILING %p: Progressive update transformed compositor bounds %s\n", mThebesLayer, Stringify(transformedCompositionBounds).c_str());
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "Layers.h" // for LayerManager, etc
|
||||
#include "TiledLayerBuffer.h" // for TiledLayerBuffer
|
||||
#include "Units.h" // for CSSPoint
|
||||
#include "gfx3DMatrix.h" // for gfx3DMatrix
|
||||
#include "gfxTypes.h"
|
||||
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
|
||||
#include "mozilla/RefPtr.h" // for RefPtr
|
||||
|
@ -289,7 +288,7 @@ struct BasicTiledLayerPaintData {
|
|||
* the closest ancestor layer which scrolls, and is used to obtain
|
||||
* the composition bounds that are relevant for this layer.
|
||||
*/
|
||||
gfx3DMatrix mTransformToCompBounds;
|
||||
gfx::Matrix4x4 mTransformToCompBounds;
|
||||
|
||||
/*
|
||||
* The critical displayport of the content from the nearest ancestor layer
|
||||
|
|
Загрузка…
Ссылка в новой задаче