summaryrefslogtreecommitdiff
path: root/vcl/source/opengl/OpenGLHelper.cxx
AgeCommit message (Collapse)AuthorFilesLines
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin1-1/+1
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27loplugin:includeform: vcl (Windows)Stephan Bergmann1-1/+1
Change-Id: I4a0fc4b483069141d2b943079adf5aa741df968e
2017-10-23loplugin:includeform: vclStephan Bergmann1-6/+6
Change-Id: Id7dea3917740aaf4db8dada5e2bea6e117d714ea
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-1/+1
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-29Drop check for Windows versions we don't supportMike Kaganski1-21/+23
Since we dropped support of Vista and below in master toward 6.0, those checks are needless. Removing the code that only worked in older versions, and streamlining the resulting code. Also, use kernel32.dll version for Windows version, instead of deprecated GetVersionEx, and inconvenient VersionHelpers. Since both GetVersion(Ex) and VersionHelpers (based on VerifyVersionInfo) are subject to manifest-based behavior since Windows 8.1, this move will hopefully result in more reliable OS version detection. Change-Id: I3edd8fc1843e64b6a65bd3a126be6a085511f13c Reviewed-on: https://gerrit.libreoffice.org/42905 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-06-28loplugin:oncevar in vclNoel Grandin1-2/+1
Change-Id: I37a6dacda12e1c2910737d74aa344c7e2e195aeb Reviewed-on: https://gerrit.libreoffice.org/39328 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12clang-tidy readability-delete-null-pointerNoel Grandin1-2/+1
which in turn triggered some loplugin:useuniqueptr Change-Id: I0c38561fc9b68dac44e8cf58c8aa1f582196cc64 Reviewed-on: https://gerrit.libreoffice.org/38281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25clang-tidy readability-simplify-boolean-expr in vclNoel Grandin1-4/+1
Change-Id: I10ad38bcb5b05a754de9a396f4aaa79d97458d6f Reviewed-on: https://gerrit.libreoffice.org/36930 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-28Resolves: tdf#106155 avoid opengl for toplevel X window iconsCaolán McNamara1-0/+21
because an opengl context requires a toplevel window so it recurses to death. Only the gen/kde4 vclplugs are affected here Change-Id: If5396d183d90d1872931b170dc90c3a70d8ea6b6
2017-03-18vcl: change opengl gpWatchdogExt from oslCondition to osl::ConditionChris Sherlock1-7/+7
Condition is deprecated already, but there is no need for the us to use the low-level C-API, when in fact there is a C++ fascade that calls on this via the C++ abstraction, osl::Condition. This will make it much easier to switch to using std::condition_variable in the future. Change-Id: I0d7fda22ad00a79767b68cd06f00decfc0555371 Reviewed-on: https://gerrit.libreoffice.org/35390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-03-06drop various _MSC_VER < 1900 conditionalsCaolán McNamara1-12/+1
Change-Id: I68d93b260db1f542bb3b44858b61b2d30ae93530 Reviewed-on: https://gerrit.libreoffice.org/34856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-10New loplugin:conststringvar: vclStephan Bergmann1-1/+1
Change-Id: I573c19e4a2f6ee041998216ea4cf29677986d731
2016-12-13change from glew to epoxyCaolán McNamara1-4/+4
because that works under wayland out of the box and gtk3 uses it already Change-Id: Iefaac31e325534a81a5389f752804af917c1baef Reviewed-on: https://gerrit.libreoffice.org/31213 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-17Force disable OpenGL in Safe ModeSamuel Mehrbrodt1-0/+4
Change-Id: I3f19231d9a9168499d9f9ed970d4da1a69cca36a Reviewed-on: https://gerrit.libreoffice.org/29959 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-09-26That syntax is fine with MSVC 2015 nowStephan Bergmann1-2/+2
Change-Id: I83fee880e1248dd874f7f459aa670c74deda6a7d
2016-09-24fix the OpenGL selection logicMarkus Mohrhard1-2/+3
Now OpenGL is again not used on the build bots. Change-Id: I7369394c44ab1e16135e2b22f7f8effca0f25d3c
2016-09-23tdf#101822 Always de-zombie the glxtest processJan-Marek Glogowski1-5/+2
Make sure we wait for the glxtest process. Change-Id: I143290b80ba83e35f8d0f95d133c25178c5fe563
2016-09-23vcl: C++11 is awesome, they said! it's a whole new language, they said!Michael Stahl1-2/+15
Change-Id: I96f00bd00ffcfea8ca026aacbaacf9539e327eff
2016-09-23vcl: Apple clang segfaults on "(", the "{" seems to work betterMichael Stahl1-2/+2
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Change-Id: Ib9c8639d4c821a39afb6b071ccd6c7072e6f9e7c
2016-09-20tdf#102295: remove mutex - use atomic for watchdog timingsTomaž Vajngerl1-25/+11
Change-Id: I6587bad8b7906faeae39735343278b10be78c05b
2016-09-20tdf#102295: AMD actually has two vendor id's.Jan Holesovsky1-1/+1
Change-Id: I9cc1341c8f8d154927a778dfa15b8d3013a9a487
2016-09-20tdf#102295: The relaxed values were actually too pessimistic.Jan Holesovsky1-2/+2
Change-Id: Ia117ae4a60a10994f3c59316e8c9a161aa8e5baf
2016-09-19tdf#102295: relax timeout timings for the GL watchdogTomaž Vajngerl1-13/+42
Some OS/GPU combinations need more relaxed watchdog timeout timings as the shader compilation takes too long to complete. Change-Id: Ifd9ff7ecfa4b004d5411d6d364dd01a389a3fcec
2016-09-15Remove OutputDevice::PaintScopeNoel Grandin1-40/+0
PaintScope was introduced in commit bfceb557efcd607ef018ae35fc73f8d61a9b9a4e Author: Michael Meeks <michael.meeks@collabora.com> Date: Wed Sep 16 09:17:37 2015 +0100 GL paint-flushing guard re-work. Unfortunately, since we can have 2x SalGraphics' on a OutputDevice, and one of these can be a printer - things got very confused around which context to glFlush. This de-tangles the various reference- counts. and then mostly removed in commit 33fac4828038bc38ab4a0c4b891d762a5ae73e5e Author: Noel Grandin <noel@peralex.com> Date: Thu Dec 24 09:21:23 2015 +0200 loplugin:unnecessaryvirtual and unwind some apparently now unused VCL OpenGL and GlyphCachePeer stuff. Finish the job, it's not doing anything at all anymore Change-Id: I1365c2d0652ee92630d0649b2df6e5a7b7e37e73
2016-08-10Surround PaintScope code with ifdefs matching declaration in include fileTor Lillqvist1-0/+4
Change-Id: Iede85fc847b330b5586b95facafb690df7209d1b
2016-07-28opengl: improve logging when no context is availableTomaž Vajngerl1-1/+1
Change-Id: Ie747db5f46b0a83bda44d211b0ac69bc19092fbc Reviewed-on: https://gerrit.libreoffice.org/27615 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-25opengl: add VCL_GL_WARN to write warnings into api trace fileTomaž Vajngerl1-4/+15
Change-Id: I416de926a769dccdf1c53072c1f7dda817c5402a Reviewed-on: https://gerrit.libreoffice.org/27496 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-05-25Use VCL_GL_INFO hereTor Lillqvist1-2/+2
Failing to open a cached shader binary is a no reason for a SAL_WARN. It is normal that they don't exist when first trying, that is the very nature of a 'cache'. Change-Id: Iaa40af11f0679b859f1fa8b246665c61640df379
2016-05-25Avoid redundancy: The same information was logged in readProgramBinary()Tor Lillqvist1-1/+0
Change-Id: Id5619c9c102ba72826265c1b5f46ddb58596b8b1
2016-05-25Don't claim to be reading a file before trying to open itTor Lillqvist1-2/+2
Change-Id: I8a3332c4b1acaa4dc69ff9349d2e9241fb4f340f
2016-05-21move glX stuff to X-only modulesCaolán McNamara1-85/+0
Change-Id: I8ca818dac72f0368b6af10c838603e63c7c85b1e
2016-03-07opengl: fix loading shader with preamble that uses #versionTomaž Vajngerl1-2/+2
The preamble was inserted into a false position so the shader could was constructed incorrectly and would fail to compile. Change-Id: I4c51adde9014a326bbe38a5d2d17dd0047e33195
2016-02-27log to the crashreporter whether we use OpenGLMarkus Mohrhard1-0/+3
Change-Id: I8fd2ffe5908074417aa5cfc00adbc54b6e9ed360
2016-02-06vcl: bmpacc.hxx -> bitmapaccess.hxxChris Sherlock1-1/+1
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-02-01Resolves: tdf#93821 assume mbNoSaveBackground as true everywhereCaolán McNamara1-1/+0
Change-Id: I126aa5e9b96299eb25c2240d097859b3c0756535
2016-01-06vcl: opengl - Kill the last glErrors on common paths.Michael Meeks1-0/+5
Re-work the makeSomeOpenGLContextCurrent logic into a shared function with the existing AcquireContext logic in the SalOpenGLGraphics impl. Use an OpenGLVCLContextZone placeholder to do both context and zone management - to include destructors into the zone. Fix a number of error cases around SalBitmaps where we did not have a GL context associated when allocating, and/or freeing textures.. Don't drag a (potentially) slower context around in the OpenGLSalBitmap when we're going to check / fetch a better VCL context anyway. Change-Id: Ibbb2358c47156cd078ad28b6aad4f03af36aaf23 Reviewed-on: https://gerrit.libreoffice.org/21127 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-01-01vcl: improve OpenGL debugging variously.Michael Meeks1-1/+2
Change-Id: I097f1c1fb7fb505b6859289997bff3562fc06ba6 Reviewed-on: https://gerrit.libreoffice.org/21027 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-12-24loplugin:unnecessaryvirtualNoel Grandin1-8/+0
and unwind some apparently now unused VCL OpenGL and GlyphCachePeer stuff. Change-Id: Ic85302d4e1ad4056dabc49c97a608891052e3167 Reviewed-on: https://gerrit.libreoffice.org/20920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-12-11opengl: Add Geometry Shader support to OpenGLHelperEmmanuel Gil Peyrot1-3/+59
This is the ground work for some later transitions in slideshow. Change-Id: Ib200cf7fabd579256a5255b0fb5d8c4accf7d24b
2015-11-20loplugin:sallogareasStephan Bergmann1-6/+6
Change-Id: Ib1f06cb5f925535858bc14aab6f59ad7fd2a3a8d
2015-11-19readabilityTomaž Vajngerl1-1/+4
Change-Id: I8fbff3f86a543a58259408914bb78f992ad65864
2015-11-13OpenGL error codes are defined in hex, so show them as suchTor Lillqvist1-4/+3
Change-Id: I1f7fd98b243c49bfd90060b297bb2391cb102bb3
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-15/+15
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
2015-11-05use uno::Reference::set method instead of assignmentNoel Grandin1-1/+1
Change-Id: I31a69a997098eb1807361b8049c3312a4f287d75
2015-10-18Success is no reason to be scaredTor Lillqvist1-3/+3
Change-Id: If7ad24bf1f7442e86d424188bd78f332b1a351ff
2015-10-11Moggi thinks this mutex is unnecessary and I trust himTor Lillqvist1-3/+0
"Is the mutex really necessary? Normally outside of the chart OpenGL only the thread that has taken the SolarMutex should access the OpenGL code. In general we have bigger problems if several threads start rendering in parallel." Change-Id: I5f8fa8c771d5e2e0df4cfe903b15d00e5cc162b1
2015-10-09clang-analyzer-deadcode.DeadStoresStephan Bergmann1-1/+0
Change-Id: I8a6ea395192d31391868f44152ab3b543a07aeaa
2015-10-08Don't re-read the same glsl files over and over againTor Lillqvist1-4/+20
Change-Id: I10b4badaba01630e1a054b3d4d9cc4720822511a
2015-09-16Add debugging helpers to binary shader loading.Michael Meeks1-5/+4
Change-Id: I32b8d8ce0fbf824120c8afd288b728314cd74142 Reviewed-on: https://gerrit.libreoffice.org/18620 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-09-16GL paint-flushing guard re-work.Michael Meeks1-1/+45
Unfortunately, since we can have 2x SalGraphics' on a OutputDevice, and one of these can be a printer - things got very confused around which context to glFlush. This de-tangles the various reference-counts. Change-Id: I1062be0b02a91fc9009deaa3ec29c5dbb227df20 Reviewed-on: https://gerrit.libreoffice.org/18604 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>