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;
8282cc . container = null ;
8383cc . _gameDiv = null ;
8484
85+ window . ENABLE_IMAEG_POOL = true ;
86+
8587/**
8688 * Iterate over an object or an array, executing a function for each matched element.
8789 * @param {object|array } obj
@@ -938,7 +940,7 @@ cc.loader = (function () {
938940 delete _queue [ url ] ;
939941 }
940942
941- if ( cc . _renderType === cc . game . RENDER_TYPE_WEBGL ) {
943+ if ( ENABLE_IMAEG_POOL && cc . _renderType === cc . game . RENDER_TYPE_WEBGL ) {
942944 imagePool . put ( img ) ;
943945 }
944946 } ;
Original file line number Diff line number Diff line change @@ -496,7 +496,9 @@ cc._tmp.WebGLTexture2D = function () {
496496
497497 self . _hasPremultipliedAlpha = premultiplied ;
498498 self . _hasMipmaps = false ;
499- self . _htmlElementObj = null ;
499+ if ( ENABLE_IMAEG_POOL ) {
500+ self . _htmlElementObj = null ;
501+ }
500502
501503 //dispatch load event to listener.
502504 self . dispatchEvent ( "load" ) ;
You can’t perform that action at this time.
0 commit comments