Use canvas pool for reprojection tiles
This commit is contained in:
+7
-1
@@ -19,6 +19,11 @@ import {solveLinearSystem} from './math.js';
|
||||
|
||||
let brokenDiagonalRendering_;
|
||||
|
||||
/**
|
||||
* @type {Array<HTMLCanvasElement>}
|
||||
*/
|
||||
export const canvasPool = [];
|
||||
|
||||
/**
|
||||
* This draws a small triangle into a canvas by setting the triangle as the clip region
|
||||
* and then drawing a (too large) rectangle
|
||||
@@ -217,7 +222,8 @@ export function render(
|
||||
) {
|
||||
const context = createCanvasContext2D(
|
||||
Math.round(pixelRatio * width),
|
||||
Math.round(pixelRatio * height)
|
||||
Math.round(pixelRatio * height),
|
||||
canvasPool
|
||||
);
|
||||
|
||||
if (!opt_interpolate) {
|
||||
|
||||
Reference in New Issue
Block a user