Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #15235 from huchengtw-moz/gallery/Bug_951241-blue-…
Browse files Browse the repository at this point in the history
…line

Bug 951241 - [B2G][Gallery][Image Edit] Image preview in edit mode shows...,  r=djf
  • Loading branch information
huchengtw-moz committed Jan 16, 2014
2 parents 2ada1e2 + 4947aee commit c99867f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/gallery/js/ImageEditor.js
Expand Up @@ -547,7 +547,10 @@ ImageEditor.prototype.generateNewPreview = function(callback) {
var canvas = document.createElement('canvas');
canvas.width = previewWidth;
canvas.height = previewHeight;
var context = canvas.getContext('2d');
// In this case, we only need graphic 2d to do the scaling. The
// willReadFrequently option makes canvas use software graphic 2d. This can
// skip a bug of GPU version, bug 960276.
var context = canvas.getContext('2d', { willReadFrequently: true });

// Draw that region of the image into the canvas, scaling it down
context.drawImage(this.original, this.source.x, this.source.y,
Expand Down

0 comments on commit c99867f

Please sign in to comment.