mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
add dropColorizedImage for canvas utils
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user