Skip to content

Commit

Permalink
#21 OffscreenCanvasの実装(WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
ienaga committed Feb 21, 2023
1 parent e6e8ea3 commit e439eea
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/next2d/display/DisplayObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -1995,6 +1995,24 @@ class DisplayObject extends EventDispatcher
});
}

/**
* @return {void}
* @method
* @private
*/
_$removeWorkerCache ()
{
if (!Util.$rendererWorker) {
return ;
}

Util.$rendererWorker.postMessage({
"command": "removeCache",
"characterId": this._$characterId,
"instanceId": this._$instanceId
});
}

/**
* @return {object}
* @method
Expand Down
9 changes: 9 additions & 0 deletions src/renderer/RenderBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@ class CommandController
}
break;

case "removeCache":
{
const cacheStore = Util.$renderPlayer._$cacheStore;

cacheStore.removeCache(object.instanceId);
cacheStore.removeCache(object.characterId);
}
break;

default:
break;

Expand Down

0 comments on commit e439eea

Please sign in to comment.