Bug 776906 - Fix thumbnails on Nexus 7. r=blassey

This commit is contained in:
Kartikaya Gupta
2012-08-13 20:01:31 -04:00
parent a208ce7f2f
commit be0f4d02e1
2 changed files with 8 additions and 2 deletions

View File

@@ -2503,6 +2503,10 @@ nsresult AndroidBridge::TakeScreenshot(nsIDOMWindow *window, PRInt32 srcX, PRInt
void* data = env->GetDirectBufferAddress(buffer);
nsRefPtr<gfxImageSurface> surf = new gfxImageSurface(static_cast<unsigned char*>(data), nsIntSize(bufW, bufH), stride, gfxASurface::ImageFormatRGB16_565);
if (surf->CairoStatus() != 0) {
ALOG_BRIDGE("Error creating gfxImageSurface");
return NS_ERROR_FAILURE;
}
nsRefPtr<gfxContext> context = new gfxContext(surf);
gfxPoint pt(dstX, dstY);
context->Translate(pt);