b=979489; Implement SimpleTiledContentClient and friends; r=jrmuizel
This commit is contained in:
@@ -52,6 +52,12 @@
|
||||
# include "gfxSharedImageSurface.h"
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define RECYCLE_LOG(...) printf_stderr(__VA_ARGS__)
|
||||
#else
|
||||
#define RECYCLE_LOG(...) do { } while (0)
|
||||
#endif
|
||||
|
||||
using namespace mozilla::gl;
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
@@ -90,6 +96,20 @@ public:
|
||||
|
||||
bool Recv__delete__() MOZ_OVERRIDE;
|
||||
|
||||
bool RecvCompositorRecycle()
|
||||
{
|
||||
RECYCLE_LOG("Receive recycle %p (%p)\n", mTextureClient, mWaitForRecycle.get());
|
||||
mWaitForRecycle = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
void WaitForCompositorRecycle()
|
||||
{
|
||||
mWaitForRecycle = mTextureClient;
|
||||
RECYCLE_LOG("Wait for recycle %p\n", mWaitForRecycle.get());
|
||||
SendClientRecycle();
|
||||
}
|
||||
|
||||
/**
|
||||
* Only used during the deallocation phase iff we need synchronization between
|
||||
* the client and host side for deallocation (that is, when the data is going
|
||||
@@ -128,6 +148,7 @@ private:
|
||||
}
|
||||
|
||||
RefPtr<CompositableForwarder> mForwarder;
|
||||
RefPtr<TextureClient> mWaitForRecycle;
|
||||
TextureClientData* mTextureData;
|
||||
TextureClient* mTextureClient;
|
||||
bool mIPCOpen;
|
||||
@@ -138,6 +159,7 @@ private:
|
||||
void
|
||||
TextureChild::DeleteTextureData()
|
||||
{
|
||||
mWaitForRecycle = nullptr;
|
||||
if (mTextureData) {
|
||||
mTextureData->DeallocateSharedData(GetAllocator());
|
||||
delete mTextureData;
|
||||
@@ -158,6 +180,7 @@ TextureChild::ActorDestroy(ActorDestroyReason why)
|
||||
if (mTextureClient) {
|
||||
mTextureClient->mActor = nullptr;
|
||||
}
|
||||
mWaitForRecycle = nullptr;
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -181,7 +204,13 @@ TextureClient::DestroyIPDLActor(PTextureChild* actor)
|
||||
TextureClient*
|
||||
TextureClient::AsTextureClient(PTextureChild* actor)
|
||||
{
|
||||
return actor? static_cast<TextureChild*>(actor)->mTextureClient : nullptr;
|
||||
return actor ? static_cast<TextureChild*>(actor)->mTextureClient : nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
TextureClient::WaitForCompositorRecycle()
|
||||
{
|
||||
mActor->WaitForCompositorRecycle();
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user