Allow subpixel anti-aliasing for most of the content.

This commit is contained in:
Yury Delendik 2015-11-16 10:50:02 -06:00
parent f096e4ab91
commit 1d8800370a
7 changed files with 111 additions and 55 deletions

View file

@ -46,7 +46,10 @@ var PDFThumbnailView = (function PDFThumbnailViewClosure() {
// Since this is a temporary canvas, we need to fill the canvas with a white
// background ourselves. |_getPageDrawContext| uses CSS rules for this.
var ctx = tempCanvas.getContext('2d');
//#if MOZCENTRAL || FIREFOX || GENERIC
tempCanvas.mozOpaque = true;
//#endif
var ctx = tempCanvas.getContext('2d', {alpha: false});
ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, width, height);
@ -186,7 +189,10 @@ var PDFThumbnailView = (function PDFThumbnailViewClosure() {
var canvas = document.createElement('canvas');
this.canvas = canvas;
var ctx = canvas.getContext('2d');
//#if MOZCENTRAL || FIREFOX || GENERIC
canvas.mozOpaque = true;
//#endif
var ctx = canvas.getContext('2d', {alpha: false});
var outputScale = getOutputScale(ctx);
canvas.width = (this.canvasWidth * outputScale.sx) | 0;