summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
AgeCommit message (Collapse)AuthorFilesLines
2015-01-20move OutputDevice:: Clear/Refresh inside AddTempDevFontCaolán McNamara1-2/+19
and drop now redundant ImplClearFontData(true); mpFontCache->Invalidate(); which is done on entry Change-Id: I217c203980e5fd6a54b85f1b1376ecc2b92181db
2015-01-20font cache gets broken on adding an embedded fontCaolán McNamara1-6/+33
Change-Id: I665cde5d4c89443238efb283c86277dedf621197
2015-01-20Some more loplugin:cstylecast: vclStephan Bergmann8-21/+21
Change-Id: I74d35630b9fcdaa97af0b1f1e6d1e5c72488964d
2015-01-19Don't allow a negative sample range. Fixes test breakage.Tomaž Vajngerl1-2/+4
Change-Id: I3cf79b590b7d4c5aab92ccaebf6fd9c7eda529f7
2015-01-19fdo#39440 vcl: reduce scope of local variablesMichael Weghorn1-8/+4
This addresses some cppcheck warnings. Change-Id: Ibebfe89ad1874f5fa9e20fb76a534d9c2da01e3f Reviewed-on: https://gerrit.libreoffice.org/13969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-19fdo#74124 bilinear scaling with blending for some formatsTomaž Vajngerl1-86/+193
The DrawDeviceAlphaBitmapSlowPath used fast/ugly scaling with blending. With this a bilinear scaling is used which should improve quality for downscaling (less than 50% should start to degrade in quality as only 2 samples are always used) and upscaling. Change-Id: I56cdf2b5761687be891387343a773b6fefac03e2
2015-01-19Extract slow path of DrawDeviceAlphaBitmap into its own methodTomaž Vajngerl1-116/+137
Additioanlly cleanup and use ScopedReadAccess Change-Id: Ia3365f4dc968368bdd90d4398188bffe2d56e89b
2015-01-13Improve ImplLogicToPixel overflow checkStephan Bergmann1-1/+7
Change-Id: Ib0554f6d489e410527d7bf4dc77f76db1bdbf1fc
2015-01-12do not set Y line width to 0Luboš Luňák1-1/+1
I'm somewhat confused by why there needs to be a separate line width for X and Y, but apparently there is, and the latter shouldn't be just plain 0 (otherwise a number of drawPolyLine() implementations either skip using a simpler path for the usual case of them being equal, or even plain to refuse work at all and cause a fall back). And I hope this doesn't lead to finding out that some of those implementation are actually buggy. Change-Id: I2dbbd1539c4a96d41935cce9ae6565872e2a459b
2015-01-12fdo#84938: replace DATACHANGED_ constants with 'enum class'Noel Grandin1-1/+1
and drop DATACHANGED_DATETIME because no-one is using it Change-Id: Id5ac9a7fbba0e35501ed82e5252f66858621f7ff
2015-01-12FocusChanged and DataChanged are never overridenNoel Grandin1-2/+0
and their default implementations are empty, so just delete them Change-Id: Ibae2f92c3326ad46c4b6ef462b5b7b62ad63f0d8
2015-01-09fdo#84938: convert POLY_OPTIMIZE_ #defines to 'enum class'Noel Grandin1-2/+2
Change-Id: I163bd3f521473c5357c23c3ce4978f984be7b6fe
2015-01-06Resolves: fdo#82219 color graphics as black and whiteCaolán McNamara1-4/+19
i.e. revert commit bb5c7d6a79309236d4f19bb2498f2e850f735a2f Date: Sun Apr 13 01:42:27 2014 +1000 fdo#38844 Reduce XOR clipping for gradients Removed XOR clipping version of ClipAndDrawGradientMetafile. Because it has been removed, the other version isn't really needed in it's own function so I've moved it back into DrawGradient. Change-Id: Ib1519a019061c8c71183db63e5c11681bcad4cc4 Change-Id: Iff1cb48cb8fa6d29937cf228a57aea9e8072110c
2015-01-06fdo#84938: convert CTRL_STATE_ #defines to 'enum class'Noel Grandin1-1/+1
Change-Id: I1451180d258315a310a048b27510b4b58fa9145c
2015-01-02boost::unordered_map->std::unordered_mapCaolán McNamara1-1/+1
you can get debug stl this way Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2014-12-23vcl: fdo#87510 regression in GetFontMetricChris Sherlock1-1/+0
Unfortunately when I refactored the code some time ago in commit 588bb542bebd I forgot to remove the original assignment to mnExtLeading. This fixes this issue. Change-Id: I9ef514c1a28ec72747fed865a47c41a1193ce1b9 Reviewed-on: https://gerrit.libreoffice.org/13627 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-12-18vcl: Use appropriate OUString functions on string constantsStephan Bergmann1-1/+1
Change-Id: I010146e9b7181d0cc704a26ae1d373794cf6facb
2014-11-26can be constCaolán McNamara1-1/+1
Change-Id: Ib1149389ae332c66886611de244baa2d83af8869
2014-11-25Remove ptr_deque.hpp header include from vcl/outdev.hxx.Kohei Yoshida3-4/+41
This header is also a very high impact header. Change-Id: Iab63f2ec2edebc14b47820c6377a7f83131cfd06
2014-11-25Resolves fdo#86689: Strikethrough: "With /" and "With X"Julien Nabet1-1/+1
"static" keyword explains why first time the option is well taken into account and not the other times. So let's remove this and the option will be taken into account all the times. Change-Id: I9db84373e425dfe21c307b965b1796c781cd7863
2014-11-25vcl: assert when LogicToPixel overflowsMichael Stahl1-0/+2
Change-Id: I86d1c3e0c177c671b280c05b47312c79389884ed
2014-11-24coverity#1255909 Uninitialized scalar fieldCaolán McNamara3-81/+45
Change-Id: I162199233c9d3feb03e7ab33b777174b2a03035a Reviewed-on: https://gerrit.libreoffice.org/13104 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-11-22vcl: Apply the OutputDevice transformation to the gradient clipping polygonLouis-Francis Ratté-Boulianne1-11/+8
Change-Id: I16845c6cb0c110749112d608c209020f21549e70
2014-11-22vcl: Add support for backend-dependent blending of bitmaps (mask and alpha)Louis-Francis Ratté-Boulianne1-3/+24
Change-Id: Iba64eb42965c86ca5655b9a105ef3f397e033ecf
2014-11-22vcl: remove unnecessary typedef VCLXGraphicsList_implChris Sherlock1-2/+2
Change-Id: Iaaf2f0edf721567f88ffc948501548fddd648428
2014-11-20windows opengl: Introduce OpenGLCompatibleDC.Jan Holesovsky1-3/+3
This is to abstract the compatible DC creation and usage, to be reused in the native theme rendering. Change-Id: Id34bba4aeea7f46fc2aa42f292f0a525d753b8d7
2014-11-20vcl: If there it a MapMode, it is applied.Jan Holesovsky1-22/+0
Based on that, I believe this condition can go too. Change-Id: I88d8211678ca148bdf85729f57893e1476a52fc9
2014-11-20vcl: Kill IsMapMode(), it means the same as IsMapModeEnabled().Jan Holesovsky1-2/+2
Change-Id: I65fd40b8268cb0a27ba40da60fcf8e84cc8f7661
2014-11-17bridges, vcl: turns out there is sal/alloca.h; replace #ifdeferyMichael Stahl1-3/+1
Change-Id: I2eda8dab51e66af7856b55f2d5f297620e07ccdb
2014-11-15vcl: The backend should decide whether fast alpha drawing is available.Jan Holesovsky1-4/+4
The unx drawAlphaBitmap() already already checks that the source and destination have the same size. Windows and OpenGL should be able to handle that without trouble. OS X would need some additional code, so added an early return for the case the source and result sizes do not match. Change-Id: Ib09654aaa9c9064c232cff5094fcaa1190e931c6
2014-11-15vcl: Draw gradient in alpha device even when using native renderingLouis-Francis Ratté-Boulianne1-3/+4
Change-Id: Iead4ac3e97197f8f863242a2162907b32c3c5b2b
2014-11-14vcl: move the Impl class of MapMode ...uhm... out of the public header?Michael Stahl1-7/+4
And remove the tools/fract.hxx include. grep -l -r fract.hxx workdir/Dep/*Object* |wc -l before: 4569 after: 1851 Shrinks some libraries, example from --enable-dbgutil Fedora gcc 4.8.3: libvcllo.so by 473k (0.35%) libswlo.so by ~1Mb (sadly that is just 0.2%) Change-Id: I09bd025d551a5d2c5528b938a68c6aa5f8f114a0
2014-11-13vcl: rename variable in OutputDevice:drawOutDevDirect()Chris Sherlock1-9/+9
pGraphics2 is quite non-descriptive in OutputDevice::drawOutDevDirect(). It's actually the source SalGraphics instance of the source OutputDevice, so rename it to pSrcGraphics which is rather more clear. Change-Id: Iea8aa7410a294e012fccd9d4c8d7ff9c1270aa74
2014-11-13vcl: Use single-buffer rendering and only flush when necessaryLouis-Francis Ratté-Boulianne1-4/+9
Change-Id: I832dd6f3647fbb423975fa928a5ec32447225e85
2014-11-12alloca needs special include on SOLARISRichard PALO1-0/+4
Change-Id: I72415dbaf1350913938950eb1c0487a78cd67935 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2014-11-12Fraction: rewrite condition 'GetDenominator()==-1'Juan Picca1-12/+9
Change-Id: I483024fd0ef3e4e187a143631b2e8bd953fa3a52 Reviewed-on: https://gerrit.libreoffice.org/12240 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-11-11vcl: Use the fast path for rendering.Jan Holesovsky1-5/+3
There was a discrepancy between the comment and the code; and I believe the comment was right, and the code wrong - so adapted the code accordingly. [I guess we will want to kill this condition for good when rendering via OpenGL at some stage; the assert() will tell us ;-)] Change-Id: I651261373068e975004c898b2a930c602c158b64
2014-11-11windows opengl: Make sure we don't reach the slow parts of the code.Jan Holesovsky1-5/+8
Change-Id: I2a4d1bd294d1d88651c8556091f5453ef0aa5293
2014-11-11vcl: move OutputDevice::ImplDrawFrameDev() to WindowChris Sherlock1-47/+0
I have moved ImplDrawFrameDev() from OutputDevice to Window, because it deals with frames which is clearly the responsibility of the Window class, not the OutputDevice class which shouldn't really care about it at all. I've also renamed it to drawFrameDev() as it's a private function. Change-Id: I45fd50e8e34fe4a97730c3c857080e4e1ddb1c17 Reviewed-on: https://gerrit.libreoffice.org/12340 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-11-11vcl: make ImplDrawOutDevDirect a protected function in OutputDeviceChris Sherlock1-4/+4
Also renamed it to drawOutDevDirect. We're making it protected because I'm about to move ImplDrawFrameDev() from OutputDevice to Window, where it should be. Change-Id: I7a94304cdc48b858c057749532de66086eeb5020 Reviewed-on: https://gerrit.libreoffice.org/12339 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-11-11vcl: move OutputDevice::ImplGetFrameDev() to WindowChris Sherlock1-10/+0
ImplGetFrameDev() is for some unknown reason in OutputDevice, but it's most definitely something that's specific to Window. I've moved this, and also renamed it getFrameDev() as it's a private function. Change-Id: Iffb2c439bee8c29ee585a0d50cfd6fbcfc28c3bc Reviewed-on: https://gerrit.libreoffice.org/12338 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-11-10vcl: Add support for transparent polygon drawing with OpenGLLouis-Francis Ratté-Boulianne1-1/+1
Change-Id: Iaa7cdcf4742d8148507c69c222bff417b9f9426c
2014-11-10prevent insane memory allocationMarkus Mohrhard1-2/+1
We release the memory in the next call again. Change-Id: I9cd974f2c1b2381d0a895bea52a8654143862971
2014-11-10vcl: Add method to swap buffers after painting windowLouis-Francis Ratté-Boulianne1-0/+7
Change-Id: Icdf691e7e9e83d039e33d2095270290dc31f2efa
2014-11-05vcl: renamed OutputDevice::PaintLineGeometryWithEvtlExpand()Chris Sherlock2-5/+3
I asked on the LO dev mailing list what Evtl means and what is being expanded, and Michael Stahl kindly responded: > "Evtl" usually means German "eventuell" which means "possible" or > "optional" (i.e. totally different meaning from English "eventual"). So in other words, it means paint using line geometry and optionally expand. Or in other words, it just draws a line using a B2DPolyPolygon. Thus, I have renamed it to drawLine(), which is a private function of OutputDevice. I think this makes it somewhat clearer :-) Change-Id: I7eec23c61eda9dc1074922f5f2f67eacbc7fd725 Reviewed-on: https://gerrit.libreoffice.org/12264 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-11-04WaE: unused variable 'aClipPolyPoly'Tor Lillqvist1-2/+0
Change-Id: I8dd9b2a5dd09d5d0be123e9f8a303ad8e280b0f2
2014-11-03vcl: Allow SalGraphics to draw gradients nativelyChris Sherlock1-89/+432
The aim of this patch is to allow for native gradient rendering in SalGraphics (i.e. let OpenGL do this natively). It is a two step process: 1. I need to allow gradient draw into SalGraphics, however the current completely intertwined with the metafile code in OutputDevice. I am seperating the gradient metafile code from the gradient drawing code. 2. After splitting the metafile stuff from the actual gradient drawing, I am now able to call on SalGraphics::DrawGradient(). This just calls on SalGraphics::drawGradient() which returns false if there is no way of drawing native gradients, and true if there is. If false, then we use OutputDevice's DrawGradient() functionality. Change-Id: Ibaaabe13b76a8e7a037d9f751b5f662653a50566 Reviewed-on: https://gerrit.libreoffice.org/12119 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-11-03be a little more consistent stylewiseCaolán McNamara1-1/+1
Change-Id: If1d822e0e6c87e792ff4a769a525e161505325c9
2014-11-03coverity#1209395 Dereference after null checkCaolán McNamara3-25/+17
since commit 808d273db098e2269e53813595a6bfc7b160e28e Date: Fri Apr 25 11:56:54 2014 +1000 Remove ImpInitOutDevData and ImplDeInitOutDevData in OutputDevice All these do is some very, very basic initialization. There is no need to lazy load the structure, it should be initialized when OutputDevice is created in the constructor and deinitialized in the destructor. mpOutDevData is never NULL Change-Id: Ie08f7520e8c09b57e056c086bba3089abe2486fa
2014-11-03vcl: typo in variable name in PaintLineGeometryWithEvtlExpandChris Sherlock1-3/+3
Change-Id: I87084cbc4d6a8b6f5edbf8b90791c2b1e75b4afb Reviewed-on: https://gerrit.libreoffice.org/12211 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>