Bug 864017: Deal with GrallocPlanarYCbCrImage on the client side. r=bjacob

This commit is contained in:
Bas Schouten
2013-04-30 12:14:20 +02:00
parent 4d9e0ccf99
commit 00c9a13202

View File

@@ -175,6 +175,21 @@ ImageClientSingle::UpdateImage(ImageContainer* aContainer,
return false;
}
mTextureClient->SetDescriptor(desc);
} else if (image->GetFormat() == GRALLOC_PLANAR_YCBCR) {
EnsureTextureClient(TEXTURE_SHARED_GL_EXTERNAL);
nsIntRect rect(0, 0,
image->GetSize().width,
image->GetSize().height);
UpdatePictureRect(rect);
AutoLockTextureClient lock(mTextureClient);
SurfaceDescriptor desc = static_cast<GrallocPlanarYCbCrImage*>(image)->GetSurfaceDescriptor();
if (!IsSurfaceDescriptorValid(desc)) {
return false;
}
mTextureClient->SetDescriptor(desc);
#endif
} else {
nsRefPtr<gfxASurface> surface = image->GetAsSurface();