summaryrefslogtreecommitdiff
path: root/basebmp/source/bitmapdevice.cxx
AgeCommit message (Collapse)AuthorFilesLines
2014-04-19Remove gcc3 workaround for bug long since fixed in gccChris Sherlock1-4/+2
Change-Id: Ieb1c41481a79ab8713663caee3d5373640ff0ec8 Reviewed-on: https://gerrit.libreoffice.org/9102 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann1-22/+22
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-02-23Remove unneccessary commentsAlexander Wilms1-17/+17
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-01-27coverity#1078535 Division or modulo by zeroCaolán McNamara1-2/+10
Change-Id: Iab9bb56ce7646955d2592d7e9abdaf829ee1ec78
2013-11-11basebmp: include <> for external includesNorbert Thiebaud1-22/+22
Change-Id: I6f1f573662d5e759694c401598408df9fbb20be8
2013-10-08Hanlde TopDown -> BottomUp conversion in basebmp DirectCopy logictsahi glik1-4/+18
Change-Id: Ic6b94e8f01c0151741626f8b50d69597cc401852 Reviewed-on: https://gerrit.libreoffice.org/6155 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2013-09-27Off-by-one errorStephan Bergmann1-2/+2
Change-Id: I84749158fb8dee3fec10869e0955177bbd917d59
2013-09-27Improve performance of copyArea(), especially relevant for mobile devices.tsahi glik1-21/+66
vigra::copyImage89 does not handle copy areas in the same image so the code checks whether the src and dst are same buffer and directs it to scaleImage() which is very slow. The whole concept of pixel accessors is a huge overhead in the case of direct pixel copy (vigra::copyImage is also using pixel accessors). The idea here is to identify when direct memory copy is applicable (when the format is an integral number of bytes per pixel, src.size==dst.size, and src.format==dst.format) and use direct memory block copy and not pixel-wise copy. The result is 100x faster than the vigra implementation. This direct copy is also handling the case when the src and dst are same buffer by copy it from bottom to top when needed and using memmove() instead of memcpy(). Change-Id: I8ec589463d6386db82777a916371a5ebbf9e2d50 Reviewed-on: https://gerrit.libreoffice.org/5707 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2013-07-18fdo#62475 removed pointless commentsJelle van der Waa1-6/+0
Change-Id: I85bee68e89c41642b2da72e11b695588b3dfe346
2013-07-18WaE: assuming signed overflow does not occur when assuming...Caolán McNamara1-2/+9
that (X + c) < X is always false [-Wstrict-overflow] Change-Id: I63880bf27ab7e34eb9e0be682b39b80b71d65103
2013-07-12Turn basebmp::Format into a proper enumStephan Bergmann1-33/+39
Change-Id: I4067c5039c7b5c74a1c144721dd7260de54dd2bf
2013-06-04Detect copyArea trying to operate on overlapping memory.Tsahi Glik1-4/+9
Equality test also needs to check if disjunct BitmapDevice instances might not actually share the same memory buffer. Change-Id: I09a93cb092a0039353be211ed053e991e7fe66f0
2013-04-12Nah, I don't need a getOffset(), but I do need a getBufferSize()Tor Lillqvist1-21/+34
To properly handle subsetted BitmapDevices in the iOS vcl backend I seem to need to know what the size of the full BitmapDevice is. I wasted at least one day on desperate hacking and debugging, trying to wrap my head around a misunderstanding of what a subsetted BitmapDevice is. I thought it involved coordinate offsetting... Change-Id: I83bf1a7d75ce192aaf21f1e408008e362fd6c6e6
2013-04-11Add an accessor to get the offset of a subsetted BitmapDeviceTor Lillqvist1-0/+5
Change-Id: I8a4a588287a90c6953b367bb02e075ea58f13a96
2013-04-11Add debugging printout of subsetting informationTor Lillqvist1-1/+9
Change-Id: I6c37885823f14dcfbe750691dad27e094f46e66e
2013-03-26Log also corresponding destructions of BitmapDeviceTor Lillqvist1-1/+2
Change-Id: Ic74032b430691215482172c3c5f834374d47873d
2013-03-25Add some debugging printoutTor Lillqvist1-7/+27
Change-Id: Iea0decde41be8b9325b19651433f1b3b79f851a9
2012-10-01Replace usage of rtl_*Memory with equivalent from string.hArnaud Versini1-2/+3
Change-Id: I50ffc10f007f03c3252ef0196b59b881429cc159 Reviewed-on: https://gerrit.libreoffice.org/734 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-07-18re-base on ALv2 code. Includes:Michael Meeks1-23/+14
reportbuilder, license file not needed. Patch contributed by Armin Le Grand http://svn.apache.org/viewvc?view=revision&revision=1305814 Adapting extras/ to our wordbook setup.
2012-06-07Add two new 32bpp formats and add helpful commentsTor Lillqvist1-5/+17
For Android (and perhaps iOS) we need a 32bpp format with channels in RGBA order. Rename the (basebmp-internal) 32bpp PixelFormatTreats_* typedefs so that the channel order in their names matches the memory order of the channels. Change-Id: Ia8a74f6d44e0a2cffdf66a05ddf8fc7d6ae2a263
2012-04-17png parsing regression testCaolán McNamara1-2/+10
2011-12-13Make LineTest::testCornerCases succeed again after last basebmp fix.Stephan Bergmann1-1/+1
Though it looks wrong that rtl_allocateMemory(0) == 0.
2011-12-13handle failed bitmap storage allocation gracefullyMichael Meeks1-0/+2
2011-11-04Put BitmapDevice::getPixelData() back.Thorsten Behrens1-0/+16
Slight tweak of d0d62edf3f398e9ddb2fd0f1f5fbe1dd0393ff47 - getPixel() and getPixelData() are complementary functions, similar in spirit to const and non-const getters. Added unit test for it to avoid flagging it for removal again.
2011-11-03Cleanup basebmp a littleJoseph Powers1-21/+0
I removed 2 unused headers. I also stopped delivering a lot of headers that no one outside of basebmp cared about. I also removed the unused methods: basebmp::BitmapDevice::getPaletteEntryCount() const basebmp::BitmapDevice::getPixelData(basegfx::B2IPoint const&)
2011-11-03Fix one more subtlety around B2IBox / B2IRange changes.Thorsten Behrens1-23/+12
The Cohen/Sutherland clip flag routine was not aware of B2IBox, thusly yielding incorrect line clipping for BitmapDevice software rendering. Cleaned that up, added some more unit tests around the problem, and removed the now-extraneous maLineClip member from the bitmap device.
2011-11-02Move BitmapDevice to use B2IBox instead of B2IRange.Thorsten Behrens1-115/+110
Semantically, B2IBox represents a pixel rect much better than B2IRange - replaced all occurences in and around the software renderer, and client code.
2011-11-02Keep basebmp free of naked ptrs.Thorsten Behrens1-68/+76
Moved the implementation detail that SalFrames lifetime is handled manually in vcl out of basebmp & into vcl. Added lightweight wrapper class to decouple damagetracker lifetime from GtkFrame lifetime.
2011-11-02Revert "basebmp: B2IRange::isEmpty is surprisingly, unhelpfully lame - ↵Thorsten Behrens1-16/+0
workaround" This reverts commit 69e4dd120631b05e7abb2c65f36b71e9424a8a72.
2011-10-25basebmp: B2IRange::isEmpty is surprisingly, unhelpfully lame - workaroundMichael Meeks1-0/+16
2011-07-12initial cut at damage tracking supportMichael Meeks1-32/+106
2010-10-19Cleanse non-compiled codePovilas Kanapickas1-38/+0
Removed if-deffed code from LibO libs, enabled if-deffed code again in test/playground files
2010-10-14Add vim/emacs modelines to all source filesSebastian Spaeth1-0/+3
Fixes #fdo30794 Based on bin/add-modelines script (originally posted in mail 1286706307.1871.1399280959@webmail.messagingengine.com) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-02-12changefileheader2: #i109125#: change source file copyright notice from Sun ↵Jens-Heiner Rechtien1-4/+1
Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision)
2008-11-10CWS-TOOLING: integrate CWS cmcfixes50Rüdiger Timm1-0/+2
2008-11-10 13:31:50 +0100 cmc r263517 : gio doesn't do anything useful for remote stuff wrt info 2008-11-06 00:11:47 +0100 cmc r263359 : #i93436# pile of other 64bit new gcc warnings 2008-11-05 00:39:03 +0100 cmc r263340 : i95856 let a ppc64 vanilla build succeed 2008-11-04 14:00:25 +0100 cmc r263320 : #i93436# useless const 2008-11-04 11:53:10 +0100 cmc r263314 : #i93436# ambiguous 2008-11-04 11:48:05 +0100 cmc r263313 : #i93436# add some braces 2008-11-04 11:29:24 +0100 cmc r263312 : #i93436# ambiguous 2008-11-04 10:53:46 +0100 cmc r263311 :
2008-10-10CWS-TOOLING: integrate CWS cmcfixes49Oliver Bolte1-2/+2
2008-06-24INTEGRATION: CWS canvas05 (1.30.4); FILE MERGEDKurt Zenker1-2/+3
2008/04/21 07:51:13 thb 1.30.4.2: RESYNC: (1.30-1.31); FILE MERGED 2007/10/01 12:21:25 thb 1.30.4.1: #i80285# Merged nonzero winding rule feature from picom
2008-06-16INTEGRATION: CWS hr51 (1.31.6); FILE MERGEDRüdiger Timm1-1/+7
2008/06/06 14:36:04 hr 1.31.6.1: #i88947#: Solaris 64 bit support
2008-04-11INTEGRATION: CWS changefileheader (1.30.16); FILE MERGEDRüdiger Timm1-23/+18
2008/03/31 13:07:57 rt 1.30.16.1: #i87441# Change license header to LPGL v3.
2007-08-03INTEGRATION: CWS pj83 (1.27.2); FILE MERGEDJens-Heiner Rechtien1-4/+6
2007/07/31 20:02:34 thb 1.27.2.2: RESYNC: (1.27-1.29); FILE MERGED 2007/07/31 15:40:29 thb 1.27.2.1: #i80150# Applied er's patch to make this build for gcc3.3 again
2007-07-18INTEGRATION: CWS aw051 (1.26.18); FILE MERGEDOliver Bolte1-4/+4
2007/06/07 11:44:20 aw 1.26.18.1: #i77162# adaptions to changed B2DPolygon bezier handling
2007-07-05INTEGRATION: CWS aquavcl01 (1.26.22); FILE MERGEDRüdiger Timm1-7/+10
2007/06/22 19:06:25 thb 1.26.22.3: #i78704# Unified the two 32bpp formats 2007/06/22 15:41:58 pl 1.26.22.2: #i78704# thb: fix xor clipping 2007/06/21 09:00:07 pl 1.26.22.1: #i78704# add a new pixelformat, minor cosmetics
2007-06-27INTEGRATION: CWS basebmp01 (1.26.20); FILE MERGEDJens-Heiner Rechtien1-166/+120
2007/05/22 09:59:18 thb 1.26.20.1: #147378# Added support for foreign formats (via GenericColorImageAccessor); fixed typos in CompositeIterator and StridedArrayIterator; fixed comparisons for (Packed)PixelIterator and StridedArrayIterator (which got negative strides wrong); avoiding unnecessary copying in scale_image() now; cleaned up bitmapdevice.cxx from cruft/ad hoc debug code; made unit tests run again
2006-07-28#i65904# Made code compile warning-free for MSVC; removed inline statement ↵Thorsten Behrens1-24/+16
from the longer functions
2006-07-28#i10000# Minor build fixes (forgot the SunCC-only templates)Thorsten Behrens1-4/+7
2006-07-27#i65904# Dumped basegfx polygon raster converter in favor of a specialized ↵Thorsten Behrens1-95/+21
solution; constructing all accessors with passed parameter now for the BitmapRenderer; significantly improved test coverage for polygon rasterizing
2006-07-21#i65904# Compiler compatibility changes: made the ↵Thorsten Behrens1-2/+22
BOOST_NO_MEMBER_TEMPLATE_FRIENDS path actually work; added SunCC kludge for nested template as function template parameter problem; corrected blend_functor specialization to make msvc happy
2006-07-14#i65904# Replaced vigra::resizeImageNoInterpolation() with own scaleImage() ↵Thorsten Behrens1-11/+11
- the case size <2 does happen sometimes
2006-07-13#i65904# Swapped mask polarity - now, a zero in the mask denotes opacity; ↵Thorsten Behrens1-10/+38
minor code tidying; made drawMaskedBitmap() handle a few more generic cases; switched 24bpp to BGR; adapted tests to modified mask polarity
2006-07-12#i65904# Fixed operator+=/-= on PackedPixelRowIterator (wrong overflow ↵Thorsten Behrens1-18/+8
handling & forgot to handle negated cases); fixed typo for paletteformats (ignoring bit gravity); made drawMaskedBitmap() work for more cases; improved tests