diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-07-12 15:12:23 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-07-12 16:29:20 +0200 |
commit | 8b8fd948cfe1b0f146f2fbe4779efe1fb7a37a59 (patch) | |
tree | 16f02c94127246965e667e3ed6b4abeabcf513a4 | |
parent | 79b6c25a2a0bf64f08f19a6c81549932b34fc3e6 (diff) |
Optimize a bit
Change-Id: I676533742f1a91bb1f68b0098a1d54a93d09c6ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170402
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | vcl/source/gdi/vectorgraphicdata.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx index 246356cb3a52..8b9b2b7522d9 100644 --- a/vcl/source/gdi/vectorgraphicdata.cxx +++ b/vcl/source/gdi/vectorgraphicdata.cxx @@ -185,6 +185,9 @@ void VectorGraphicData::ensureReplacement() BitmapEx VectorGraphicData::getBitmap(const Size& pixelSize) const { + if (!maReplacement.IsEmpty() && maReplacement.GetSizePixel() == pixelSize) + return maReplacement; + if (getType() == VectorGraphicDataType::Pdf) { // use PDFium directly |