[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - vcl/inc vcl/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 21 05:20:55 UTC 2020
vcl/inc/impgraph.hxx | 2 --
vcl/source/gdi/impgraph.cxx | 18 ++++++++----------
2 files changed, 8 insertions(+), 12 deletions(-)
New commits:
commit 707f82bbe24d00f4506745c59b48319bc87726de
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Dec 21 14:19:38 2020 +0900
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Dec 21 14:19:38 2020 +0900
ImpGraphic: inline loadPrepared as it is used only in one place
Change-Id: Id3753522f016d3c619e6ef8c68b3172768b5ca90
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index 86fa80606b8f..f4417a262d1c 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -209,8 +209,6 @@ private:
bool ensureAvailable () const;
- bool loadPrepared();
-
sal_Int32 getPageNumber() const;
// Set the pref size, but don't force swap-in
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 237ffa07ecfb..6a072c18e129 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1350,15 +1350,6 @@ bool ImpGraphic::ensureAvailable() const
return bResult;
}
-bool ImpGraphic::loadPrepared()
-{
- Graphic aGraphic;
- if (!mpGfxLink->LoadNative(aGraphic))
- return false;
- updateFromLoadedGraphic(aGraphic.ImplGetImpGraphic());
- return true;
-}
-
void ImpGraphic::updateFromLoadedGraphic(ImpGraphic* graphic)
{
GraphicExternalLink aLink = maGraphicExternalLink;
@@ -1394,7 +1385,14 @@ bool ImpGraphic::swapIn()
if (mbPrepared)
{
- bReturn = loadPrepared();
+ Graphic aGraphic;
+ if (!mpGfxLink->LoadNative(aGraphic))
+ return false;
+
+ updateFromLoadedGraphic(aGraphic.ImplGetImpGraphic());
+
+ maLastUsed = std::chrono::high_resolution_clock::now();
+ bReturn = true;
}
else if (mpGfxLink && mpGfxLink->IsNative())
{
More information about the Libreoffice-commits
mailing list