Bug 1146214 - Remove the unused code after refactoring. r=nical

This commit is contained in:
Ethan Lin 2015-04-10 02:20:00 +02:00
Родитель a837628695
Коммит 1142d9f968
14 изменённых файлов: 0 добавлений и 176 удалений

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

@ -185,38 +185,6 @@ protected:
static std::map<uint64_t, AsyncTransactionTrackersHolder*> sTrackersHolders;
};
/**
* FenceDeliveryTracker puts off releasing a Fence until a transaction complete.
*/
class FenceDeliveryTracker : public AsyncTransactionTracker {
public:
explicit FenceDeliveryTracker(FenceHandle& aFenceHandle)
: mFenceHandle(aFenceHandle)
{
MOZ_COUNT_CTOR(FenceDeliveryTracker);
}
protected:
~FenceDeliveryTracker()
{
MOZ_COUNT_DTOR(FenceDeliveryTracker);
}
public:
virtual void Complete() override
{
mFenceHandle = FenceHandle();
}
virtual void Cancel() override
{
mFenceHandle = FenceHandle();
}
private:
FenceHandle mFenceHandle;
};
} // namespace layers
} // namespace mozilla

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

@ -136,16 +136,6 @@ public:
mTexturesToRemove.Clear();
}
virtual void HoldTransactionsToRespond(uint64_t aTransactionId)
{
mTransactionsToRespond.push_back(aTransactionId);
}
virtual void ClearTransactionsToRespond()
{
mTransactionsToRespond.clear();
}
/**
* Tell the CompositableHost on the compositor side what texture to use for
* the next composition.
@ -156,10 +146,6 @@ public:
TextureClient* aClientOnBlack,
TextureClient* aClientOnWhite) = 0;
virtual void SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureChild* aTexture,
const FenceHandle& aFence) = 0;
virtual void SendPendingAsyncMessges() = 0;
void IdentifyTextureHost(const TextureFactoryIdentifier& aIdentifier);
@ -203,7 +189,6 @@ public:
protected:
TextureFactoryIdentifier mTextureFactoryIdentifier;
nsTArray<RefPtr<TextureClient> > mTexturesToRemove;
std::vector<uint64_t> mTransactionsToRespond;
RefPtr<SyncObject> mSyncObject;
const int32_t mSerial;
static mozilla::Atomic<int32_t> sSerialCounter;

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

@ -27,16 +27,11 @@ typedef std::vector<mozilla::layers::EditReply> EditReplyVector;
// so both manager protocols implement this and we keep a reference to them
// through this interface.
class CompositableParentManager : public ISurfaceAllocator
, public AsyncTransactionTrackersHolder
{
public:
virtual void SendFenceHandleIfPresent(PTextureParent* aTexture,
CompositableHost* aCompositableHost) = 0;
virtual void SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureParent* aTexture,
const FenceHandle& aFence) = 0;
virtual void SendAsyncMessage(const InfallibleTArray<AsyncParentMessageData>& aMessage) = 0;
void SendPendingAsyncMessges();

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

@ -147,17 +147,6 @@ ImageBridgeChild::UseOverlaySource(CompositableClient* aCompositable,
}
#endif
void
ImageBridgeChild::SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureChild* aTexture,
const FenceHandle& aFence)
{
InfallibleTArray<AsyncChildMessageData> messages;
messages.AppendElement(OpDeliverFenceFromChild(nullptr, aTexture,
aFence));
SendChildAsyncMessages(messages);
}
void
ImageBridgeChild::UpdatePictureRect(CompositableClient* aCompositable,
const nsIntRect& aRect)

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

@ -222,10 +222,6 @@ public:
const OverlaySource& aOverlay) override;
#endif
virtual void SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureChild* aTexture,
const FenceHandle& aFence) override;
virtual void RemoveTextureFromCompositable(CompositableClient* aCompositable,
TextureClient* aTexture) override;

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

@ -242,17 +242,6 @@ ImageBridgeParent::DeallocPTextureParent(PTextureParent* actor)
return TextureHost::DestroyIPDLActor(actor);
}
void
ImageBridgeParent::SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureParent* aTexture,
const FenceHandle& aFence)
{
InfallibleTArray<AsyncParentMessageData> messages;
messages.AppendElement(OpDeliverFence(aTexture, nullptr,
aFence));
mozilla::unused << SendParentAsyncMessages(messages);
}
void
ImageBridgeParent::SendAsyncMessage(const InfallibleTArray<AsyncParentMessageData>& aMessage)
{
@ -262,32 +251,6 @@ ImageBridgeParent::SendAsyncMessage(const InfallibleTArray<AsyncParentMessageDat
bool
ImageBridgeParent::RecvChildAsyncMessages(InfallibleTArray<AsyncChildMessageData>&& aMessages)
{
for (AsyncChildMessageArray::index_type i = 0; i < aMessages.Length(); ++i) {
const AsyncChildMessageData& message = aMessages[i];
switch (message.type()) {
case AsyncChildMessageData::TOpDeliverFenceFromChild: {
const OpDeliverFenceFromChild& op = message.get_OpDeliverFenceFromChild();
#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 17
FenceHandle fence = FenceHandle(op.fence());
PTextureParent* parent = op.textureParent();
TextureHostOGL* hostOGL = nullptr;
RefPtr<TextureHost> texture = TextureHost::AsTextureHost(parent);
if (texture) {
hostOGL = texture->AsHostOGL();
}
if (hostOGL) {
hostOGL->SetAcquireFence(fence.mFence);
}
#endif
break;
}
default:
NS_ERROR("unknown AsyncChildMessageData type");
return false;
}
}
return true;
}

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

@ -59,10 +59,6 @@ public:
virtual void SendFenceHandleIfPresent(PTextureParent* aTexture,
CompositableHost* aCompositableHost) override;
virtual void SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureParent* aTexture,
const FenceHandle& aFence) override;
virtual void SendAsyncMessage(const InfallibleTArray<AsyncParentMessageData>& aMessage) override;
virtual base::ProcessId GetChildProcessId() override

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

@ -107,17 +107,6 @@ LayerTransactionChild::RecvParentAsyncMessages(InfallibleTArray<AsyncParentMessa
return true;
}
void
LayerTransactionChild::SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureChild* aTexture,
const FenceHandle& aFence)
{
InfallibleTArray<AsyncChildMessageData> messages;
messages.AppendElement(OpDeliverFenceFromChild(nullptr, aTexture,
aFence));
SendChildAsyncMessages(messages);
}
void
LayerTransactionChild::ActorDestroy(ActorDestroyReason why)
{

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

@ -47,10 +47,6 @@ public:
mForwarder = aForwarder;
}
virtual void SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureChild* aTexture,
const FenceHandle& aFence);
uint64_t GetId() const { return mId; }
protected:

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

@ -914,23 +914,6 @@ LayerTransactionParent::RecvChildAsyncMessages(InfallibleTArray<AsyncChildMessag
const AsyncChildMessageData& message = aMessages[i];
switch (message.type()) {
case AsyncChildMessageData::TOpDeliverFenceFromChild: {
const OpDeliverFenceFromChild& op = message.get_OpDeliverFenceFromChild();
#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 17
FenceHandle fence = FenceHandle(op.fence());
PTextureParent* parent = op.textureParent();
TextureHostOGL* hostOGL = nullptr;
RefPtr<TextureHost> texture = TextureHost::AsTextureHost(parent);
if (texture) {
hostOGL = texture->AsHostOGL();
}
if (hostOGL) {
hostOGL->SetAcquireFence(fence.mFence);
}
#endif
break;
}
case AsyncChildMessageData::TOpRemoveTextureAsync: {
const OpRemoveTextureAsync& op = message.get_OpRemoveTextureAsync();
CompositableHost* compositable = CompositableHost::FromIPDLActor(op.compositableParent());
@ -969,7 +952,6 @@ LayerTransactionParent::RecvChildAsyncMessages(InfallibleTArray<AsyncChildMessag
void
LayerTransactionParent::ActorDestroy(ActorDestroyReason why)
{
DestroyAsyncTransactionTrackersHolder();
}
bool LayerTransactionParent::IsSameProcess() const
@ -1003,17 +985,6 @@ LayerTransactionParent::SendFenceHandleIfPresent(PTextureParent* aTexture,
}
}
void
LayerTransactionParent::SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureParent* aTexture,
const FenceHandle& aFence)
{
InfallibleTArray<AsyncParentMessageData> messages;
messages.AppendElement(OpDeliverFence(aTexture, nullptr,
aFence));
mozilla::unused << SendParentAsyncMessages(messages);
}
void
LayerTransactionParent::SendAsyncMessage(const InfallibleTArray<AsyncParentMessageData>& aMessage)
{

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

@ -89,10 +89,6 @@ public:
virtual void SendFenceHandleIfPresent(PTextureParent* aTexture,
CompositableHost* aCompositableHost) override;
virtual void SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureParent* aTexture,
const FenceHandle& aFence) override;
virtual void SendAsyncMessage(const InfallibleTArray<AsyncParentMessageData>& aMessage) override;
virtual base::ProcessId GetChildProcessId() override

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

@ -408,11 +408,6 @@ struct OpDeliverFenceToTracker {
FenceHandle fence;
};
struct OpDeliverFenceFromChild {
PTexture texture;
FenceHandle fence;
};
union CompositableOperation {
OpUpdatePictureRect;
@ -482,7 +477,6 @@ union AsyncParentMessageData {
};
union AsyncChildMessageData {
OpDeliverFenceFromChild;
OpRemoveTextureAsync;
};

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

@ -410,17 +410,6 @@ ShadowLayerForwarder::UseOverlaySource(CompositableClient* aCompositable,
}
#endif
void
ShadowLayerForwarder::SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureChild* aTexture,
const FenceHandle& aFence)
{
if (!HasShadowManager() || !mShadowManager->IPCOpen()) {
return;
}
mShadowManager->SendFenceHandle(aTracker, aTexture, aFence);
}
void
ShadowLayerForwarder::RemoveTextureFromCompositable(CompositableClient* aCompositable,
TextureClient* aTexture)

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

@ -272,9 +272,6 @@ public:
virtual void UseOverlaySource(CompositableClient* aCompositable,
const OverlaySource& aOverlay) override;
#endif
virtual void SendFenceHandle(AsyncTransactionTracker* aTracker,
PTextureChild* aTexture,
const FenceHandle& aFence) override;
/**
* End the current transaction and forward it to LayerManagerComposite.