Bug 1020003 - Always use AsyncTransactionTracker on ImageBridge on gonk r=nical

This commit is contained in:
Sotaro Ikeda 2014-06-05 08:39:45 -07:00
parent 36080db022
commit 3da19ec742

View File

@ -81,17 +81,15 @@ ImageClient::RemoveTextureWithTracker(TextureClient* aTexture,
AsyncTransactionTracker* aAsyncTransactionTracker)
{
#ifdef MOZ_WIDGET_GONK
// AsyncTransactionTracker is supported only on ImageBridge.
// Use AsyncTransactionTracker only when TextureClient is recyeled.
if (aAsyncTransactionTracker ||
(GetForwarder()->IsImageBridgeChild() && aTexture->HasRecycleCallback())) {
GetForwarder()->IsImageBridgeChild()) {
RefPtr<AsyncTransactionTracker> request = aAsyncTransactionTracker;
if (!request) {
// Create AsyncTransactionTracker if it is not provided as argument.
request = new RemoveTextureFromCompositableTracker();
}
// Hold TextureClient until the transaction complete to postpone
// the TextureClient recycle.
// the TextureClient recycle/delete.
request->SetTextureClient(aTexture);
GetForwarder()->RemoveTextureFromCompositableAsync(request, this, aTexture);
return;