summaryrefslogtreecommitdiff
path: root/vcl/headless/svpgdi.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-04 09:22:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-04 11:21:22 +0200
commitf45ff1a7147e6a9479c669f082dd74349c6bcb4b (patch)
tree9ec5eee03fe7bbc5e026318efd6dcca3502d4696 /vcl/headless/svpgdi.cxx
parent58937aa4a50ecd681382f03331340da4c843b01e (diff)
loplugin:flatten in vcl
Change-Id: I271cc67ecf34acbf0edbda960e33315fb6a1f9dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100041 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/headless/svpgdi.cxx')
-rw-r--r--vcl/headless/svpgdi.cxx48
1 files changed, 24 insertions, 24 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 9f1a56e18e8c..f8276b57c542 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -618,19 +618,19 @@ namespace
}
}
- if(!rSurface)
- {
- // create data on-demand
- rSurface = std::make_shared<BitmapHelper>(rSourceBitmap);
+ if(rSurface)
+ return;
- if(bBufferSource)
- {
- // add to buffering mechanism to potentially reuse next time
- const SvpSalBitmap& rSrcBmp(static_cast<const SvpSalBitmap&>(rSourceBitmap));
- rSrcBmp.addOrReplaceSystemDependentData<SystemDependentData_BitmapHelper>(
- ImplGetSystemDependentDataManager(),
- rSurface);
- }
+ // create data on-demand
+ rSurface = std::make_shared<BitmapHelper>(rSourceBitmap);
+
+ if(bBufferSource)
+ {
+ // add to buffering mechanism to potentially reuse next time
+ const SvpSalBitmap& rSrcBmp(static_cast<const SvpSalBitmap&>(rSourceBitmap));
+ rSrcBmp.addOrReplaceSystemDependentData<SystemDependentData_BitmapHelper>(
+ ImplGetSystemDependentDataManager(),
+ rSurface);
}
}
@@ -655,19 +655,19 @@ namespace
}
}
- if(!rMask)
- {
- // create data on-demand
- rMask = std::make_shared<MaskHelper>(rMaskBitmap);
+ if(rMask)
+ return;
- if(bBufferMask)
- {
- // add to buffering mechanism to potentially reuse next time
- const SvpSalBitmap& rSrcBmp(static_cast<const SvpSalBitmap&>(rMaskBitmap));
- rSrcBmp.addOrReplaceSystemDependentData<SystemDependentData_MaskHelper>(
- ImplGetSystemDependentDataManager(),
- rMask);
- }
+ // create data on-demand
+ rMask = std::make_shared<MaskHelper>(rMaskBitmap);
+
+ if(bBufferMask)
+ {
+ // add to buffering mechanism to potentially reuse next time
+ const SvpSalBitmap& rSrcBmp(static_cast<const SvpSalBitmap&>(rMaskBitmap));
+ rSrcBmp.addOrReplaceSystemDependentData<SystemDependentData_MaskHelper>(
+ ImplGetSystemDependentDataManager(),
+ rMask);
}
}
}