Do not lock label cache entries

This commit is contained in:
Andreas Hocevar
2020-01-05 11:24:46 +01:00
parent ae336f0a1b
commit da6eed850c
8 changed files with 7 additions and 117 deletions
+1 -12
View File
@@ -18,7 +18,6 @@ import {
} from '../../transform.js';
import {createCanvasContext2D} from '../../dom.js';
import {labelCache, defaultTextAlign, measureTextHeight, measureAndCacheTextWidth, measureTextWidths} from '../canvas.js';
import Disposable from '../../Disposable.js';
import RBush from 'rbush/rbush.js';
@@ -52,7 +51,7 @@ const p3 = [];
const p4 = [];
class Executor extends Disposable {
class Executor {
/**
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
@@ -60,7 +59,6 @@ class Executor extends Disposable {
* @param {SerializableInstructions} instructions The serializable instructions
*/
constructor(resolution, pixelRatio, overlaps, instructions) {
super();
/**
* @protected
@@ -156,15 +154,6 @@ class Executor extends Disposable {
this.widths_ = {};
}
/**
* @inheritDoc
*/
disposeInternal() {
labelCache.release(this);
super.disposeInternal();
}
/**
* @param {string} text Text.
* @param {string} textKey Text style key.