Bug 1479234 - Drop GetAnimationOpacity and GetAnimationTransform ipc calls. r=boris,froydnj

They are no longer used.

MozReview-Commit-ID: 1SaIkj4ryUF

--HG--
extra : rebase_source : 0666e3f297e9c12f8a024e96944d99c2c301820c
This commit is contained in:
Hiroyuki Ikezoe 2018-07-31 06:13:15 +09:00
Родитель 94f5f622eb
Коммит 221a08d59e
9 изменённых файлов: 0 добавлений и 191 удалений

Просмотреть файл

@ -45,46 +45,6 @@ CompositorAnimationStorage::GetAnimatedValue(const uint64_t& aId) const
return mAnimatedValues.Get(aId);
}
Maybe<float>
CompositorAnimationStorage::GetAnimationOpacity(const uint64_t& aId) const
{
auto value = GetAnimatedValue(aId);
if (!value || value->mType != AnimatedValue::OPACITY) {
return Nothing();
}
return Some(value->mOpacity);
}
Maybe<gfx::Matrix4x4>
CompositorAnimationStorage::GetAnimationTransform(const uint64_t& aId) const
{
auto value = GetAnimatedValue(aId);
if (!value || value->mType != AnimatedValue::TRANSFORM) {
return Nothing();
}
gfx::Matrix4x4 transform = value->mTransform.mFrameTransform;
const TransformData& data = value->mTransform.mData;
float scale = data.appUnitsPerDevPixel();
gfx::Point3D transformOrigin = data.transformOrigin();
// Undo the rebasing applied by
// nsDisplayTransform::GetResultingTransformMatrixInternal
transform.ChangeBasis(-transformOrigin);
// Convert to CSS pixels (this undoes the operations performed by
// nsStyleTransformMatrix::ProcessTranslatePart which is called from
// nsDisplayTransform::GetResultingTransformMatrix)
double devPerCss =
double(scale) / double(nsDeviceContext::AppUnitsPerCSSPixel());
transform._41 *= devPerCss;
transform._42 *= devPerCss;
transform._43 *= devPerCss;
return Some(transform);
}
OMTAValue
CompositorAnimationStorage::GetOMTAValue(const uint64_t& aId) const
{

Просмотреть файл

@ -132,20 +132,6 @@ public:
*/
AnimatedValue* GetAnimatedValue(const uint64_t& aId) const;
/**
* Like GetAnimatedValue(), but ensures the value is an opacity and returns
* the float value if possible, or Nothing() otherwise.
*/
Maybe<float> GetAnimationOpacity(const uint64_t& aId) const;
/**
* Like GetAnimatedValue(), but ensures the value is a transform and returns
* the transform matrix if possible, or Nothing() otherwise. It also does
* some post-processing on the transform matrix as well. See the comments
* inside the function for details.
*/
Maybe<gfx::Matrix4x4> GetAnimationTransform(const uint64_t& aId) const;
OMTAValue GetOMTAValue(const uint64_t& aId) const;
/**

Просмотреть файл

@ -680,59 +680,6 @@ LayerTransactionParent::RecvLeaveTestMode()
return IPC_OK();
}
mozilla::ipc::IPCResult
LayerTransactionParent::RecvGetAnimationOpacity(const uint64_t& aCompositorAnimationsId,
float* aOpacity,
bool* aHasAnimationOpacity)
{
*aHasAnimationOpacity = false;
if (mDestroyed || !mLayerManager || mLayerManager->IsDestroyed()) {
return IPC_FAIL_NO_REASON(this);
}
mCompositorBridge->ApplyAsyncProperties(
this, CompositorBridgeParentBase::TransformsToSkip::APZ);
if (!mAnimStorage) {
return IPC_FAIL_NO_REASON(this);
}
Maybe<float> opacity = mAnimStorage->GetAnimationOpacity(aCompositorAnimationsId);
if (opacity) {
*aOpacity = *opacity;
*aHasAnimationOpacity = true;
}
return IPC_OK();
}
mozilla::ipc::IPCResult
LayerTransactionParent::RecvGetAnimationTransform(const uint64_t& aCompositorAnimationsId,
MaybeTransform* aTransform)
{
if (mDestroyed || !mLayerManager || mLayerManager->IsDestroyed()) {
return IPC_FAIL_NO_REASON(this);
}
// Make sure we apply the latest animation style or else we can end up with
// a race between when we temporarily clear the animation transform (in
// CompositorBridgeParent::SetShadowProperties) and when animation recalculates
// the value.
mCompositorBridge->ApplyAsyncProperties(
this, CompositorBridgeParentBase::TransformsToSkip::APZ);
if (!mAnimStorage) {
return IPC_FAIL_NO_REASON(this);
}
Maybe<Matrix4x4> transform = mAnimStorage->GetAnimationTransform(aCompositorAnimationsId);
if (transform) {
*aTransform = *transform;
} else {
*aTransform = mozilla::void_t();
}
return IPC_OK();
}
mozilla::ipc::IPCResult
LayerTransactionParent::RecvGetAnimationValue(const uint64_t& aCompositorAnimationsId,
OMTAValue* aValue)

Просмотреть файл

@ -125,11 +125,6 @@ protected:
mozilla::ipc::IPCResult RecvScheduleComposite() override;
mozilla::ipc::IPCResult RecvSetTestSampleTime(const TimeStamp& aTime) override;
mozilla::ipc::IPCResult RecvLeaveTestMode() override;
mozilla::ipc::IPCResult RecvGetAnimationOpacity(const uint64_t& aCompositorAnimationsId,
float* aOpacity,
bool* aHasAnimationOpacity) override;
mozilla::ipc::IPCResult RecvGetAnimationTransform(const uint64_t& aCompositorAnimationsId,
MaybeTransform* aTransform) override;
mozilla::ipc::IPCResult RecvGetAnimationValue(const uint64_t& aCompositorAnimationsId,
OMTAValue* aValue) override;
mozilla::ipc::IPCResult RecvGetTransform(const LayerHandle& aHandle,

Просмотреть файл

@ -80,19 +80,6 @@ parent:
// Returns |OMTAValue| applied to the layer.
sync GetAnimationValue(uint64_t aCompositorAnimationId) returns (OMTAValue value);
// Returns the value of the opacity applied to the layer by animation.
// |hasAnimationOpacity| is true if the layer has an opacity value
// specified by animation. If it's false, |opacity| value is indefinite.
sync GetAnimationOpacity(uint64_t aCompositorAnimationsId) returns (float opacity,
bool hasAnimationOpacity);
// Returns the value of the transform applied to the layer by animation after
// factoring out translation components introduced to account for the offset
// of the corresponding frame and transform origin and after converting to CSS
// pixels. If the layer is not transformed by animation, the return value will
// be void_t.
sync GetAnimationTransform(uint64_t aCompositorAnimationId) returns (MaybeTransform transform);
// Returns the value of the transform applied to the layer by animation and
// APZC.
sync GetTransform(LayerHandle layer) returns (MaybeTransform transform);

Просмотреть файл

@ -71,9 +71,6 @@ parent:
sync SetTestSampleTime(TimeStamp sampleTime);
sync LeaveTestMode();
sync GetAnimationValue(uint64_t aCompositorAnimationsId) returns (OMTAValue value);
sync GetAnimationOpacity(uint64_t aCompositorAnimationsId) returns (float opacity,
bool hasAnimationOpacity);
sync GetAnimationTransform(uint64_t aCompositorAnimationId) returns (MaybeTransform transform);
sync SetAsyncScrollOffset(ViewID scrollId, float x, float y);
sync SetAsyncZoom(ViewID scrollId, float zoom);
async FlushApzRepaints();

Просмотреть файл

@ -1379,56 +1379,6 @@ WebRenderBridgeParent::RecvGetAnimationValue(const uint64_t& aCompositorAnimatio
return IPC_OK();
}
mozilla::ipc::IPCResult
WebRenderBridgeParent::RecvGetAnimationOpacity(const uint64_t& aCompositorAnimationsId,
float* aOpacity,
bool* aHasAnimationOpacity)
{
if (mDestroyed) {
return IPC_FAIL_NO_REASON(this);
}
MOZ_ASSERT(mAnimStorage);
if (RefPtr<WebRenderBridgeParent> root = GetRootWebRenderBridgeParent()) {
root->AdvanceAnimations();
} else {
AdvanceAnimations();
}
Maybe<float> opacity = mAnimStorage->GetAnimationOpacity(aCompositorAnimationsId);
if (opacity) {
*aOpacity = *opacity;
*aHasAnimationOpacity = true;
} else {
*aHasAnimationOpacity = false;
}
return IPC_OK();
}
mozilla::ipc::IPCResult
WebRenderBridgeParent::RecvGetAnimationTransform(const uint64_t& aCompositorAnimationsId,
MaybeTransform* aTransform)
{
if (mDestroyed) {
return IPC_FAIL_NO_REASON(this);
}
MOZ_ASSERT(mAnimStorage);
if (RefPtr<WebRenderBridgeParent> root = GetRootWebRenderBridgeParent()) {
root->AdvanceAnimations();
} else {
AdvanceAnimations();
}
Maybe<Matrix4x4> transform = mAnimStorage->GetAnimationTransform(aCompositorAnimationsId);
if (transform) {
*aTransform = *transform;
} else {
*aTransform = mozilla::void_t();
}
return IPC_OK();
}
mozilla::ipc::IPCResult
WebRenderBridgeParent::RecvSetAsyncScrollOffset(const FrameMetrics::ViewID& aScrollId,
const float& aX,

Просмотреть файл

@ -120,11 +120,6 @@ public:
mozilla::ipc::IPCResult RecvLeaveTestMode() override;
mozilla::ipc::IPCResult RecvGetAnimationValue(const uint64_t& aCompositorAnimationsId,
OMTAValue* aValue) override;
mozilla::ipc::IPCResult RecvGetAnimationOpacity(const uint64_t& aCompositorAnimationsId,
float* aOpacity,
bool* aHasAnimationOpacity) override;
mozilla::ipc::IPCResult RecvGetAnimationTransform(const uint64_t& aCompositorAnimationsId,
MaybeTransform* aTransform) override;
mozilla::ipc::IPCResult RecvSetAsyncScrollOffset(const FrameMetrics::ViewID& aScrollId,
const float& aX,
const float& aY) override;

Просмотреть файл

@ -995,10 +995,6 @@ description =
description =
[PLayerTransaction::LeaveTestMode]
description =
[PLayerTransaction::GetAnimationOpacity]
description =
[PLayerTransaction::GetAnimationTransform]
description =
[PLayerTransaction::GetAnimationValue]
description = test only
[PLayerTransaction::GetTransform]
@ -1029,10 +1025,6 @@ description = test only
description = test only
[PWebRenderBridge::GetAnimationValue]
description = test only
[PWebRenderBridge::GetAnimationOpacity]
description = test only
[PWebRenderBridge::GetAnimationTransform]
description = test only
[PWebRenderBridge::SetAsyncScrollOffset]
description = test only
[PWebRenderBridge::SetAsyncZoom]