From 54763d2fb0c5e89b53a7672553e7727802de9ac8 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Tue, 23 Mar 2021 22:18:08 +0100 Subject: [PATCH] Load less tiles when low on frame budget --- src/ol/PluggableMap.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 1ca470e823..cd95a3c97c 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -18,11 +18,7 @@ import RenderEventType from './render/EventType.js'; import TileQueue, {getTilePriority} from './TileQueue.js'; import View from './View.js'; import ViewHint from './ViewHint.js'; -import { - DEVICE_PIXEL_RATIO, - IMAGE_DECODE, - PASSIVE_EVENT_LISTENERS, -} from './has.js'; +import {DEVICE_PIXEL_RATIO, PASSIVE_EVENT_LISTENERS} from './has.js'; import {TRUE} from './functions.js'; import { apply as applyTransform, @@ -1047,8 +1043,7 @@ class PluggableMap extends BaseObject { if (frameState) { const hints = frameState.viewHints; if (hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING]) { - const lowOnFrameBudget = - !IMAGE_DECODE && Date.now() - frameState.time > 8; + const lowOnFrameBudget = Date.now() - frameState.time > 8; maxTotalLoading = lowOnFrameBudget ? 0 : 8; maxNewLoads = lowOnFrameBudget ? 0 : 2; }