Merge pull request #6551 from yurydelendik/subaa

[api-minor] Enables subpixel anti-aliasing for most of the content.
This commit is contained in:
Yury Delendik 2015-11-17 19:45:32 -06:00
commit 194994a289
7 changed files with 111 additions and 55 deletions

View file

@ -73,7 +73,10 @@ var TextLayerBuilder = (function TextLayerBuilderClosure() {
var textDivs = this.textDivs;
var textDivsLength = textDivs.length;
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
//#if MOZCENTRAL || FIREFOX || GENERIC
canvas.mozOpaque = true;
//#endif
var ctx = canvas.getContext('2d', {alpha: false});
// No point in rendering many divs as it would make the browser
// unusable even after the divs are rendered.