summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-06-09 17:11:15 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-06-09 21:21:45 +0200
commit53dd6aa5f3817d42bf676980f980051c3b7cdb03 (patch)
tree2c807dc1804d3edb7b47939df2a42782e7d89851 /vcl
parent62b58e88d897f51a7c4e12b41d14121ab8d3396f (diff)
scale VCL's scale cache according to the number of Online views
If a document is opened in several Online views, each of them using a different zoom, then the scale cache is used for the scaling, and each view is sent updated tiles, so if there are too many views, the cache is not large enough. (Collabora T28503) Change-Id: I3fa719b0515064773fe4584fedbc8aff98e6e213 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116928 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/svapp.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index ecfaa3805bef..79d6dfa9c146 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1711,6 +1711,14 @@ bool isUnipoll()
return pSVData && pSVData->mpPollCallback != nullptr;
}
+void numberOfViewsChanged(int count)
+{
+ ImplSVData * pSVData = ImplGetSVData();
+ auto& rCache = pSVData->maGDIData.maScaleCache;
+ // Normally the cache size is set to 10, scale according to the number of users.
+ rCache.setMaxSize(count * 10);
+}
+
} // namespace lok, namespace vcl
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */