Pass destination extent to avoid garbage generation
This commit is contained in:
@@ -97,7 +97,7 @@ const VectorImageTile = function(tileCoord, state, sourceRevision, format,
|
|||||||
sourceTileGrid.getTileCoordExtent(sourceTileCoord));
|
sourceTileGrid.getTileCoordExtent(sourceTileCoord));
|
||||||
const sourceExtent = sourceTileGrid.getExtent();
|
const sourceExtent = sourceTileGrid.getExtent();
|
||||||
if (sourceExtent) {
|
if (sourceExtent) {
|
||||||
sharedExtent = getIntersection(sharedExtent, sourceExtent);
|
sharedExtent = getIntersection(sharedExtent, sourceExtent, sharedExtent);
|
||||||
}
|
}
|
||||||
if (getWidth(sharedExtent) / resolution >= 0.5 &&
|
if (getWidth(sharedExtent) / resolution >= 0.5 &&
|
||||||
getHeight(sharedExtent) / resolution >= 0.5) {
|
getHeight(sharedExtent) / resolution >= 0.5) {
|
||||||
|
|||||||
@@ -593,6 +593,8 @@ export function getIntersection(extent1, extent2, opt_extent) {
|
|||||||
} else {
|
} else {
|
||||||
intersection[3] = extent2[3];
|
intersection[3] = extent2[3];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
createOrUpdateEmpty(intersection);
|
||||||
}
|
}
|
||||||
return intersection;
|
return intersection;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user