File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,8 @@ cc._canvas = null;
82
82
cc . container = null ;
83
83
cc . _gameDiv = null ;
84
84
85
+ window . ENABLE_IMAEG_POOL = true ;
86
+
85
87
/**
86
88
* Iterate over an object or an array, executing a function for each matched element.
87
89
* @param {object|array } obj
@@ -938,7 +940,7 @@ cc.loader = (function () {
938
940
delete _queue [ url ] ;
939
941
}
940
942
941
- if ( cc . _renderType === cc . game . RENDER_TYPE_WEBGL ) {
943
+ if ( ENABLE_IMAEG_POOL && cc . _renderType === cc . game . RENDER_TYPE_WEBGL ) {
942
944
imagePool . put ( img ) ;
943
945
}
944
946
} ;
Original file line number Diff line number Diff line change @@ -496,7 +496,9 @@ cc._tmp.WebGLTexture2D = function () {
496
496
497
497
self . _hasPremultipliedAlpha = premultiplied ;
498
498
self . _hasMipmaps = false ;
499
- self . _htmlElementObj = null ;
499
+ if ( ENABLE_IMAEG_POOL ) {
500
+ self . _htmlElementObj = null ;
501
+ }
500
502
501
503
//dispatch load event to listener.
502
504
self . dispatchEvent ( "load" ) ;
You can’t perform that action at this time.
0 commit comments