Bug 972494 - Use RefPtr to hold GrallocTextureClientOGL pointer r=nical

This commit is contained in:
Sotaro Ikeda 2014-02-18 06:46:13 -08:00
parent c84d4ee5f5
commit b23f7d7072
2 changed files with 2 additions and 3 deletions

View File

@ -80,7 +80,7 @@ SharedSurface_Gralloc::Create(GLContext* prodGL,
gfxImageFormat format
= gfxPlatform::GetPlatform()->OptimalFormatForContent(type);
GrallocTextureClientOGL* grallocTC =
RefPtr<GrallocTextureClientOGL> grallocTC =
new GrallocTextureClientOGL(
allocator,
gfx::ImageFormatToSurfaceFormat(format),
@ -102,7 +102,6 @@ SharedSurface_Gralloc::Create(GLContext* prodGL,
LOCAL_EGL_NATIVE_BUFFER_ANDROID,
clientBuffer, attrs);
if (!image) {
grallocTC->DropTextureData()->DeallocateSharedData(allocator);
return nullptr;
}

View File

@ -132,7 +132,7 @@ CanvasClientSurfaceStream::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
SharedSurface_Gralloc* grallocSurf = SharedSurface_Gralloc::Cast(surf);
GrallocTextureClientOGL* grallocTextureClient =
RefPtr<GrallocTextureClientOGL> grallocTextureClient =
static_cast<GrallocTextureClientOGL*>(grallocSurf->GetTextureClient());
// If IPDLActor is null means this TextureClient didn't AddTextureClient yet