Merge pull request #3520 from brendandahl/single-cs

Create only one instance of each device colorspace.
This commit is contained in:
Yury Delendik 2013-08-07 11:37:49 -07:00
commit 99db7a8dbc
4 changed files with 28 additions and 26 deletions

View file

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* globals Cmd, DeviceCmykCS, Dict, globalScope, INFOS, MozBlobBuilder, Name,
/* globals Cmd, ColorSpace, Dict, globalScope, INFOS, MozBlobBuilder, Name,
PDFJS, Ref, WARNINGS, verbosity */
'use strict';
@ -281,12 +281,8 @@ var Util = PDFJS.Util = (function UtilClosure() {
};
Util.makeCssCmyk = function Util_makeCssCmyk(cmyk) {
var cs = new DeviceCmykCS();
Util.makeCssCmyk = function makeCssCmyk(cmyk) {
var rgb = cs.getRgb(cmyk, 0);
return Util.makeCssRgb(rgb);
};
return Util.makeCssCmyk(cmyk);
var rgb = ColorSpace.singletons.cmyk.getRgb(cmyk, 0);
return Util.makeCssRgb(rgb);
};
// Concatenates two transformation matrices together and returns the result.