[Libreoffice-commits] core.git: 5 commits - basctl/inc basebmp/Library_basebmp.mk basebmp/source basebmp/test chart2/inc cui/inc desktop/CppunitTest_desktop_lib.mk desktop/Library_sofficeapp.mk desktop/qa desktop/source editeng/inc include/basebmp include/vcl reportdesign/inc sd/inc sw/inc vcl/android vcl/headless vcl/inc vcl/Library_vclplug_gtk3.mk vcl/opengl vcl/quartz vcl/source
Caolán McNamara
caolanm at redhat.com
Mon Jan 18 12:47:28 PST 2016
basctl/inc/pch/precompiled_basctl.hxx | 3
basebmp/Library_basebmp.mk | 1
basebmp/source/bitmapdevice.cxx | 292 -------------------------
basebmp/source/debug.cxx | 110 ---------
basebmp/test/basictest.cxx | 177 ---------------
chart2/inc/pch/precompiled_chartcontroller.hxx | 3
cui/inc/pch/precompiled_cui.hxx | 3
desktop/CppunitTest_desktop_lib.mk | 6
desktop/Library_sofficeapp.mk | 1
desktop/qa/desktop_lib/test_desktop_lib.cxx | 5
desktop/source/lib/init.cxx | 2
editeng/inc/pch/precompiled_editeng.hxx | 3
include/basebmp/bitmapdevice.hxx | 86 -------
include/basebmp/debug.hxx | 57 ----
include/vcl/virdev.hxx | 8
reportdesign/inc/pch/precompiled_rptui.hxx | 3
sd/inc/pch/precompiled_sdui.hxx | 3
sw/inc/pch/precompiled_msword.hxx | 3
sw/inc/pch/precompiled_swui.hxx | 3
sw/inc/pch/precompiled_vbaswobj.hxx | 3
vcl/Library_vclplug_gtk3.mk | 1
vcl/android/androidinst.cxx | 1
vcl/headless/svpbmp.cxx | 12 -
vcl/headless/svpgdi.cxx | 142 +++++-------
vcl/headless/svpvd.cxx | 6
vcl/inc/cairotextrender.hxx | 1
vcl/inc/headless/svpframe.hxx | 1
vcl/inc/headless/svpgdi.hxx | 15 -
vcl/inc/headless/svpvd.hxx | 2
vcl/inc/opengl/salbmp.hxx | 4
vcl/inc/quartz/salbmp.h | 8
vcl/inc/salvd.hxx | 4
vcl/inc/textrender.hxx | 1
vcl/inc/unx/glyphcache.hxx | 1
vcl/inc/unx/gtk/gtkframe.hxx | 2
vcl/opengl/salbmp.cxx | 2
vcl/quartz/salbmp.cxx | 2
vcl/quartz/salgdi.cxx | 1
vcl/quartz/salgdiutils.cxx | 2
vcl/source/gdi/virdev.cxx | 10
40 files changed, 109 insertions(+), 881 deletions(-)
New commits:
commit 36fcdd5fd4f719dec7ff46593ebaab3995908324
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 18 17:24:26 2016 +0000
devices are always top-down now
and remove some more unused out of tests code
Change-Id: Ie63b03d1de754038d5477112ddfc9266dbf93709
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index c167376..f40d931 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -163,60 +163,21 @@ namespace
typedef RawAccessor raw_accessor_type;
typedef AccessorSelector accessor_selector;
- typedef typename Masks::clipmask_format_traits::iterator_type mask_iterator_type;
- typedef typename Masks::clipmask_format_traits::raw_accessor_type mask_rawaccessor_type;
- typedef typename Masks::clipmask_format_traits::accessor_selector mask_accessorselector_type;
-
- typedef typename Masks::alphamask_format_traits::iterator_type alphamask_iterator_type;
- typedef typename Masks::alphamask_format_traits::raw_accessor_type alphamask_rawaccessor_type;
- typedef typename Masks::alphamask_format_traits::accessor_selector alphamask_accessorselector_type;
-
typedef typename AccessorSelector::template wrap_accessor<
raw_accessor_type >::type dest_accessor_type;
typedef AccessorTraits< dest_accessor_type > accessor_traits;
- typedef CompositeIterator2D< dest_iterator_type,
- mask_iterator_type > composite_iterator_type;
-
- typedef BitmapRenderer<mask_iterator_type,
- mask_rawaccessor_type,
- mask_accessorselector_type,
- Masks> mask_bitmap_type;
- typedef BitmapRenderer<alphamask_iterator_type,
- alphamask_rawaccessor_type,
- alphamask_accessorselector_type,
- Masks> alphamask_bitmap_type;
-
-
typedef AccessorTraits< raw_accessor_type > raw_accessor_traits;
typedef typename uInt32Converter<
typename raw_accessor_type::value_type>::to to_uint32_functor;
- typedef typename raw_accessor_traits::template masked_accessor<
- mask_rawaccessor_type,
- dest_iterator_type,
- mask_iterator_type,
- Masks::clipmask_polarity>::type raw_maskedaccessor_type;
- typedef typename accessor_selector::template wrap_accessor<
- raw_maskedaccessor_type >::type masked_accessor_type;
-
-
- typedef JoinImageAccessorAdapter< dest_accessor_type,
- mask_rawaccessor_type > joined_image_accessor_type;
- typedef JoinImageAccessorAdapter< GenericColorImageAccessor,
- GenericColorImageAccessor > joined_generic_image_accessor_type;
-
-
-
dest_iterator_type maBegin;
typename accessor_traits::color_lookup maColorLookup;
to_uint32_functor maToUInt32Converter;
dest_accessor_type maAccessor;
raw_accessor_type maRawAccessor;
- masked_accessor_type maMaskedAccessor;
- raw_maskedaccessor_type maRawMaskedAccessor;
@@ -237,9 +198,7 @@ namespace
maColorLookup(),
maToUInt32Converter(),
maAccessor( accessor ),
- maRawAccessor( rawAccessor ),
- maMaskedAccessor( accessor ),
- maRawMaskedAccessor( rawAccessor )
+ maRawAccessor( rawAccessor )
{}
private:
@@ -256,69 +215,6 @@ namespace
return getCompatibleBitmap(bmp).get() != nullptr;
}
- std::shared_ptr<mask_bitmap_type> getCompatibleClipMask( const BitmapDeviceSharedPtr& bmp ) const
- {
- std::shared_ptr<mask_bitmap_type> pMask( std::dynamic_pointer_cast<mask_bitmap_type>( bmp ));
-
- if( !pMask )
- return pMask;
-
- if( pMask->getSize() != getSize() )
- pMask.reset();
-
- return pMask;
- }
-
- virtual bool isCompatibleClipMask( const BitmapDeviceSharedPtr& bmp ) const override
- {
- // TODO(P1): dynamic_cast usually called twice for
- // compatible formats
- return std::dynamic_pointer_cast<mask_bitmap_type>( bmp ).get() != nullptr;
- }
-
- static std::shared_ptr<alphamask_bitmap_type> getCompatibleAlphaMask( const BitmapDeviceSharedPtr& bmp )
- {
- return std::dynamic_pointer_cast<alphamask_bitmap_type>( bmp );
- }
-
- virtual void clear_i( Color fillColor,
- const basegfx::B2IBox& rBounds ) override
- {
- fillImage(destIterRange(maBegin,
- maRawAccessor,
- rBounds),
- maColorLookup(
- maAccessor,
- fillColor) );
- }
-
- virtual void setPixel_i( const basegfx::B2IPoint& rPt,
- Color pixelColor ) override
- {
- const DestIterator pixel( maBegin +
- vigra::Diff2D(rPt.getX(),
- rPt.getY()) );
- maAccessor.set( pixelColor, pixel );
- }
-
- virtual void setPixel_i( const basegfx::B2IPoint& rPt,
- Color pixelColor,
- const BitmapDeviceSharedPtr& rClip ) override
- {
- std::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rClip) );
- OSL_ASSERT( pMask );
-
- const vigra::Diff2D offset(rPt.getX(),
- rPt.getY());
-
- const composite_iterator_type aIter(
- maBegin + offset,
- pMask->maBegin + offset );
-
- maMaskedAccessor.set( pixelColor,
- aIter );
- }
-
virtual Color getPixel_i(const basegfx::B2IPoint& rPt ) override
{
const DestIterator pixel( maBegin +
@@ -335,15 +231,6 @@ namespace
return maToUInt32Converter(maRawAccessor(pixel));
}
- composite_iterator_type getMaskedIter( const BitmapDeviceSharedPtr& rClip ) const
- {
- std::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rClip) );
- OSL_ASSERT( pMask );
-
- return composite_iterator_type( maBegin,
- pMask->maBegin );
- }
-
template< typename Iterator, typename RawAcc >
void implDrawBitmap(const BitmapDeviceSharedPtr& rSrcBitmap,
const basegfx::B2IBox& rSrcRect,
@@ -398,8 +285,8 @@ namespace
sal_Int32 dstStride = getScanlineStride();
sal_Int32 srcStride = rSrcBitmap->getScanlineStride();
sal_Int32 bytesPerPixel = (bitsPerPixel[getScanlineFormat()] + 7) >> 3; // round up to bytes
- bool dstTopDown = isTopDown();
- bool srcTopDown = rSrcBitmap->isTopDown();
+ bool dstTopDown = true;
+ bool srcTopDown = true;
if (dstBuf == srcBuf && nSrcY < nDestY) // reverse copy order to avoid overlapping
{
@@ -539,11 +426,6 @@ basegfx::B2IVector BitmapDevice::getSize() const
mpImpl->maBounds.getMaxY() - mpImpl->maBounds.getMinY() );
}
-bool BitmapDevice::isTopDown() const
-{
- return mpImpl->mnScanlineStride >= 0;
-}
-
basegfx::B2IVector BitmapDevice::getBufferSize() const
{
return mpImpl->maBufferSize;
@@ -575,37 +457,6 @@ bool BitmapDevice::isSharedBuffer( const BitmapDeviceSharedPtr& rOther ) const
return rOther.get()->getBuffer().get() == getBuffer().get();
}
-void BitmapDevice::clear( Color fillColor )
-{
- clear_i( fillColor, mpImpl->maBounds );
-}
-
-void BitmapDevice::setPixel( const basegfx::B2IPoint& rPt,
- Color lineColor )
-{
- if( mpImpl->maBounds.isInside(rPt) )
- setPixel_i(rPt,lineColor);
-}
-
-void BitmapDevice::setPixel( const basegfx::B2IPoint& rPt,
- Color lineColor,
- const BitmapDeviceSharedPtr& rClip )
-{
- if( !rClip )
- {
- setPixel(rPt,lineColor);
- return;
- }
-
- if( mpImpl->maBounds.isInside(rPt) )
- {
- if( isCompatibleClipMask( rClip ) )
- setPixel_i(rPt,lineColor,rClip);
- else
- getGenericRenderer()->setPixel( rPt, lineColor, rClip );
- }
-}
-
Color BitmapDevice::getPixel( const basegfx::B2IPoint& rPt )
{
if( mpImpl->maBounds.isInside(rPt) )
@@ -863,7 +714,6 @@ BitmapDeviceSharedPtr createRenderer(
namespace
{
BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& rSize,
- bool bTopDown,
Format nScanlineFormat,
boost::shared_array< sal_uInt8 > pMem,
PaletteMemorySharedVector pPal,
@@ -886,9 +736,6 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector&
sal_Int32 nScanlineStride = getBitmapDeviceStrideForWidth(nScanlineFormat, rSize.getX());
- // factor in bottom-up scanline order case
- nScanlineStride *= bTopDown ? 1 : -1;
-
const sal_uInt32 nWidth(nScanlineStride < 0 ? -nScanlineStride : nScanlineStride);
const sal_uInt32 nHeight(rSize.getY());
@@ -1040,14 +887,13 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector&
}
BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& rSize,
- bool bTopDown,
Format nScanlineFormat,
boost::shared_array< sal_uInt8 > pMem,
PaletteMemorySharedVector pPal,
const basegfx::B2IBox* pSubset,
bool bBlack = true)
{
- BitmapDeviceSharedPtr result( createBitmapDeviceImplInner( rSize, bTopDown, nScanlineFormat, pMem, pPal, pSubset, bBlack ) );
+ BitmapDeviceSharedPtr result( createBitmapDeviceImplInner( rSize, nScanlineFormat, pMem, pPal, pSubset, bBlack ) );
#ifdef SAL_LOG_INFO
std::ostringstream subset;
@@ -1058,7 +904,6 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector&
SAL_INFO( "basebmp.bitmapdevice",
"createBitmapDevice: "
<< rSize.getX() << "x" << rSize.getY()
- << (bTopDown ? " top-down " : " bottom-up ")
<< subset.str()
<< " = " << result.get() );
#endif
@@ -1080,11 +925,9 @@ sal_Int32 getBitmapDeviceStrideForWidth(Format nScanlineFormat, sal_Int32 nWidth
}
BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
- bool bTopDown,
Format nScanlineFormat )
{
return createBitmapDeviceImpl( rSize,
- bTopDown,
nScanlineFormat,
boost::shared_array< sal_uInt8 >(),
PaletteMemorySharedVector(),
@@ -1092,12 +935,10 @@ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
}
BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
- bool bTopDown,
Format nScanlineFormat,
const PaletteMemorySharedVector& rPalette )
{
return createBitmapDeviceImpl( rSize,
- bTopDown,
nScanlineFormat,
boost::shared_array< sal_uInt8 >(),
rPalette,
@@ -1105,13 +946,11 @@ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize
}
BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
- bool bTopDown,
Format nScanlineFormat,
const RawMemorySharedArray& rMem,
const PaletteMemorySharedVector& rPalette )
{
return createBitmapDeviceImpl( rSize,
- bTopDown,
nScanlineFormat,
rMem,
rPalette,
@@ -1122,7 +961,6 @@ BitmapDeviceSharedPtr cloneBitmapDevice( const basegfx::B2IVector& rSize,
const BitmapDeviceSharedPtr& rProto )
{
return createBitmapDeviceImpl( rSize,
- rProto->isTopDown(),
rProto->getScanlineFormat(),
boost::shared_array< sal_uInt8 >(),
rProto->getPalette(),
diff --git a/basebmp/test/basictest.cxx b/basebmp/test/basictest.cxx
index 52ff735..05da4f5 100644
--- a/basebmp/test/basictest.cxx
+++ b/basebmp/test/basictest.cxx
@@ -110,12 +110,9 @@ public:
const basegfx::B2ISize aSize(101,101);
basegfx::B2ISize aSize2(aSize);
BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize,
- true,
Format::OneBitMsbPal ) );
CPPUNIT_ASSERT_EQUAL_MESSAGE("right size",
aSize2, pDevice->getSize() );
- CPPUNIT_ASSERT_MESSAGE("Top down format",
- pDevice->isTopDown() );
CPPUNIT_ASSERT_EQUAL_MESSAGE("Scanline format",
Format::OneBitMsbPal, pDevice->getScanlineFormat() );
sal_Int32 nExpectedStride = (aSize2.getY() + 7)/8;
@@ -136,7 +133,6 @@ public:
const basegfx::B2ISize aSize(101,101);
basegfx::B2ISize aSize2(3,3);
BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize,
- true,
Format::OneBitMsbPal ) );
BitmapDeviceSharedPtr pClone( cloneBitmapDevice(
@@ -146,178 +142,6 @@ public:
aSize2, pClone->getSize() );
}
- void testPixelFuncs()
- {
- // 1bpp
- const basegfx::B2ISize aSize(64,64);
- BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize,
- true,
- Format::OneBitMsbPal ) );
-
- const basegfx::B2IPoint aPt(3,3);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("getPixelData for virgin device",
- sal_uInt32(0), pDevice->getPixelData(aPt));
-
- const Color aCol(0xFFFFFFFF);
- pDevice->setPixel( aPt, aCol );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #1",
- aCol, pDevice->getPixel(aPt));
- CPPUNIT_ASSERT_EQUAL_MESSAGE("getPixelData for white pixel",
- sal_uInt32(1), pDevice->getPixelData(aPt));
-
- const basegfx::B2IPoint aPt2(0,0);
- const Color aCol2(0xFFFFFFFF);
- pDevice->setPixel( aPt2, aCol2 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #2",
- aCol2, pDevice->getPixel(aPt2));
-
- const basegfx::B2IPoint aPt3(aSize.getX()-1,aSize.getY()-1);
- const Color aCol3(0x00000000);
- pDevice->setPixel( aPt3, aCol3 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #3",
- aCol3, pDevice->getPixel(aPt3));
-
- pDevice->setPixel( aPt3, aCol2 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #3.5",
- aCol2, pDevice->getPixel(aPt3));
-
- const basegfx::B2IPoint aPt4(-100000,-100000);
- pDevice->setPixel( aPt4, aCol3 );
- const basegfx::B2IPoint aPt5(100000,100000);
- pDevice->setPixel( aPt5, aCol3 );
-
- auto nPixel(countPixel(pDevice, aCol2));
- const basegfx::B2IPoint aPt6(aSize.getX(),aSize.getY());
- pDevice->setPixel( aPt6, aCol2 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("setPixel clipping",
- nPixel, countPixel(pDevice, aCol2));
-
- CPPUNIT_ASSERT_EQUAL_MESSAGE("raw pixel value #1",
- sal_uInt8(0x80), pDevice->getBuffer()[0]);
-
- // 1bit LSB
- {
- pDevice = createBitmapDevice( aSize,
- true,
- Format::OneBitLsbPal );
-
- pDevice->setPixel( aPt2, aCol );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #4",
- aCol, pDevice->getPixel(aPt2));
-
- const basegfx::B2IPoint aPt222(1,1);
- pDevice->setPixel( aPt222, aCol );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #5",
- aCol, pDevice->getPixel(aPt222));
-
- pDevice->setPixel( aPt3, aCol );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #6",
- aCol, pDevice->getPixel(aPt3));
-
- CPPUNIT_ASSERT_EQUAL_MESSAGE("raw pixel value #2",
- sal_uInt8(0x01), pDevice->getBuffer()[0]);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("raw pixel value #3",
- sal_uInt8(0x02), pDevice->getBuffer()[8]);
- }
-
- // 8bit alpha
- {
- pDevice = createBitmapDevice( aSize,
- true,
- Format::EightBitGrey );
-
- const Color aCol4(0x010101);
- pDevice->setPixel( aPt, aCol4 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #4",
- aCol4, pDevice->getPixel(aPt));
-
- const Color aCol5(0x0F0F0F);
- pDevice->setPixel( aPt2, aCol5 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #5",
- aCol5, pDevice->getPixel(aPt2));
-
- const Color aCol6(0xFFFFFF);
- pDevice->setPixel( aPt3, aCol6 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #6",
- aCol6, pDevice->getPixel(aPt3));
- }
-
- // 16bpp
- {
- pDevice = createBitmapDevice( aSize,
- true,
- Format::SixteenBitLsbTcMask );
- const Color aCol7(0);
- pDevice->clear( aCol7 );
-
- const Color aCol4(0x00101010);
- pDevice->setPixel( aPt, aCol4 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #7",
- aCol4, pDevice->getPixel(aPt));
-
- const Color aCol5(0x00F0F0F0);
- pDevice->setPixel( aPt2, aCol5 );
- CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #8",
- pDevice->getPixel(aPt2) != aCol7);
-
- const Color aCol6(0x00FFFFFF);
- pDevice->setPixel( aPt3, aCol6 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #9",
- aCol6, pDevice->getPixel(aPt3));
- }
-
- // 24bpp
- {
- pDevice = createBitmapDevice( aSize,
- true,
- Format::TwentyFourBitTcMask );
-
- const Color aCol4(0x01010101);
- pDevice->setPixel( aPt, aCol4 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #10",
- aCol4, pDevice->getPixel(aPt));
-
- const Color aCol5(0x0F3F2F1F);
- pDevice->setPixel( aPt2, aCol5 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #11",
- aCol5, pDevice->getPixel(aPt2));
-
- const Color aCol6(0xFFFFFFFF);
- pDevice->setPixel( aPt3, aCol6 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #12",
- aCol6, pDevice->getPixel(aPt3));
-
- CPPUNIT_ASSERT_EQUAL_MESSAGE("raw pixel value #4",
- sal_uInt8(0x3F), pDevice->getBuffer()[2]);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("raw pixel value #4",
- sal_uInt8(0x2F), pDevice->getBuffer()[1]);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("raw pixel value #4",
- sal_uInt8(0x1F), pDevice->getBuffer()[0]);
- }
-
- // 32bpp
- {
- pDevice = createBitmapDevice( aSize,
- true,
- Format::ThirtyTwoBitTcMaskBGRA );
-
- const Color aCol4(0x01010101);
- pDevice->setPixel( aPt, aCol4 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #13",
- aCol4, pDevice->getPixel(aPt));
-
- const Color aCol5(0x0F0F0F0F);
- pDevice->setPixel( aPt2, aCol5 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #14",
- aCol5, pDevice->getPixel(aPt2));
-
- const Color aCol6(0xFFFFFFFF);
- pDevice->setPixel( aPt3, aCol6 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get/setPixel roundtrip #15",
- aCol6, pDevice->getPixel(aPt3));
- }
- }
-
// Change the following lines only, if you add, remove or rename
// member functions of the current class,
// because these macros are need by auto register mechanism.
@@ -326,7 +150,6 @@ public:
CPPUNIT_TEST(colorTest);
CPPUNIT_TEST(testConstruction);
CPPUNIT_TEST(testClone);
- CPPUNIT_TEST(testPixelFuncs);
CPPUNIT_TEST_SUITE_END();
};
diff --git a/include/basebmp/bitmapdevice.hxx b/include/basebmp/bitmapdevice.hxx
index 36ef6d8..16c89aa 100644
--- a/include/basebmp/bitmapdevice.hxx
+++ b/include/basebmp/bitmapdevice.hxx
@@ -64,15 +64,6 @@ public:
*/
basegfx::B2IVector getSize() const;
- /** Query whether buffer starts with 0th scanline
-
- @return true, if the buffer memory starts with the 0th
- scanline, and false if it starts with the last one. The latter
- is e.g. the typical scan line ordering for the Windows BMP
- format.
- */
- bool isTopDown() const;
-
/** Query the size of the whole frame buffer
@ return the size of the whole frame buffer, the same as
@@ -112,40 +103,6 @@ public:
/// Check if this and the other BitmapDevice share a buffer
bool isSharedBuffer( const BitmapDeviceSharedPtr& rOther ) const;
- /** Clear whole device with given color
-
- This method works like a fill with the given color value,
- resulting in a bitmap uniformly colored in fillColor.
- */
- void clear( Color fillColor );
-
- /** Set given pixel to specified color
-
- @param rPt
- Pixel to set
-
- @param pixelColor
- Color value to set the pixel to
- */
- void setPixel( const basegfx::B2IPoint& rPt,
- Color pixelColor );
-
- /** Set given pixel to specified color
-
- @param rPt
- Pixel to set
-
- @param pixelColor
- Color value to set the pixel to
-
- @param rClip
- Clip mask to use. If the clip mask is 1 at the given pixel
- position, no change will take place.
- */
- void setPixel( const basegfx::B2IPoint& rPt,
- Color pixelColor,
- const BitmapDeviceSharedPtr& rClip );
-
/** Get color value at given pixel
*/
Color getPixel( const basegfx::B2IPoint& rPt );
@@ -193,16 +150,6 @@ protected:
private:
BASEBMP_DLLPRIVATE virtual bool isCompatibleBitmap( const BitmapDeviceSharedPtr& bmp ) const = 0;
- BASEBMP_DLLPRIVATE virtual bool isCompatibleClipMask( const BitmapDeviceSharedPtr& bmp ) const = 0;
-
- BASEBMP_DLLPRIVATE virtual void clear_i( Color fillColor,
- const basegfx::B2IBox& rBounds ) = 0;
-
- BASEBMP_DLLPRIVATE virtual void setPixel_i( const basegfx::B2IPoint& rPt,
- Color lineColor) = 0;
- BASEBMP_DLLPRIVATE virtual void setPixel_i( const basegfx::B2IPoint& rPt,
- Color lineColor,
- const BitmapDeviceSharedPtr& rClip ) = 0;
BASEBMP_DLLPRIVATE virtual Color getPixel_i( const basegfx::B2IPoint& rPt ) = 0;
@@ -226,7 +173,6 @@ sal_Int32 BASEBMP_DLLPUBLIC getBitmapDeviceStrideForWidth(Format nScanlineFormat
/** Function to create a BitmapDevice for given scanline format
*/
BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVector& rSize,
- bool bTopDown,
Format nScanlineFormat );
/** Function to create a BitmapDevice for given scanline format
@@ -237,7 +183,6 @@ BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVe
format.
*/
BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVector& rSize,
- bool bTopDown,
Format nScanlineFormat,
const PaletteMemorySharedVector& rPalette );
@@ -248,7 +193,6 @@ BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVe
image of the specified area and format.
*/
BitmapDeviceSharedPtr BASEBMP_DLLPUBLIC createBitmapDevice( const basegfx::B2IVector& rSize,
- bool bTopDown,
Format nScanlineFormat,
const RawMemorySharedArray& rMem,
const PaletteMemorySharedVector& rPalette );
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index 3b93e59..6ef5684 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -51,7 +51,7 @@ bool SvpSalBitmap::Create( const Size& rSize,
if( aSize.getY() == 0 )
aSize.setY( 1 );
if( nBitCount > 8 )
- m_aBitmap = createBitmapDevice( aSize, true, nFormat );
+ m_aBitmap = createBitmapDevice(aSize, nFormat);
else
{
// prepare palette
@@ -64,10 +64,9 @@ bool SvpSalBitmap::Create( const Size& rSize,
const BitmapColor& rCol = rPalette[i];
(*pPalette)[i] = basebmp::Color( rCol.GetRed(), rCol.GetGreen(), rCol.GetBlue() );
}
- m_aBitmap = createBitmapDevice( aSize, true, nFormat,
+ m_aBitmap = createBitmapDevice( aSize, nFormat,
basebmp::RawMemorySharedArray(),
- basebmp::PaletteMemorySharedVector( pPalette )
- );
+ basebmp::PaletteMemorySharedVector(pPalette) );
}
return true;
}
@@ -260,8 +259,8 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode )
pBuf->mnFormat = BMP_FORMAT_1BIT_MSB_PAL;
break;
}
- if( m_aBitmap->isTopDown() )
- pBuf->mnFormat |= BMP_FORMAT_TOP_DOWN;
+
+ pBuf->mnFormat |= BMP_FORMAT_TOP_DOWN;
B2IVector aSize = m_aBitmap->getSize();
pBuf->mnWidth = aSize.getX();
@@ -357,7 +356,6 @@ void SvpSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode
}
m_aBitmap = basebmp::createBitmapDevice( m_aBitmap->getSize(),
- m_aBitmap->isTopDown(),
m_aBitmap->getScanlineFormat(),
m_aBitmap->getBuffer(),
pPal );
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index fa553b4..390ed8f 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1079,7 +1079,7 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeight )
{
basegfx::B2IVector aSize(nWidth, nHeight);
- basebmp::BitmapDeviceSharedPtr aCopy = createBitmapDevice(aSize, true, SVP_CAIRO_FORMAT);
+ basebmp::BitmapDeviceSharedPtr aCopy = createBitmapDevice(aSize, SVP_CAIRO_FORMAT);
cairo_surface_t* target = SvpSalGraphics::createCairoSurface(aCopy);
cairo_t* cr = cairo_create(target);
commit bd25d89b7e6daf2a050d7f7ad996af2f083daca0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 18 17:13:37 2016 +0000
only using one of the drawBitmap impls now
Change-Id: Ice2d2f8b565bfac6079a2d58c0d25f0352524b71
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index 8228f2d..c167376 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -455,55 +455,6 @@ namespace
maAccessor);
}
}
-
- virtual void drawBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IBox& rSrcRect,
- const basegfx::B2IBox& rDstRect,
- const BitmapDeviceSharedPtr& rClip ) override
- {
- if( isCompatibleBitmap( rSrcBitmap ) )
- {
- implDrawBitmap(rSrcBitmap, rSrcRect, rDstRect,
- getMaskedIter(rClip),
- maRawMaskedAccessor);
- }
- else
- {
- implDrawBitmapGeneric(rSrcBitmap, rSrcRect, rDstRect,
- getMaskedIter(rClip),
- maMaskedAccessor);
- }
- }
-
- template< typename Iterator, typename Acc >
- void implDrawMaskedBitmap(const BitmapDeviceSharedPtr& rSrcBitmap,
- const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IBox& rSrcRect,
- const basegfx::B2IBox& rDstRect,
- const Iterator& begin,
- const Acc& acc)
- {
- std::shared_ptr<BitmapRenderer> pSrcBmp( getCompatibleBitmap(rSrcBitmap) );
- std::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rMask) );
- OSL_ASSERT( pMask && pSrcBmp );
-
- scaleImage(
- srcIterRange(composite_iterator_type(
- pSrcBmp->maBegin,
- pMask->maBegin),
- joined_image_accessor_type(
- pSrcBmp->maAccessor,
- pMask->maRawAccessor),
- rSrcRect),
- destIterRange(begin,
- typename masked_input_splitting_accessor<
- Acc,
- joined_image_accessor_type,
- Masks::clipmask_polarity,
- FastMask >::type(acc),
- rDstRect),
- isSharedBuffer(rSrcBitmap));
- }
};
} // namespace
@@ -782,42 +733,6 @@ void BitmapDevice::drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
}
}
-void BitmapDevice::drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IBox& rSrcRect,
- const basegfx::B2IBox& rDstRect,
- const BitmapDeviceSharedPtr& rClip )
-{
- if( !rClip )
- {
- drawBitmap(rSrcBitmap,rSrcRect,rDstRect);
- return;
- }
-
- const basegfx::B2IVector& rSrcSize( rSrcBitmap->getSize() );
- const basegfx::B2IBox aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
- basegfx::B2IBox aSrcRange( rSrcRect );
- basegfx::B2IBox aDestRange( rDstRect );
-
- if( clipAreaImpl( aDestRange,
- aSrcRange,
- mpImpl->maBounds,
- aSrcBounds ))
- {
- assertImageRange(aDestRange,mpImpl->maBounds);
- assertImageRange(aSrcRange,aSrcBounds);
-
- if( isCompatibleClipMask( rClip ) )
- {
- drawBitmap_i( rSrcBitmap, aSrcRange, aDestRange, rClip );
- }
- else
- {
- getGenericRenderer()->drawBitmap( rSrcBitmap, rSrcRect,
- rDstRect, rClip );
- }
- }
-}
-
/** Standard clip and alpha masks
*/
struct StdMasks
diff --git a/include/basebmp/bitmapdevice.hxx b/include/basebmp/bitmapdevice.hxx
index 38b75dc..36ef6d8 100644
--- a/include/basebmp/bitmapdevice.hxx
+++ b/include/basebmp/bitmapdevice.hxx
@@ -179,32 +179,6 @@ public:
const basegfx::B2IBox& rSrcRect,
const basegfx::B2IBox& rDstRect );
- /** Draw another bitmap into this device
-
- @param rSrcBitmap
- Bitmap to render into this one. It is permitted that source
- and destination bitmap are the same.
-
- @param rSrcRect
- Rectangle within the source bitmap to take the pixel from.
-
- @param rDstRect
- Rectangle in the destination bitmap to put the pixel
- into. Source and destination rectangle are permitted to have
- differing sizes; this method will scale the source pixel
- accordingly. Please note that both source and destination
- rectangle are interpreted excluding the rightmost pixel column
- and the bottommost pixel row.
-
- @param rClip
- Clip mask to use. Pixel where the corresponding clip mask
- pixel is 1 will not be modified.
- */
- void drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IBox& rSrcRect,
- const basegfx::B2IBox& rDstRect,
- const BitmapDeviceSharedPtr& rClip );
-
protected:
BASEBMP_DLLPRIVATE BitmapDevice( const basegfx::B2IBox& rBounds,
const basegfx::B2IVector& rBufferSize,
@@ -238,10 +212,6 @@ private:
BASEBMP_DLLPRIVATE virtual void drawBitmap_i( const BitmapDeviceSharedPtr& rSrcBitmap,
const basegfx::B2IBox& rSrcRect,
const basegfx::B2IBox& rDstRect ) = 0;
- BASEBMP_DLLPRIVATE virtual void drawBitmap_i( const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IBox& rSrcRect,
- const basegfx::B2IBox& rDstRect,
- const BitmapDeviceSharedPtr& rClip ) = 0;
BitmapDeviceSharedPtr getGenericRenderer() const;
commit 4a9b867ce3e2a4f116f2dc7f21e4246aa0613baa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 18 17:05:17 2016 +0000
svp: use SalColor instead of basebmp::Color
Change-Id: I611dad8d218f5b82903743cb15a5c2a36cc6ba5d
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index d5a301f..fa553b4 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -357,24 +357,24 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
cairo_rectangle(cr, nX, nY, nWidth, nHeight);
- if (m_bUseFillColor)
+ if (m_aFillColor != SALCOLOR_NONE)
{
- cairo_set_source_rgba(cr, m_aFillColor.getRed()/255.0,
- m_aFillColor.getGreen()/255.0,
- m_aFillColor.getBlue()/255.0,
+ cairo_set_source_rgba(cr, SALCOLOR_RED(m_aFillColor)/255.0,
+ SALCOLOR_GREEN(m_aFillColor)/255.0,
+ SALCOLOR_BLUE(m_aFillColor)/255.0,
fTransparency);
- if (!m_bUseLineColor)
+ if (m_aLineColor == SALCOLOR_NONE)
extents = getFillDamage(cr);
cairo_fill_preserve(cr);
}
- if (m_bUseLineColor)
+ if (m_aLineColor != SALCOLOR_NONE)
{
- cairo_set_source_rgba(cr, m_aLineColor.getRed()/255.0,
- m_aLineColor.getGreen()/255.0,
- m_aLineColor.getBlue()/255.0,
+ cairo_set_source_rgba(cr, SALCOLOR_RED(m_aLineColor)/255.0,
+ SALCOLOR_GREEN(m_aLineColor)/255.0,
+ SALCOLOR_BLUE(m_aLineColor)/255.0,
fTransparency);
extents = getStrokeDamage(cr);
@@ -387,14 +387,12 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
return true;
}
-SvpSalGraphics::SvpSalGraphics() :
- m_pSurface( nullptr ),
- m_bUseLineColor( true ),
- m_aLineColor( COL_BLACK ),
- m_bUseFillColor( false ),
- m_aFillColor( COL_WHITE ),
- m_ePaintMode( OVERPAINT ),
- m_aTextRenderImpl(*this)
+SvpSalGraphics::SvpSalGraphics()
+ : m_pSurface(nullptr)
+ , m_aLineColor(MAKE_SALCOLOR(0x00, 0x00, 0x00))
+ , m_aFillColor(MAKE_SALCOLOR(0xFF, 0xFF, 0XFF))
+ , m_ePaintMode(OVERPAINT)
+ , m_aTextRenderImpl(*this)
{
}
@@ -440,24 +438,22 @@ bool SvpSalGraphics::setClipRegion( const vcl::Region& i_rClip )
void SvpSalGraphics::SetLineColor()
{
- m_bUseLineColor = false;
+ m_aLineColor = SALCOLOR_NONE;
}
void SvpSalGraphics::SetLineColor( SalColor nSalColor )
{
- m_bUseLineColor = true;
- m_aLineColor = basebmp::Color( nSalColor );
+ m_aLineColor = nSalColor;
}
void SvpSalGraphics::SetFillColor()
{
- m_bUseFillColor = false;
+ m_aFillColor = SALCOLOR_NONE;
}
void SvpSalGraphics::SetFillColor( SalColor nSalColor )
{
- m_bUseFillColor = true;
- m_aFillColor = basebmp::Color( nSalColor );
+ m_aFillColor = nSalColor;
}
void SvpSalGraphics::SetXORMode(bool bSet, bool bInvert)
@@ -467,90 +463,86 @@ void SvpSalGraphics::SetXORMode(bool bSet, bool bInvert)
void SvpSalGraphics::SetROPLineColor( SalROPColor nROPColor )
{
- m_bUseLineColor = true;
switch( nROPColor )
{
case SAL_ROP_0:
- m_aLineColor = basebmp::Color( 0 );
+ m_aLineColor = MAKE_SALCOLOR(0, 0, 0);
break;
case SAL_ROP_1:
- m_aLineColor = basebmp::Color( 0xffffff );
+ m_aLineColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
break;
case SAL_ROP_INVERT:
- m_aLineColor = basebmp::Color( 0xffffff );
+ m_aLineColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
break;
}
}
void SvpSalGraphics::SetROPFillColor( SalROPColor nROPColor )
{
- m_bUseFillColor = true;
switch( nROPColor )
{
case SAL_ROP_0:
- m_aFillColor = basebmp::Color( 0 );
+ m_aFillColor = MAKE_SALCOLOR(0, 0, 0);
break;
case SAL_ROP_1:
- m_aFillColor = basebmp::Color( 0xffffff );
+ m_aFillColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
break;
case SAL_ROP_INVERT:
- m_aFillColor = basebmp::Color( 0xffffff );
+ m_aFillColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
break;
}
}
void SvpSalGraphics::drawPixel( long nX, long nY )
{
- if( m_bUseLineColor )
+ if (m_aLineColor != SALCOLOR_NONE)
{
- drawPixel(nX, nY, m_aLineColor.toInt32());
+ drawPixel(nX, nY, m_aLineColor);
}
}
void SvpSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
{
- basebmp::Color aOrigFillColor = m_aFillColor;
- bool bOrigUseFillColor = m_bUseFillColor;
- bool bOrigUseLineColor = m_bUseLineColor;
+ SalColor aOrigFillColor = m_aFillColor;
+ SalColor aOrigLineColor = m_aLineColor;
basegfx::B2DPolygon aRect = basegfx::tools::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+1, nY+1));
- m_bUseLineColor = false;
- m_bUseFillColor = true;
- m_aFillColor = basebmp::Color(nSalColor);
+ m_aLineColor = SALCOLOR_NONE;
+ m_aFillColor = nSalColor;
+
drawPolyPolygon(basegfx::B2DPolyPolygon(aRect));
- m_bUseFillColor = bOrigUseFillColor;
- m_bUseLineColor = bOrigUseLineColor;
m_aFillColor = aOrigFillColor;
+ m_aLineColor = aOrigLineColor;
}
void SvpSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
{
// because of the -1 hack we have to do fill and draw separately
- bool bOrigUseFillColor = m_bUseFillColor;
- bool bOrigUseLineColor = m_bUseLineColor;
- m_bUseFillColor = false;
- m_bUseLineColor = false;
+ SalColor aOrigFillColor = m_aFillColor;
+ SalColor aOrigLineColor = m_aLineColor;
+ m_aFillColor = SALCOLOR_NONE;
+ m_aLineColor = SALCOLOR_NONE;
- if (bOrigUseFillColor)
+ if (aOrigFillColor != SALCOLOR_NONE)
{
basegfx::B2DPolygon aRect = basegfx::tools::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+nWidth, nY+nHeight));
- m_bUseFillColor = true;
+ m_aFillColor = aOrigFillColor;
drawPolyPolygon(basegfx::B2DPolyPolygon(aRect));
- m_bUseFillColor = false;
+ m_aFillColor = SALCOLOR_NONE;
}
- if (bOrigUseLineColor)
+ if (aOrigLineColor != SALCOLOR_NONE)
{
// need same -1 hack as X11SalGraphicsImpl::drawRect
basegfx::B2DPolygon aRect = basegfx::tools::createPolygonFromRect(basegfx::B2DRectangle( nX, nY, nX+nWidth-1, nY+nHeight-1));
- m_bUseLineColor = true;
+ m_aLineColor = aOrigLineColor;
drawPolyPolygon(basegfx::B2DPolyPolygon(aRect));
- m_bUseLineColor = false;
+ m_aLineColor = SALCOLOR_NONE;
}
- m_bUseFillColor = bOrigUseFillColor;
- m_bUseLineColor = bOrigUseLineColor;
+ m_aFillColor = aOrigFillColor;
+ m_aLineColor = aOrigLineColor;
}
void SvpSalGraphics::drawPolyLine(sal_uInt32 nPoints, const SalPoint* pPtAry)
@@ -778,9 +770,9 @@ bool SvpSalGraphics::drawPolyLine(
AddPolygonToPath(cr, rPolyLine, rPolyLine.isClosed(), !getAntiAliasB2DDraw(), true);
- cairo_set_source_rgba(cr, m_aLineColor.getRed()/255.0,
- m_aLineColor.getGreen()/255.0,
- m_aLineColor.getBlue()/255.0,
+ cairo_set_source_rgba(cr, SALCOLOR_RED(m_aLineColor)/255.0,
+ SALCOLOR_GREEN(m_aLineColor)/255.0,
+ SALCOLOR_BLUE(m_aLineColor)/255.0,
1.0-fTransparency);
cairo_set_line_join(cr, eCairoLineJoin);
@@ -826,7 +818,7 @@ void SvpSalGraphics::setupPolyPolygon(cairo_t* cr, const basegfx::B2DPolyPolygon
clipRegion(cr);
for (const basegfx::B2DPolygon* pPoly = rPolyPoly.begin(); pPoly != rPolyPoly.end(); ++pPoly)
- AddPolygonToPath(cr, *pPoly, true, !getAntiAliasB2DDraw(), m_bUseLineColor);
+ AddPolygonToPath(cr, *pPoly, true, !getAntiAliasB2DDraw(), m_aLineColor != SALCOLOR_NONE);
}
bool SvpSalGraphics::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly, double fTransparency)
@@ -837,24 +829,24 @@ bool SvpSalGraphics::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly, d
cairo_rectangle_int_t extents = {0, 0, 0, 0};
- if (m_bUseFillColor)
+ if (m_aFillColor != SALCOLOR_NONE)
{
- cairo_set_source_rgba(cr, m_aFillColor.getRed()/255.0,
- m_aFillColor.getGreen()/255.0,
- m_aFillColor.getBlue()/255.0,
+ cairo_set_source_rgba(cr, SALCOLOR_RED(m_aFillColor)/255.0,
+ SALCOLOR_GREEN(m_aFillColor)/255.0,
+ SALCOLOR_BLUE(m_aFillColor)/255.0,
1.0-fTransparency);
- if (!m_bUseLineColor)
+ if (m_aLineColor == SALCOLOR_NONE)
extents = getFillDamage(cr);
cairo_fill_preserve(cr);
}
- if (m_bUseLineColor)
+ if (m_aLineColor != SALCOLOR_NONE)
{
- cairo_set_source_rgba(cr, m_aLineColor.getRed()/255.0,
- m_aLineColor.getGreen()/255.0,
- m_aLineColor.getBlue()/255.0,
+ cairo_set_source_rgba(cr, SALCOLOR_RED(m_aLineColor)/255.0,
+ SALCOLOR_GREEN(m_aLineColor)/255.0,
+ SALCOLOR_BLUE(m_aLineColor)/255.0,
1.0-fTransparency);
extents = getStrokeDamage(cr);
@@ -867,18 +859,18 @@ bool SvpSalGraphics::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly, d
return true;
}
-void SvpSalGraphics::applyColor(cairo_t *cr, const basebmp::Color &rColor)
+void SvpSalGraphics::applyColor(cairo_t *cr, const SalColor &rColor)
{
if (CAIRO_FORMAT_ARGB32 == cairo_image_surface_get_format(m_pSurface))
{
- cairo_set_source_rgba(cr, rColor.getRed()/255.0,
- rColor.getGreen()/255.0,
- rColor.getBlue()/255.0,
+ cairo_set_source_rgba(cr, SALCOLOR_RED(rColor)/255.0,
+ SALCOLOR_GREEN(rColor)/255.0,
+ SALCOLOR_BLUE(rColor)/255.0,
1.0);
}
else
{
- double fSet = rColor.toInt32() == COL_BLACK ? 0.0 : 1.0;
+ double fSet = rColor == COL_BLACK ? 0.0 : 1.0;
cairo_set_source_rgba(cr, 1, 1, 1, fSet);
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
}
@@ -892,15 +884,15 @@ void SvpSalGraphics::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly)
cairo_rectangle_int_t extents = {0, 0, 0, 0};
- if (m_bUseFillColor)
+ if (m_aFillColor != SALCOLOR_NONE)
{
applyColor(cr, m_aFillColor);
- if (!m_bUseLineColor)
+ if (m_aLineColor == SALCOLOR_NONE)
extents = getFillDamage(cr);
cairo_fill_preserve(cr);
}
- if (m_bUseLineColor)
+ if (m_aLineColor != SALCOLOR_NONE)
{
applyColor(cr, m_aLineColor);
extents = getStrokeDamage(cr);
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index e2acbd9..1cece1a 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_VCL_INC_HEADLESS_SVPGDI_HXX
#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/color.hxx>
#include <vcl/sysdata.hxx>
#include <vcl/metric.hxx>
#include <config_cairo_canvas.h>
@@ -66,14 +65,10 @@ struct VCL_DLLPUBLIC DamageHandler
class VCL_DLLPUBLIC SvpSalGraphics : public SalGraphics
{
- cairo_surface_t* m_pSurface;
-
- bool m_bUseLineColor;
- basebmp::Color m_aLineColor;
- bool m_bUseFillColor;
- basebmp::Color m_aFillColor;
-
- PaintMode m_ePaintMode;
+ cairo_surface_t* m_pSurface;
+ SalColor m_aLineColor;
+ SalColor m_aFillColor;
+ PaintMode m_ePaintMode;
public:
static GlyphCache& getPlatformGlyphCache();
@@ -84,7 +79,7 @@ private:
void invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags);
void copySource(const SalTwoRect& rTR, cairo_surface_t* source);
void setupPolyPolygon(cairo_t* cr, const basegfx::B2DPolyPolygon& rPolyPoly);
- void applyColor(cairo_t *cr, const basebmp::Color &rColor);
+ void applyColor(cairo_t *cr, const SalColor &rColor);
void drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly);
protected:
vcl::Region m_aClipRegion;
commit 413fdec1a6d6b42b9a58da45f327c330352318bb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 18 16:44:42 2016 +0000
drop unused basebmp debug file
Change-Id: I96378ef283cc94e7b9b0a9d73a43beda30028447
diff --git a/basebmp/Library_basebmp.mk b/basebmp/Library_basebmp.mk
index 3523ddf..62822cb 100644
--- a/basebmp/Library_basebmp.mk
+++ b/basebmp/Library_basebmp.mk
@@ -48,7 +48,6 @@ endif
$(eval $(call gb_Library_add_exception_objects,basebmp,\
basebmp/source/bitmapdevice \
- basebmp/source/debug \
))
# vim: set noet sw=4 ts=4:
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index 1e70d13..8228f2d 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -177,8 +177,6 @@ namespace
typedef AccessorTraits< dest_accessor_type > accessor_traits;
typedef CompositeIterator2D< dest_iterator_type,
mask_iterator_type > composite_iterator_type;
- typedef CompositeIterator2D< vigra::Diff2D,
- vigra::Diff2D > generic_composite_iterator_type;
typedef BitmapRenderer<mask_iterator_type,
mask_rawaccessor_type,
@@ -506,40 +504,6 @@ namespace
rDstRect),
isSharedBuffer(rSrcBitmap));
}
-
- template< typename Iterator, typename Acc >
- void implDrawMaskedBitmapGeneric(const BitmapDeviceSharedPtr& rSrcBitmap,
- const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IBox& rSrcRect,
- const basegfx::B2IBox& rDstRect,
- const Iterator& begin,
- const Acc& acc)
- {
- GenericColorImageAccessor aSrcAcc( rSrcBitmap );
- GenericColorImageAccessor aMaskAcc( rMask );
-
- const vigra::Diff2D aTopLeft(rSrcRect.getMinX(),
- rSrcRect.getMinY());
- const vigra::Diff2D aBottomRight(rSrcRect.getMaxX(),
- rSrcRect.getMaxY());
- scaleImage(
- vigra::make_triple(
- generic_composite_iterator_type(
- aTopLeft,aTopLeft),
- generic_composite_iterator_type(
- aBottomRight,aBottomRight),
- joined_generic_image_accessor_type(
- aSrcAcc,
- aMaskAcc)),
- destIterRange(begin,
- typename masked_input_splitting_accessor<
- Acc,
- joined_generic_image_accessor_type,
- Masks::clipmask_polarity,
- NoFastMask >::type(acc),
- rDstRect));
- }
-
};
} // namespace
@@ -1180,7 +1144,6 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector&
"createBitmapDevice: "
<< rSize.getX() << "x" << rSize.getY()
<< (bTopDown ? " top-down " : " bottom-up ")
- << formatName(nScanlineFormat)
<< subset.str()
<< " = " << result.get() );
#endif
diff --git a/basebmp/source/debug.cxx b/basebmp/source/debug.cxx
deleted file mode 100644
index f01fd39..0000000
--- a/basebmp/source/debug.cxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <osl/diagnose.h>
-
-#include <basegfx/point/b2ipoint.hxx>
-#include <basegfx/vector/b2ivector.hxx>
-
-#include <basebmp/scanlineformats.hxx>
-#include <basebmp/color.hxx>
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/debug.hxx>
-
-#include <iomanip>
-
-namespace basebmp
-{
- const char* formatName( Format nScanlineFormat )
- {
- switch( nScanlineFormat )
- {
- case Format::NONE:
- return "NONE";
- case Format::OneBitMsbGrey:
- return "ONE_BIT_MSB_GREY";
- case Format::OneBitLsbGrey:
- return "ONE_BIT_LSB_GREY";
- case Format::OneBitMsbPal:
- return "ONE_BIT_MSB_PAL";
- case Format::OneBitLsbPal:
- return "ONE_BIT_LSB_PAL";
- case Format::FourBitMsbGrey:
- return "FOUR_BIT_MSB_GREY";
- case Format::FourBitLsbGrey:
- return "FOUR_BIT_LSB_GREY";
- case Format::FourBitMsbPal:
- return "FOUR_BIT_MSB_PAL";
- case Format::FourBitLsbPal:
- return "FOUR_BIT_LSB_PAL";
- case Format::EightBitPal:
- return "EIGHT_BIT_PAL";
- case Format::EightBitGrey:
- return "EIGHT_BIT_GREY";
- case Format::SixteenBitLsbTcMask:
- return "SIXTEEN_BIT_LSB_TC_MASK";
- case Format::SixteenBitMsbTcMask:
- return "SIXTEEN_BIT_MSB_TC_MASK";
- case Format::TwentyFourBitTcMask:
- return "TWENTYFOUR_BIT_TC_MASK";
- case Format::ThirtyTwoBitTcMaskBGRA:
- return "THIRTYTWO_BIT_TC_MASK_BGRA";
- case Format::ThirtyTwoBitTcMaskARGB:
- return "THIRTYTWO_BIT_TC_MASK_ARGB";
- case Format::ThirtyTwoBitTcMaskABGR:
- return "THIRTYTWO_BIT_TC_MASK_ABGR";
- case Format::ThirtyTwoBitTcMaskRGBA:
- return "THIRTYTWO_BIT_TC_MASK_RGBA";
- default:
- return "<unknown>";
- }
- }
-
-#if OSL_DEBUG_LEVEL > 2
-
- void debugDump( const BitmapDeviceSharedPtr& rDevice,
- std::ostream& rOutputStream )
- {
- const basegfx::B2IVector aSize( rDevice->getSize() );
- const bool bTopDown( rDevice->isTopDown() );
- const Format nScanlineFormat( rDevice->getScanlineFormat() );
-
- rOutputStream
- << "/* basebmp::BitmapDevice content dump */" << std::endl
- << "/* Width = " << aSize.getX() << " */" << std::endl
- << "/* Height = " << aSize.getY() << " */" << std::endl
- << "/* TopDown = " << bTopDown << " */" << std::endl
- << "/* Format = " << formatName(nScanlineFormat) << " */" << std::endl
- << "/* (dumped entries are already mapped RGBA color values) */" << std::endl
- << std::endl;
-
- rOutputStream << std::hex;
- for( int y=0; y<aSize.getY(); ++y )
- {
- for( int x=0; x<aSize.getX(); ++x )
- rOutputStream << std::setw(8) << (sal_uInt32)rDevice->getPixel( basegfx::B2IPoint(x,y) ).toInt32() << " ";
- rOutputStream << std::endl;
- }
- }
-
-#endif // OSL_DEBUG_LEVEL > 2
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/basebmp/debug.hxx b/include/basebmp/debug.hxx
deleted file mode 100644
index c99f764..0000000
--- a/include/basebmp/debug.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_BASEBMP_DEBUG_HXX
-#define INCLUDED_BASEBMP_DEBUG_HXX
-
-#include <iostream>
-#include <memory>
-#include <basebmp/basebmpdllapi.h>
-
-namespace basebmp
-{
- class BitmapDevice;
-
- /** Dump content of BitmapDevice to given output stream.
-
- @param rDevice
- Device whose content should be dumped.
-
- @param rOutputStream
- Stream to write output to.
-
- Used in vcl/headless/svpgdi.cxx when OSL_DEBUG_LEVEL > 2
-
- Use like this:
-<pre>
- #include <basebmp/debug.hxx>
- #include <iostream>
- #include <fstream>
-
- std::ofstream output("/tmp/my_test.dump");
- debugDump( pMyDevice, output );
-</pre>
- */
- void BASEBMP_DLLPUBLIC debugDump( const std::shared_ptr< BitmapDevice >& rDevice,
- ::std::ostream& rOutputStream );
-}
-
-#endif /* INCLUDED_BASEBMP_DEBUG_HXX */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 6fe8925305dffd2e1d496319f73ef6602363ef7b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 18 16:36:34 2016 +0000
basebmp now only used from vcl/headless code
Change-Id: I068d404431d3565f6ad5741edbd3693225824a4d
diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx
index f563fd9..7382085 100644
--- a/basctl/inc/pch/precompiled_basctl.hxx
+++ b/basctl/inc/pch/precompiled_basctl.hxx
@@ -184,9 +184,6 @@
#include <vcl/wall.hxx>
#include <vcl/window.hxx>
#include <vcl/xtextedt.hxx>
-#include <basebmp/basebmpdllapi.h>
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
#include <basegfx/color/bcolormodifier.hxx>
diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx
index dddbe22..ee9952a 100644
--- a/chart2/inc/pch/precompiled_chartcontroller.hxx
+++ b/chart2/inc/pch/precompiled_chartcontroller.hxx
@@ -174,9 +174,6 @@
#include <vcl/wall.hxx>
#include <vcl/window.hxx>
#include <ChartModel.hxx>
-#include <basebmp/basebmpdllapi.h>
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
#include <basegfx/color/bcolormodifier.hxx>
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index 365786a..6885b90 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -177,9 +177,6 @@
#include <vcl/virdev.hxx>
#include <vcl/wall.hxx>
#include <vcl/window.hxx>
-#include <basebmp/basebmpdllapi.h>
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
#include <basegfx/color/bcolormodifier.hxx>
diff --git a/desktop/CppunitTest_desktop_lib.mk b/desktop/CppunitTest_desktop_lib.mk
index 2119e15..c7aee9d 100644
--- a/desktop/CppunitTest_desktop_lib.mk
+++ b/desktop/CppunitTest_desktop_lib.mk
@@ -16,7 +16,6 @@ $(eval $(call gb_CppunitTest_add_exception_objects,desktop_lib, \
))
$(eval $(call gb_CppunitTest_use_libraries,desktop_lib, \
- basebmp \
comphelper \
cppu \
cppuhelper \
@@ -32,7 +31,10 @@ $(eval $(call gb_CppunitTest_use_libraries,desktop_lib, \
$(gb_UWINAPI) \
))
-$(eval $(call gb_CppunitTest_use_external,desktop_lib,boost_headers))
+$(eval $(call gb_CppunitTest_use_externals,desktop_lib, \
+ boost_headers \
+ cairo \
+))
$(eval $(call gb_CppunitTest_use_api,desktop_lib,\
offapi \
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index ef95ecf..6062da8 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -41,7 +41,6 @@ $(eval $(call gb_Library_add_defs,sofficeapp,\
$(eval $(call gb_Library_set_precompiled_header,sofficeapp,$(SRCDIR)/desktop/inc/pch/precompiled_sofficeapp))
$(eval $(call gb_Library_use_libraries,sofficeapp,\
- $(if $(filter $(OS),ANDROID),,basebmp) \
comphelper \
cppu \
cppuhelper \
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index f069595..01657b9 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -14,7 +14,6 @@
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/awt/XReschedule.hpp>
#include <com/sun/star/awt/Toolkit.hpp>
-#include <basebmp/bitmapdevice.hxx>
#include <boost/property_tree/json_parser.hpp>
#include <comphelper/processfactory.hxx>
#include <sfx2/objsh.hxx>
@@ -27,6 +26,7 @@
#include <svl/srchitem.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <unotools/tempfile.hxx>
+#include <cairo.h>
#include "../../inc/lib/init.hxx"
@@ -351,8 +351,7 @@ void DesktopLOKTest::testPaintTile()
LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
int nCanvasWidth = 100;
int nCanvasHeight = 300;
- sal_Int32 nStride = basebmp::getBitmapDeviceStrideForWidth(basebmp::Format::ThirtyTwoBitTcMaskBGRA,
- nCanvasWidth);
+ sal_Int32 nStride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, nCanvasWidth);
std::vector<unsigned char> aBuffer(nStride * nCanvasHeight);
int nTilePosX = 0;
int nTilePosY = 0;
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f58d8a0..28a5442 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -103,7 +103,7 @@ typedef struct
// We need a shared_array for passing into the BitmapDevice (via
// VirtualDevice.SetOutputSizePixelScaleOffsetAndBuffer which goes via the
-// SvpVirtualDevice, ending up in the basebmp BitmapDevice. However as we're
+// SvpVirtualDevice, ending up in the cairo surface. However as we're
// given the array externally we can't delete it, and hence need to override
// shared_array's default of deleting its pointer.
template<typename T>
diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx
index 4f29f1b..afc4ed0 100644
--- a/editeng/inc/pch/precompiled_editeng.hxx
+++ b/editeng/inc/pch/precompiled_editeng.hxx
@@ -129,9 +129,6 @@
#include <vcl/vclptr.hxx>
#include <vcl/window.hxx>
#include <vcl/wrkwin.hxx>
-#include <basebmp/basebmpdllapi.h>
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
#include <basegfx/color/bcolormodifier.hxx>
diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx
index f31bc4e..b0b960e 100644
--- a/include/vcl/virdev.hxx
+++ b/include/vcl/virdev.hxx
@@ -20,10 +20,10 @@
#ifndef INCLUDED_VCL_VIRDEV_HXX
#define INCLUDED_VCL_VIRDEV_HXX
-#include <basebmp/bitmapdevice.hxx>
#include <vcl/dllapi.h>
#include <vcl/salgtype.hxx>
#include <vcl/outdev.hxx>
+#include <boost/shared_array.hpp>
class SalVirtualDevice;
struct SystemGraphicsData;
@@ -46,9 +46,9 @@ private:
SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr );
SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
- const basebmp::RawMemorySharedArray &pBuffer );
+ const boost::shared_array<sal_uInt8> &pBuffer );
SAL_DLLPRIVATE bool ImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
- const basebmp::RawMemorySharedArray &pBuffer );
+ const boost::shared_array<sal_uInt8> &pBuffer );
VirtualDevice (const VirtualDevice &) = delete;
VirtualDevice & operator= (const VirtualDevice &) = delete;
@@ -126,7 +126,7 @@ public:
bool SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNewSize,
const Fraction& rScale,
const Point& rNewOffset,
- const basebmp::RawMemorySharedArray &pBuffer );
+ const boost::shared_array<sal_uInt8> &pBuffer );
bool SetOutputSize( const Size& rNewSize, bool bErase = true )
{ return SetOutputSizePixel( LogicToPixel( rNewSize ), bErase ); }
diff --git a/reportdesign/inc/pch/precompiled_rptui.hxx b/reportdesign/inc/pch/precompiled_rptui.hxx
index 12fb034..8b52be9 100644
--- a/reportdesign/inc/pch/precompiled_rptui.hxx
+++ b/reportdesign/inc/pch/precompiled_rptui.hxx
@@ -192,9 +192,6 @@
#include <RptObject.hxx>
#include <RptPage.hxx>
#include <UndoActions.hxx>
-#include <basebmp/basebmpdllapi.h>
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
#include <basegfx/color/bcolormodifier.hxx>
diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx
index cca93ad..c8182d0 100644
--- a/sd/inc/pch/precompiled_sdui.hxx
+++ b/sd/inc/pch/precompiled_sdui.hxx
@@ -185,9 +185,6 @@
#include <vcl/virdev.hxx>
#include <vcl/wall.hxx>
#include <vcl/window.hxx>
-#include <basebmp/basebmpdllapi.h>
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
#include <basegfx/color/bcolormodifier.hxx>
diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx
index b386337..b1c899f 100644
--- a/sw/inc/pch/precompiled_msword.hxx
+++ b/sw/inc/pch/precompiled_msword.hxx
@@ -183,9 +183,6 @@
#include <IMark.hxx>
#include <IShellCursorSupplier.hxx>
#include <SwGetPoolIdFromName.hxx>
-#include <basebmp/basebmpdllapi.h>
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
#include <basegfx/color/bcolormodifier.hxx>
diff --git a/sw/inc/pch/precompiled_swui.hxx b/sw/inc/pch/precompiled_swui.hxx
index 57d9325..96c8fef 100644
--- a/sw/inc/pch/precompiled_swui.hxx
+++ b/sw/inc/pch/precompiled_swui.hxx
@@ -192,9 +192,6 @@
#include <IMark.hxx>
#include <SwNumberTreeTypes.hxx>
#include <SwStyleNameMapper.hxx>
-#include <basebmp/basebmpdllapi.h>
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
#include <basegfx/color/bcolormodifier.hxx>
diff --git a/sw/inc/pch/precompiled_vbaswobj.hxx b/sw/inc/pch/precompiled_vbaswobj.hxx
index dd664e0..9a8c1b3 100644
--- a/sw/inc/pch/precompiled_vbaswobj.hxx
+++ b/sw/inc/pch/precompiled_vbaswobj.hxx
@@ -176,9 +176,6 @@
#include <IMark.hxx>
#include <IShellCursorSupplier.hxx>
#include <SwGetPoolIdFromName.hxx>
-#include <basebmp/basebmpdllapi.h>
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
#include <basegfx/color/bcolormodifier.hxx>
diff --git a/vcl/Library_vclplug_gtk3.mk b/vcl/Library_vclplug_gtk3.mk
index 8a90c49..8d013d9 100644
--- a/vcl/Library_vclplug_gtk3.mk
+++ b/vcl/Library_vclplug_gtk3.mk
@@ -63,7 +63,6 @@ $(eval $(call gb_Library_use_libraries,vclplug_gtk3,\
sot \
ucbhelper \
basegfx \
- basebmp \
comphelper \
cppuhelper \
i18nlangtag \
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 3ccb79f..b39face 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -18,7 +18,6 @@
#include <unx/gendata.hxx>
#include <osl/detail/android-bootstrap.h>
#include <rtl/strbuf.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <vcl/settings.hxx>
#define LOGTAG "LibreOffice/androidinst"
diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx
index 01cb18f..626ca1f 100644
--- a/vcl/headless/svpvd.cxx
+++ b/vcl/headless/svpvd.cxx
@@ -25,12 +25,10 @@
#include "headless/svpgdi.hxx"
#include <basegfx/vector/b2ivector.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <cairo.h>
using namespace basegfx;
-using namespace basebmp;
SvpSalVirtualDevice::~SvpSalVirtualDevice()
{
@@ -52,11 +50,11 @@ void SvpSalVirtualDevice::ReleaseGraphics( SalGraphics* pGraphics )
bool SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
{
- return SetSizeUsingBuffer(nNewDX, nNewDY, basebmp::RawMemorySharedArray());
+ return SetSizeUsingBuffer(nNewDX, nNewDY, boost::shared_array<sal_uInt8>());
}
bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY,
- const basebmp::RawMemorySharedArray &pBuffer )
+ const boost::shared_array<sal_uInt8> &pBuffer )
{
B2IVector aDevSize( nNewDX, nNewDY );
if( aDevSize.getX() == 0 )
diff --git a/vcl/inc/cairotextrender.hxx b/vcl/inc/cairotextrender.hxx
index 1070ad8..a645c90 100644
--- a/vcl/inc/cairotextrender.hxx
+++ b/vcl/inc/cairotextrender.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_VCL_INC_UNX_CAIROTEXTRENDER_HXX
#include "textrender.hxx"
-#include <basebmp/bitmapdevice.hxx>
#include <vcl/region.hxx>
#include <deque>
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 19d3621..9cbe8e7 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -22,7 +22,6 @@
#include <vcl/sysdata.hxx>
#include <basegfx/range/b2ibox.hxx>
-#include <basebmp/bitmapdevice.hxx>
#include <salframe.hxx>
diff --git a/vcl/inc/headless/svpvd.hxx b/vcl/inc/headless/svpvd.hxx
index 8d6357e..967dc0f 100644
--- a/vcl/inc/headless/svpvd.hxx
+++ b/vcl/inc/headless/svpvd.hxx
@@ -47,7 +47,7 @@ public:
virtual bool SetSize( long nNewDX, long nNewDY ) override;
virtual bool SetSizeUsingBuffer( long nNewDX, long nNewDY,
- const basebmp::RawMemorySharedArray &pBuffer
+ const boost::shared_array<sal_uInt8> &pBuffer
) override;
// SalGeometryProvider
diff --git a/vcl/inc/opengl/salbmp.hxx b/vcl/inc/opengl/salbmp.hxx
index 19dfa3c..f5a618a 100644
--- a/vcl/inc/opengl/salbmp.hxx
+++ b/vcl/inc/opengl/salbmp.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_VCL_INC_OPENGL_SALBMP_H
#define INCLUDED_VCL_INC_OPENGL_SALBMP_H
-#include <basebmp/bitmapdevice.hxx>
#include <vcl/opengl/OpenGLContext.hxx>
#include "vcl/salbtype.hxx"
@@ -30,6 +29,7 @@
#include <salbmp.hxx>
#include <deque>
+#include <boost/shared_array.hpp>
struct BitmapBuffer;
class BitmapPalette;
@@ -40,7 +40,7 @@ private:
OpenGLTexture maTexture;
bool mbDirtyTexture;
BitmapPalette maPalette;
- basebmp::RawMemorySharedArray maUserBuffer;
+ boost::shared_array<sal_uInt8> maUserBuffer;
sal_uInt16 mnBits;
sal_uInt16 mnBytesPerRow;
int mnWidth;
diff --git a/vcl/inc/quartz/salbmp.h b/vcl/inc/quartz/salbmp.h
index 938f658..afe7986 100644
--- a/vcl/inc/quartz/salbmp.h
+++ b/vcl/inc/quartz/salbmp.h
@@ -22,8 +22,6 @@
#include "tools/gen.hxx"
-#include "basebmp/bitmapdevice.hxx"
-
#include "vcl/salbtype.hxx"
#include "quartz/salgdi.h"
@@ -32,6 +30,8 @@
#include "salvd.hxx"
#include "salbmp.hxx"
+#include <boost/shared_array.hpp>
+
// - SalBitmap -
struct BitmapBuffer;
@@ -43,8 +43,8 @@ public:
CGContextRef mxGraphicContext;
mutable CGImageRef mxCachedImage;
BitmapPalette maPalette;
- basebmp::RawMemorySharedArray maUserBuffer;
- basebmp::RawMemorySharedArray maContextBuffer;
+ boost::shared_array<sal_uInt8> maUserBuffer;
+ boost::shared_array<sal_uInt8> maContextBuffer;
sal_uInt16 mnBits;
int mnWidth;
int mnHeight;
diff --git a/vcl/inc/salvd.hxx b/vcl/inc/salvd.hxx
index 872a73e..4500cd9 100644
--- a/vcl/inc/salvd.hxx
+++ b/vcl/inc/salvd.hxx
@@ -20,9 +20,9 @@
#ifndef INCLUDED_VCL_INC_SALVD_HXX
#define INCLUDED_VCL_INC_SALVD_HXX
-#include <basebmp/bitmapdevice.hxx>
#include <vcl/dllapi.h>
#include <salgeom.hxx>
+#include <boost/shared_array.hpp>
class SalGraphics;
@@ -47,7 +47,7 @@ public:
// Set new size using a buffer at the given address
virtual bool SetSizeUsingBuffer( long nNewDX, long nNewDY,
- const basebmp::RawMemorySharedArray & /* pBuffer */ )
+ const boost::shared_array<sal_uInt8> & /* pBuffer */ )
{
// Only the headless virtual device has an implementation that uses
// pBuffer (and bTopDown).
diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index f55619a..edd60fb 100644
--- a/vcl/inc/textrender.hxx
+++ b/vcl/inc/textrender.hxx
@@ -24,7 +24,6 @@
#include <vcl/salgtype.hxx>
#include <vcl/vclenum.hxx>
#include <vcl/metric.hxx>
-#include <basebmp/bitmapdevice.hxx>
#include "salgdi.hxx"
#include "salglyphid.hxx"
#include "fontsubset.hxx"
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 1a7429d..264ceec 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -26,7 +26,6 @@
#include FT_FREETYPE_H
#include FT_GLYPH_H
-#include <basebmp/bitmapdevice.hxx>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <tools/gen.hxx>
#include <vcl/dllapi.h>
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index c5f14f8..fbf84e0 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -39,8 +39,6 @@
#include "tools/link.hxx"
-#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <list>
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index 03497dc..e8cbc31 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -726,7 +726,7 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode )
// maUserBuffer must be unique when we are doing the write access
if (nMode == BITMAP_WRITE_ACCESS && maUserBuffer && !maUserBuffer.unique())
{
- basebmp::RawMemorySharedArray aBuffer(maUserBuffer);
+ boost::shared_array<sal_uInt8> aBuffer(maUserBuffer);
maUserBuffer.reset();
AllocateUserData();
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 9683066..bbb82c0 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -22,8 +22,6 @@
#include <cstddef>
#include <limits>
-#include <basebmp/scanlineformats.hxx>
-#include <basebmp/color.hxx>
#include <basegfx/vector/b2ivector.hxx>
#include <tools/color.hxx>
#include <vcl/bitmap.hxx>
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index d4dd958..d911d80 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -20,7 +20,6 @@
#include <sal/config.h>
#include <config_folders.h>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx
index 75458d2..13050e4 100644
--- a/vcl/quartz/salgdiutils.cxx
+++ b/vcl/quartz/salgdiutils.cxx
@@ -19,8 +19,6 @@
#include <sal/config.h>
-#include <basebmp/color.hxx>
-#include <basebmp/scanlineformats.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/range/b2drectangle.hxx>
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index a83f88f..259d5e1 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -289,7 +289,7 @@ void VirtualDevice::dispose()
}
bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
- const basebmp::RawMemorySharedArray &pBuffer )
+ const boost::shared_array<sal_uInt8> &pBuffer )
{
SAL_INFO( "vcl.gdi",
"VirtualDevice::InnerImplSetOutputSizePixel( " << rNewSize.Width() << ", "
@@ -395,7 +395,7 @@ void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect )
}
bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
- const basebmp::RawMemorySharedArray &pBuffer )
+ const boost::shared_array<sal_uInt8> &pBuffer )
{
if( InnerImplSetOutputSizePixel(rNewSize, bErase, pBuffer) )
{
@@ -411,7 +411,7 @@ bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
{
mpAlphaVDev = VclPtr<VirtualDevice>::Create(*this, meAlphaFormat);
mpAlphaVDev->InnerImplSetOutputSizePixel(rNewSize, bErase,
- basebmp::RawMemorySharedArray());
+ boost::shared_array<sal_uInt8>());
}
// TODO: copy full outdev state to new one, here. Also needed in outdev2.cxx:DrawOutDev
@@ -444,12 +444,12 @@ void VirtualDevice::EnableRTL( bool bEnable )
bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, bool bErase )
{
- return ImplSetOutputSizePixel(rNewSize, bErase, basebmp::RawMemorySharedArray());
+ return ImplSetOutputSizePixel(rNewSize, bErase, boost::shared_array<sal_uInt8>());
}
bool VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer(
const Size& rNewSize, const Fraction& rScale, const Point& rNewOffset,
- const basebmp::RawMemorySharedArray &pBuffer )
+ const boost::shared_array<sal_uInt8> &pBuffer )
{
if (pBuffer) {
MapMode mm = GetMapMode();
More information about the Libreoffice-commits
mailing list