Bug 1169200 - Send OpRemoveTextureAsync before actor destroyed r=nical

This commit is contained in:
Sotaro Ikeda 2015-06-02 07:31:05 -07:00
Родитель 937d225c46
Коммит ab0826ea13
4 изменённых файлов: 8 добавлений и 1 удалений

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

@ -128,6 +128,7 @@ CompositableClient::CompositableClient(CompositableForwarder* aForwarder,
: mCompositableChild(nullptr)
, mForwarder(aForwarder)
, mTextureFlags(aTextureFlags)
, mDestroyed(false)
{
MOZ_COUNT_CTOR(CompositableClient);
}
@ -169,6 +170,8 @@ CompositableClient::Connect()
void
CompositableClient::Destroy()
{
mDestroyed = true;
if (!mCompositableChild) {
return;
}

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

@ -149,6 +149,8 @@ public:
void Destroy();
bool IsDestroyed() { return mDestroyed; }
PCompositableChild* GetIPDLActor() const;
// should only be called by a CompositableForwarder
@ -232,6 +234,7 @@ protected:
// Some layers may want to enforce some flags to all their textures
// (like disallowing tiling)
TextureFlags mTextureFlags;
bool mDestroyed;
RefPtr<TextureClientRecycleAllocator> mTextureClientRecycler;
friend class CompositableChild;

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

@ -540,6 +540,7 @@ protected:
{
MOZ_COUNT_DTOR(TiledContentClient);
mDestroyed = true;
mTiledBuffer.Release();
mLowPrecisionTiledBuffer.Release();
}

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

@ -428,7 +428,7 @@ ShadowLayerForwarder::RemoveTextureFromCompositableAsync(AsyncTransactionTracker
CompositableClient* aCompositable,
TextureClient* aTexture)
{
if (mTxn->Opened()) {
if (mTxn->Opened() && !aCompositable->IsDestroyed()) {
mTxn->AddEdit(OpRemoveTextureAsync(CompositableClient::GetTrackersHolderId(aCompositable->GetIPDLActor()),
aAsyncTransactionTracker->GetId(),
nullptr, aCompositable->GetIPDLActor(),