From dd983902e326128885e3e674ca4417a3ef6e2f4c Mon Sep 17 00:00:00 2001 From: Sotaro Ikeda Date: Wed, 6 Nov 2013 12:32:12 -0500 Subject: [PATCH] Bug 934106 - Reduce ImageClient holding video frame number to one. r=nical --- gfx/layers/ImageContainer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index 4af2aa4da112..f43330ed4517 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -135,7 +135,11 @@ ImageContainer::ImageContainer(int flag) if (flag == ENABLE_ASYNC && ImageBridgeChild::IsCreated()) { // the refcount of this ImageClient is 1. we don't use a RefPtr here because the refcount // of this class must be done on the ImageBridge thread. - mImageClient = ImageBridgeChild::GetSingleton()->CreateImageClient(BUFFER_IMAGE_BUFFERED).drop(); + if (gfxPlatform::GetPlatform()->UseDeprecatedTextures()) { + mImageClient = ImageBridgeChild::GetSingleton()->CreateImageClient(BUFFER_IMAGE_BUFFERED).drop(); + } else { + mImageClient = ImageBridgeChild::GetSingleton()->CreateImageClient(BUFFER_IMAGE_SINGLE).drop(); + } MOZ_ASSERT(mImageClient); } }