зеркало из 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)
|
: mCompositableChild(nullptr)
|
||||||
, mForwarder(aForwarder)
|
, mForwarder(aForwarder)
|
||||||
, mTextureFlags(aTextureFlags)
|
, mTextureFlags(aTextureFlags)
|
||||||
|
, mDestroyed(false)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(CompositableClient);
|
MOZ_COUNT_CTOR(CompositableClient);
|
||||||
}
|
}
|
||||||
|
@ -169,6 +170,8 @@ CompositableClient::Connect()
|
||||||
void
|
void
|
||||||
CompositableClient::Destroy()
|
CompositableClient::Destroy()
|
||||||
{
|
{
|
||||||
|
mDestroyed = true;
|
||||||
|
|
||||||
if (!mCompositableChild) {
|
if (!mCompositableChild) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,6 +149,8 @@ public:
|
||||||
|
|
||||||
void Destroy();
|
void Destroy();
|
||||||
|
|
||||||
|
bool IsDestroyed() { return mDestroyed; }
|
||||||
|
|
||||||
PCompositableChild* GetIPDLActor() const;
|
PCompositableChild* GetIPDLActor() const;
|
||||||
|
|
||||||
// should only be called by a CompositableForwarder
|
// should only be called by a CompositableForwarder
|
||||||
|
@ -232,6 +234,7 @@ protected:
|
||||||
// Some layers may want to enforce some flags to all their textures
|
// Some layers may want to enforce some flags to all their textures
|
||||||
// (like disallowing tiling)
|
// (like disallowing tiling)
|
||||||
TextureFlags mTextureFlags;
|
TextureFlags mTextureFlags;
|
||||||
|
bool mDestroyed;
|
||||||
RefPtr<TextureClientRecycleAllocator> mTextureClientRecycler;
|
RefPtr<TextureClientRecycleAllocator> mTextureClientRecycler;
|
||||||
|
|
||||||
friend class CompositableChild;
|
friend class CompositableChild;
|
||||||
|
|
|
@ -540,6 +540,7 @@ protected:
|
||||||
{
|
{
|
||||||
MOZ_COUNT_DTOR(TiledContentClient);
|
MOZ_COUNT_DTOR(TiledContentClient);
|
||||||
|
|
||||||
|
mDestroyed = true;
|
||||||
mTiledBuffer.Release();
|
mTiledBuffer.Release();
|
||||||
mLowPrecisionTiledBuffer.Release();
|
mLowPrecisionTiledBuffer.Release();
|
||||||
}
|
}
|
||||||
|
|
|
@ -428,7 +428,7 @@ ShadowLayerForwarder::RemoveTextureFromCompositableAsync(AsyncTransactionTracker
|
||||||
CompositableClient* aCompositable,
|
CompositableClient* aCompositable,
|
||||||
TextureClient* aTexture)
|
TextureClient* aTexture)
|
||||||
{
|
{
|
||||||
if (mTxn->Opened()) {
|
if (mTxn->Opened() && !aCompositable->IsDestroyed()) {
|
||||||
mTxn->AddEdit(OpRemoveTextureAsync(CompositableClient::GetTrackersHolderId(aCompositable->GetIPDLActor()),
|
mTxn->AddEdit(OpRemoveTextureAsync(CompositableClient::GetTrackersHolderId(aCompositable->GetIPDLActor()),
|
||||||
aAsyncTransactionTracker->GetId(),
|
aAsyncTransactionTracker->GetId(),
|
||||||
nullptr, aCompositable->GetIPDLActor(),
|
nullptr, aCompositable->GetIPDLActor(),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче