Merge pull request #442 from adroitwhiz/pen-stamp-region-optimization

Don't _doExitDrawRegion in penStamp until we're sure we're stamping
This commit is contained in:
Chris Willis-Ford 2019-08-30 20:19:26 +01:00 committed by GitHub
commit ab517fff51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1416,8 +1416,6 @@ class RenderWebGL extends EventEmitter {
* @param {int} stampID - the unique ID of the Drawable to use as the stamp.
*/
penStamp (penSkinID, stampID) {
this._doExitDrawRegion();
const stampDrawable = this._allDrawables[stampID];
if (!stampDrawable) {
return;
@ -1428,6 +1426,8 @@ class RenderWebGL extends EventEmitter {
return;
}
this._doExitDrawRegion();
const skin = /** @type {PenSkin} */ this._allSkins[penSkinID];
const gl = this._gl;