Bug 801676 - Follow-up: Add comment explaining why we use JPEG instead of PNG in getScreenshot(). r=jlebar DONTBUILD

This commit is contained in:
Gabriele Svelto 2012-10-16 18:02:53 +02:00
Родитель 3c5fbe062a
Коммит 5554aa327e
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -462,6 +462,9 @@ BrowserElementChild.prototype = {
content.innerHeight, "rgb(255,255,255)"); content.innerHeight, "rgb(255,255,255)");
sendAsyncMsg('got-screenshot', { sendAsyncMsg('got-screenshot', {
id: data.json.id, id: data.json.id,
// Hack around the fact that we can't specify opaque PNG, this requires
// us to unpremultiply the alpha channel which is expensive on ARM
// processors because they lack a hardware integer division instruction.
rv: canvas.toDataURL("image/jpeg") rv: canvas.toDataURL("image/jpeg")
}); });
}, },