diff options
author | Armin Le Grand <Armin.Le.Grand@me.com> | 2021-12-10 16:36:11 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2021-12-10 17:51:12 +0100 |
commit | 2c6e2fa596d4ecb22adb062a837f1bbf4384fed2 (patch) | |
tree | f2a588a1bbaa54faf5633dfdcce8e199322d639c /vcl/source/gdi | |
parent | 6494fba15ea93283b625bf6bdb4666709f22439f (diff) |
Revert "Re-Enable DrawTransformBitmapExDirect for render backends"
This reverts commit 7e5af164b7d293dd410710bed411e1ca64bbecf7.
Reason for revert: Not the best/effective way to clear out the stuff remaining to be done, would need additional stuff
Change-Id: Ia6ab90384da29a5e34eff0ab8881bad2ab49c58c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126601
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/salgdilayout.cxx | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 15a1a1384540..aafa8f157e70 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -54,8 +54,6 @@ SalGraphics::SalGraphics() m_aLastMirrorW(0), m_nLastMirrorDeviceLTRButBiDiRtlTranslate(0), m_bLastMirrorDeviceLTRButBiDiRtlSet(false), - m_bFastDrawTransformedBitmapChecked(false), - m_bFastDrawTransformedBitmap(false), m_bAntiAlias(false) { // read global RTL settings @@ -844,9 +842,6 @@ bool SalGraphics::DrawTransformedBitmap( double fAlpha, const OutputDevice& rOutDev) { - bool bRetval(false); - bool bDone(false); - if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() ) { // mirroring set @@ -861,49 +856,16 @@ bool SalGraphics::DrawTransformedBitmap( basegfx::B2DPoint aX = aTranslateToMirroredBounds * rX; basegfx::B2DPoint aY = aTranslateToMirroredBounds * rY; - bRetval = drawTransformedBitmap(aNull, aX, aY, rSourceBitmap, pAlphaBitmap, fAlpha); - bDone = true; + return drawTransformedBitmap(aNull, aX, aY, rSourceBitmap, pAlphaBitmap, fAlpha); } } - if(!bDone) - { - bRetval = drawTransformedBitmap(rNull, rX, rY, rSourceBitmap, pAlphaBitmap, fAlpha); - } - - if(bRetval && !m_bFastDrawTransformedBitmap) - { - // we had a sucessful call, note it for this SalGraphics - m_bFastDrawTransformedBitmap = true; - } - - return bRetval; + return drawTransformedBitmap(rNull, rX, rY, rSourceBitmap, pAlphaBitmap, fAlpha); } -bool SalGraphics::ImplementsFastDrawTransformedBitmap(bool bTestAllowed) const +bool SalGraphics::HasFastDrawTransformedBitmap() const { - // do not check when we already had a sucessful usage of drawTransformedBitmap (see above) - // only check if calling OutputDevice is not empty (bTestAllowed) - // check only once using the direct check method (see below) - if(!m_bFastDrawTransformedBitmap && bTestAllowed && !m_bFastDrawTransformedBitmapChecked) - { - // for check and to not change anything, get the top-left pixel as SalBitmap - // and try to paint it again. This avoids an extra virtual method hat would need - // to be implemened at all backends and cald all the time (virual calls). - // Nothing simpler came to my mind, maybe there is something... - SalGraphics* that(const_cast<SalGraphics*>(this)); - std::shared_ptr<SalBitmap> aTest(that->getBitmap(0, 0, 1, 1)); - that->m_bFastDrawTransformedBitmapChecked = true; - that->m_bFastDrawTransformedBitmap = that->drawTransformedBitmap( - basegfx::B2DPoint::getEmptyPoint(), - basegfx::B2DPoint(1.0, 0.0), - basegfx::B2DPoint(0.0, 1.0), - *aTest, - nullptr, - 1.0); - } - - return m_bFastDrawTransformedBitmap; + return hasFastDrawTransformedBitmap(); } bool SalGraphics::DrawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, |