add dropColorizedImage for canvas utils

This commit is contained in:
yinkaile
2018-04-02 13:50:13 +08:00
parent 665b72690e
commit 687f9a77dc
2 changed files with 5 additions and 5 deletions
@@ -28,7 +28,7 @@ module.exports = js.addon({
_updateTexture (comp) {
ttfUtils._updateTexture(comp);
utils.dropImage(comp._texture, comp.node.color);
utils.dropColorizedImage(comp._texture, comp.node.color);
},
draw (ctx, comp) {
@@ -97,8 +97,7 @@ let canvasMgr = {
}
},
dropImage (texture, color) {
let key = texture.url + (color._val & 0x00ffffff);
dropImage (key) {
if (this.canvasMap[key]) {
delete this.canvasMap[key];
}
@@ -158,7 +157,8 @@ module.exports = {
return cache;
},
dropImage (texture, color) {
canvasMgr.dropImage(texture, color);
dropColorizedImage (texture, color) {
let key = texture.url + (color._val & 0x00ffffff);
canvasMgr.dropImage(key);
}
};