зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1169200 - Send OpRemoveTextureAsync before actor destroyed r=nical
This commit is contained in:
Родитель
937d225c46
Коммит
ab0826ea13
|
@ -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(),
|
||||
|
|
Загрузка…
Ссылка в новой задаче