]> git.parisson.com Git - pdf.js.git/commitdiff
Fix WebWorker logging and add separate timing for `fonts`.
authorJulian Viereck <julian.viereck@gmail.com>
Thu, 23 Jun 2011 13:24:55 +0000 (15:24 +0200)
committerJulian Viereck <julian.viereck@gmail.com>
Thu, 23 Jun 2011 21:33:25 +0000 (23:33 +0200)
pdf_worker.js

index 13a1f3f28f12810186ce881383c15a34cd399d0f..86dfec2ddf52c0d5969fae0f91d3223562599b9c 100644 (file)
@@ -17,7 +17,7 @@ function log() {
   var args = Array.prototype.slice.call(arguments);
   postMessage({
     action: "log",
-    args: args
+    data: args
   });
 }
 
@@ -62,7 +62,9 @@ onmessage = function(event) {
     var fonts = [];
     var gfx = new CanvasGraphics(canvas.getContext("2d"), CanvasProxy);
     page.compile(gfx, fonts);
+    toc("compiled page");
 
+    tic()
     // Inspect fonts and translate the missing one.
     var count = fonts.length;
     for (var i = 0; i < count; i++) {
@@ -75,7 +77,7 @@ onmessage = function(event) {
       // This "builds" the font and sents it over to the main thread.
       new Font(font.name, font.file, font.properties);
     }
-    toc("compiled page");
+    toc("fonts");
 
     tic()
     page.display(gfx);