[Sie-announce] SIEコード [2719] _nodeInsertIntoの最適化

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 5月 29日 (日) 19:43:08 JST


Revision: 2719
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2719
Author:   dhrname
Date:     2011-05-29 19:43:08 +0900 (Sun, 29 May 2011)

Log Message:
-----------
_nodeInsertIntoの最適化

Modified Paths:
--------------
    branches/07x/078/org/w3c/dom/svg.js

Modified: branches/07x/078/org/w3c/dom/svg.js
===================================================================
--- branches/07x/078/org/w3c/dom/svg.js	2011-05-29 10:35:19 UTC (rev 2718)
+++ branches/07x/078/org/w3c/dom/svg.js	2011-05-29 10:43:08 UTC (rev 2719)
@@ -2956,6 +2956,8 @@
       isZ = tar._com._isZ, isC = tar._com._isC;
   for (var i=0, tli=tlist.numberOfItems;i<tli;++i) {
     var ti = tlist[i],
+        tx = ti.x,
+        ty = ti.y,
         tps = ti.pathSegTypeAsLetter,
         t = cname[tps];
     if (isC[tps]) {
@@ -2968,23 +2970,21 @@
              _parseInt(mb*ti.x1 + md*ti.y1 + mf, 10),
              _parseInt(ma*ti.x2 + mc*ti.y2 + me, 10),
              _parseInt(mb*ti.x2 + md*ti.y2 + mf, 10),
-             _parseInt(ma*ti.x + mc*ti.y + me, 10),
-             _parseInt(mb*ti.x + md*ti.y + mf, 10)].join(" ");
+             _parseInt(ma*tx + mc*ty + me, 10),
+             _parseInt(mb*tx + md*ty + mf, 10)].join(" ");
     } else if (!isZ[tps]) {
-      t += _parseInt(ma*ti.x + mc*ti.y + me, 10)+ " " +_parseInt(mb*ti.x + md*ti.y + mf, 10);
+      t += _parseInt(ma*tx + mc*ty + me, 10)+ " " +_parseInt(mb*tx + md*ty + mf, 10);
     }
     dat[i] = t;
   }
   var vi = tar.ownerDocument.documentElement,
-      w = vi.width.baseVal.value,
-      h = vi.height.baseVal.value,
       tt = tar._tar;
   dat.push(" e");
   tt.path = dat.join(" ");
-  tt.coordsize = w + " " + h;
+  tt.coordsize = vi.width.baseVal.value + " " + vi.height.baseVal.value;
   NAIBU._setPaint(tar, matrix);
   delete tar._cacheMatrix, tar._currentStyle;
-  evt = tar = dat = t = w = h = matrix = tlist = x = y = _parseInt = ma = mb = mc = md = me = mf = vi = isZ = isC = i = tli = tps = ti = cname = tt = null;
+  evt = tar = dat = t = tx = ty = matrix = tlist = x = y = _parseInt = ma = mb = mc = md = me = mf = vi = isZ = isC = i = tli = tps = ti = cname = tt = null;
 };
 SVGPathElement.prototype._com = {
   _nameCom : {




Sie-announce メーリングリストの案内
Back to archive index