Fall back to pixelRatio 1 when none is defined.

Required in Item#rasterize() for non-native blend modes. This broke phantomjs tests.
This commit is contained in:
Jürg Lehni 2015-07-27 09:56:37 +02:00
parent cce42bc6f2
commit 59b7da0ed5

View file

@ -3857,7 +3857,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
// If native blending is possible, see if the item allows it
|| (nativeBlend || normalBlend && opacity < 1)
&& this._canComposite(),
pixelRatio = param.pixelRatio,
pixelRatio = param.pixelRatio || 1,
mainCtx, itemOffset, prevOffset;
if (!direct) {
// Apply the parent's global matrix to the calculation of correct