From d76c5aa78f0b9004c6719dcc4d2be052c0703ba5 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Mon, 28 Sep 2015 12:51:02 +0200 Subject: don't allocate (by eraseing) an un-initialized 1x1 virtual device Change-Id: I11c7063d7ac689866461ceabf8648f1c3c7bb17d --- vcl/source/gdi/virdev.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'vcl') diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index b8dc0613fda4..7319a1f056af 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -129,6 +129,8 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, { SAL_INFO( "vcl.virdev", "ImplInitVirDev(" << nDX << "," << nDY << "," << nBitCount << ")" ); + bool bErase = nDX > 0 && nDY > 0; + if ( nDX < 1 ) nDX = 1; @@ -191,7 +193,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, SetBackground( Wallpaper( Color( COL_WHITE ) ) ); // #i59283# don't erase user-provided surface - if( !pData ) + if( !pData && bErase) Erase(); // register VirDev in the list @@ -212,7 +214,7 @@ VirtualDevice::VirtualDevice( sal_uInt16 nBitCount ) "VirtualDevice::VirtualDevice(): Only 0, 1 or 8 allowed for BitCount, not " << nBitCount ); SAL_INFO( "vcl.gdi", "VirtualDevice::VirtualDevice( " << nBitCount << " )" ); - ImplInitVirDev( Application::GetDefaultDevice(), 1, 1, nBitCount ); + ImplInitVirDev( Application::GetDefaultDevice(), 0, 0, nBitCount ); } VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount ) @@ -223,7 +225,7 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount "VirtualDevice::VirtualDevice(): Only 0, 1 or 8 allowed for BitCount, not " << nBitCount ); SAL_INFO( "vcl.gdi", "VirtualDevice::VirtualDevice( " << nBitCount << " )" ); - ImplInitVirDev( &rCompDev, 1, 1, nBitCount ); + ImplInitVirDev( &rCompDev, 0, 0, nBitCount ); } VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount, sal_uInt16 nAlphaBitCount ) @@ -235,7 +237,7 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount SAL_INFO( "vcl.gdi", "VirtualDevice::VirtualDevice( " << nBitCount << ", " << nAlphaBitCount << " )" ); - ImplInitVirDev( &rCompDev, 1, 1, nBitCount ); + ImplInitVirDev( &rCompDev, 0, 0, nBitCount ); // Enable alpha channel mnAlphaDepth = sal::static_int_cast(nAlphaBitCount); -- cgit value='distro/collabora/co-24.04'>distro/collabora/co-24.04 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2018-08-28drop unnecessary SYSTEM_MYSQL_CONNECTOR_CPPCaolán McNamara
2018-08-28Moving mysqlc into connectivity as a libraryTamas Bunth
2018-06-27poppler: upgrade to release 0.66.0Michael Stahl
2018-04-26Install UCRT from MSUs, not using nested VC Redist installMike Kaganski
2018-03-25tdf#114635: Add TWAINDSM.DLL to 64-bit Windows packageMike Kaganski
2018-01-08tdf#108580: integrate vc_redist.exe into MSIMike Kaganski
2017-12-14external: upload libepubgen-0.1.0Miklos Vajna
2017-11-30move conditional stuff to RepositoryExternal.mkDavid Tardon
2017-11-24gpgme: fix buildThorsten Behrens
2017-11-23fix build: use same conditional as in configureThorsten Behrens
2017-11-23gpg4libre: package gpgme spawn helper for WindowsThorsten Behrens
2017-11-22gpg4libre: cleanup gpgme & add gbuild lib for gpgmeppThorsten Behrens
2017-11-18Updated liborcus to 0.13.1.Kohei Yoshida
2017-11-06QT5 rename from KF5Jan-Marek Glogowski
2017-11-06KF5 initial VCL pluginJan-Marek Glogowski
2017-10-30related: tdf#103884 remove gltf/collada featureThorsten Behrens
2017-10-26RepositoryExternal.mk: fix inverted gpg conditionMichael Stahl
2017-10-26gpg4libre: enable OpenPGP support for MacThorsten Behrens
2017-10-24curl: upgrade to release 7.56.1Michael Stahl
2017-09-15consistent naming of externals: mysqlcppconn -> mysql-connector-cppMichael Stahl
2017-09-15consistent naming of externals: xslt -> libxsltMichael Stahl
2017-09-15consistent naming of externals: xml2 -> libxml2Michael Stahl
2017-09-15consistent naming of externals: png -> libpngMichael Stahl
2017-09-15consistent naming of externals: libmariadb -> mariadb-connector-cMichael Stahl
2017-09-15consistent naming of externals: langtag -> liblangtagMichael Stahl
2017-09-15consistent naming of externals: exttextcat -> libexttextcatMichael Stahl
2017-09-15consistent naming of externals: cmis -> libcmisMichael Stahl
2017-09-15consistent naming of externals: jpeg-turbo->libjpeg-turboMichael Stahl
2017-08-28integrate libqxpAleksas Pantechovskis
2017-08-23Android: Enable HAVE_FEATURE_NSS and package the NSS libraries with apkGautam Prajapati
2017-08-11Revert "Build with kde5, first stab"Katarina Behrens
2017-08-11Build with kde5, first stabKatarina Behrens
2017-08-02external: bundle libepubgenMiklos Vajna
2017-07-21migrate to boost::gettextCaolán McNamara
2017-06-22xmlsecurity: implement support for building against system-xmlsecMiklos Vajna
2017-06-13remove TDE integration (vclplug, address book, config backend)Michael Stahl
2017-04-28build boost::locale libraryCaolán McNamara
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky
2017-04-14remove the old collaboration feature based on telepathyMarkus Mohrhard