зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1236750 - Add typed getters for layer transform matrices. r=kats
--HG-- extra : source : bf19963d10d6cc021092662176845192764f9cf0
This commit is contained in:
Родитель
2a0650a2e9
Коммит
b22e5adb20
|
@ -7,6 +7,7 @@
|
|||
#define GFX_LAYERMETRICSWRAPPER_H
|
||||
|
||||
#include "Layers.h"
|
||||
#include "UnitTransforms.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
@ -299,6 +300,11 @@ public:
|
|||
return gfx::Matrix4x4();
|
||||
}
|
||||
|
||||
CSSTransformMatrix GetTransformTyped() const
|
||||
{
|
||||
return ViewAs<CSSTransformMatrix>(GetTransform());
|
||||
}
|
||||
|
||||
bool TransformIsPerspective() const
|
||||
{
|
||||
MOZ_ASSERT(IsValid());
|
||||
|
|
|
@ -895,6 +895,12 @@ Layer::GetTransform() const
|
|||
return transform;
|
||||
}
|
||||
|
||||
const CSSTransformMatrix
|
||||
Layer::GetTransformTyped() const
|
||||
{
|
||||
return ViewAs<CSSTransformMatrix>(GetTransform());
|
||||
}
|
||||
|
||||
const Matrix4x4
|
||||
Layer::GetLocalTransform()
|
||||
{
|
||||
|
@ -912,6 +918,12 @@ Layer::GetLocalTransform()
|
|||
return transform;
|
||||
}
|
||||
|
||||
const LayerToParentLayerMatrix4x4
|
||||
Layer::GetLocalTransformTyped()
|
||||
{
|
||||
return ViewAs<LayerToParentLayerMatrix4x4>(GetLocalTransform());
|
||||
}
|
||||
|
||||
bool
|
||||
Layer::HasTransformAnimation() const
|
||||
{
|
||||
|
|
|
@ -1276,6 +1276,9 @@ public:
|
|||
virtual Layer* GetFirstChild() const { return nullptr; }
|
||||
virtual Layer* GetLastChild() const { return nullptr; }
|
||||
const gfx::Matrix4x4 GetTransform() const;
|
||||
// Same as GetTransform(), but returns the transform as a strongly-typed
|
||||
// matrix. Eventually this will replace GetTransform().
|
||||
const CSSTransformMatrix GetTransformTyped() const;
|
||||
const gfx::Matrix4x4& GetBaseTransform() const { return mTransform; }
|
||||
// Note: these are virtual because ContainerLayerComposite overrides them.
|
||||
virtual float GetPostXScale() const { return mPostXScale; }
|
||||
|
@ -1346,10 +1349,17 @@ public:
|
|||
|
||||
/**
|
||||
* Returns the local transform for this layer: either mTransform or,
|
||||
* for shadow layers, GetShadowTransform()
|
||||
* for shadow layers, GetShadowTransform(), in either case with the
|
||||
* pre- and post-scales applied.
|
||||
*/
|
||||
const gfx::Matrix4x4 GetLocalTransform();
|
||||
|
||||
/**
|
||||
* Same as GetLocalTransform(), but returns a strongly-typed matrix.
|
||||
* Eventually, this will replace GetLocalTransform().
|
||||
*/
|
||||
const LayerToParentLayerMatrix4x4 GetLocalTransformTyped();
|
||||
|
||||
/**
|
||||
* Returns the local opacity for this layer: either mOpacity or,
|
||||
* for shadow layers, GetShadowOpacity()
|
||||
|
|
Загрузка…
Ссылка в новой задаче