[Sie-announce] SIEコード [2166] screen. updateIntervalで処理を高速化

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 11月 21日 (日) 23:19:54 JST


Revision: 2166
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2166
Author:   dhrname
Date:     2010-11-21 23:19:54 +0900 (Sun, 21 Nov 2010)

Log Message:
-----------
screen.updateIntervalで処理を高速化

Modified Paths:
--------------
    branches/06x/064/org/w3c/dom/svg.js

Modified: branches/06x/064/org/w3c/dom/svg.js
===================================================================
--- branches/06x/064/org/w3c/dom/svg.js	2010-11-20 12:02:48 UTC (rev 2165)
+++ branches/06x/064/org/w3c/dom/svg.js	2010-11-21 14:19:54 UTC (rev 2166)
@@ -1531,6 +1531,14 @@
       NAIBU.doc.validateOnParse = false;
       NAIBU.doc.resolveExternals = false;
       NAIBU.doc.loadXML(str);
+      /*IE6-8のみで使えるupdateIntervalは、
+       *描画間隔の調整が可能。デフォルトは0。
+       *スクロール時にバグが起きるので、0に戻してやる必要がある。
+       */
+      screen.updateInterval = 999;
+      window.onscroll = function () {
+        screen.updateInterval = 0;
+      }
       var objei = this._tar;
       if (/&[^;]+;/.test(str)) {
         /*以下の処理は、実体参照を使ったとき
@@ -1646,14 +1654,15 @@
       s = evt = null;
       /*IEのメモリリーク対策として、空関数を入力*/
       this.xmlhttp.onreadystatechange = NAIBU.emptyFunction;
+      alert(+(new Date()) - dew);
       if (this._next) {
         this._next._init();
       } else {
         /*全要素の読み込みが終了した場合*/
+        screen.updateInterval = 42; //24fpsとして描画処理
         NAIBU.Time.start();
         delete NAIBU.doc;
       }
-      alert(+(new Date()) - dew);
     }
   },
   /*SVGDocument*/  getSVGDocument : function() {
@@ -4855,6 +4864,7 @@
          */
         tta.animVal = tta.baseVal;
         tta.baseVal = base;
+        di = null;
       } else if (!!CSS2Properties[attrName] || attrName.indexOf("-") > -1) { //スタイルシートのプロパティならば
         var base = null;
         var v1 = tar._valueList[ii], v2 = tar._valueList[ii+1];
@@ -4873,7 +4883,7 @@
         tta.animatedNormalizedPathSegList = tta.normalizedPathSegList;
         tta.normalizedPathSegList = base;
       }
-     evt = v1 = v2 = v = di = d = n = ii = tg = null;
+     evt = v1 = v2 = v = d = n = ii = tg = null;
     };
     evt = vir = null;
   }, false);




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