()
| 301 | } |
| 302 | |
| 303 | flush() { |
| 304 | if (this._renderQ.length === 0) { |
| 305 | return Promise.resolve(); |
| 306 | } else { |
| 307 | if (this._flushPromise === null) { |
| 308 | this._flushPromise = new Promise((resolve) => { |
| 309 | this._flushResolve = resolve; |
| 310 | }); |
| 311 | } |
| 312 | return this._flushPromise; |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | fillRect(x, y, width, height, color, fromQueue) { |
| 317 | if (this._renderQ.length !== 0 && !fromQueue) { |
no outgoing calls