summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
AgeCommit message (Collapse)Author
2019-11-03loplugin:stringaddNoel Grandin
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-28Blind fix for Android build ('unsigned int' vs. 'unsigned long')Stephan Bergmann
Change-Id: I04de54231abb8b34c93cbcb96c21cae78d90bfd4 Reviewed-on: https://gerrit.libreoffice.org/81608 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21loplugin:stringadd (macOS)Stephan Bergmann
Change-Id: Ic9c23fcda4c798c1ca2de5a010da292d56b10e8b Reviewed-on: https://gerrit.libreoffice.org/81201 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Remove some memset callsMike Kaganski
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-02loplugin:stringadd in vclNoel Grandin
Change-Id: I21154abe6992418ff2541e5913a0aae0c2c1912c Reviewed-on: https://gerrit.libreoffice.org/79987 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-02Refactoring of the class CrashReporterJuergen Funk
- remove double code - using of all the methode of the CrashReporter-Class - all methode only active when crash-dump enable except the addKeyValue With this change the handling for the patch tdf#127711 A runtime-switch for the MiniCrashDump would be simpler Change-Id: I339b3b8e06f7fc2cd3c0d34ece112a6fd352913a Reviewed-on: https://gerrit.libreoffice.org/79272 Tested-by: Jenkins Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de>
2019-10-01crashreport: change addKeyValue to lower-case camelJuergen Funk
Change-Id: Ife5775d3a570da1fc2e4dd627456523705b64e1d Reviewed-on: https://gerrit.libreoffice.org/79601 Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de> Tested-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de>
2019-09-18-Werror=volatile in OpenGLZoneStephan Bergmann
Recent GCC 10 trunk in C++20 mode reports issues like > vcl/inc/opengl/zone.hxx:37:21: error: ‘++’ expression of ‘volatile’-qualified type is deprecated [-Werror=volatile] > 37 | OpenGLZone() { gnEnterCount++; } > | ^~~~~~~~~~~~ so look for a type that is more appropriate here (see the comment added to vcl/inc/opengl/zone.hxx for details). (Though calls like OpenGLZone::isInZone(), comparing gnEnterCount and gnLeaveCount, in OpenGLWatchdogThread::execute are still not done atomically, of course.) Change-Id: Ie5563addc65f629336f89cbccb73f7b9ac5e9870 Reviewed-on: https://gerrit.libreoffice.org/79072 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-17Consolidate places that manipulate OpenGLZone::gnEnter/LeaveCount directlyStephan Bergmann
(keeping the inline'd-ness of what the OpenGLZone ctor/dtor do, in case that might actually be relevant for performance) Change-Id: I411b83d1b99ed46b35857c7cca10f95dbc1c8e27 Reviewed-on: https://gerrit.libreoffice.org/79062 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-28tdf#42949 Fix IWYU warnings in vcl/source/[o-w]*/Gabor Kelemen
Plus a quick recheck for files in vcl/source/[a-g]*/ Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia1ae951047be2e034da5f3b0422613ddb0a091ad Reviewed-on: https://gerrit.libreoffice.org/78065 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): vclStephan Bergmann
Change-Id: I0bd1d26f6fc4052b812fde33ebd1d63111426942 Reviewed-on: https://gerrit.libreoffice.org/76627 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-17remove or change salbtype.hxx includesTomaž Vajngerl
Change-Id: Ibd28b8fa92e98ebeb482a9081fbeae24defe4adb Reviewed-on: https://gerrit.libreoffice.org/70826 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-16abort() in dbgutil mode if OpenGL shader compilation failsLuboš Luňák
Otherwise it's quite annoying to miss e.g. a typo in the shader code if the code falls back to another way of handling the operation. Change-Id: I585be85f739929f0f422dc031a36dc83077f6820 Reviewed-on: https://gerrit.libreoffice.org/70771 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-04-16make ConvertBGRABufferToBitmapEx work properly also on non-win32Luboš Luňák
Windows uses GL_BGRA, but e.g. on Linux OpenGL stores as GL_RGBA. Change-Id: I00820f7b7a16a54b10c682ba332627ec04648508 Reviewed-on: https://gerrit.libreoffice.org/70772 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-04-12prefer vector::data to &vector[0]Caolán McNamara
probably missed loads more Change-Id: I53c9fe188055ef925fed54500e64b837cd56a1e7 Reviewed-on: https://gerrit.libreoffice.org/70676 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-17kde5: remove older kde/tde plugins, and references to thatThorsten Behrens
KDE4 is out of maintenance upstream since Nov. 2014, and binaries provided by TDF have switched to KDE5 as the official backend. Change-Id: I165465b56d3ba3a18912b203c06ae8fc6111c0c9 Reviewed-on: https://gerrit.libreoffice.org/60014 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-12-05Add interface for software-only bitmap renderingJan-Marek Glogowski
When SAL_USE_VCLPLUGIN=svp is used, LO is expected to render output only to bitmaps, without real GUI windows. This adds an enabler and a getter function to the Application class, so one can query this information easy as (Enable|Is)BitmapRendering. This can be used by all VCL plugins, which can't fall back to the Cairo based SVP plugin, primary OSX and Win. A working implementation should allow to run all test via SSH. All window-requiring tests already have to set this requirement using gb_CppunitTest_use_vcl_non_headless(_with_windows)? and should be moved to a different make target, or we need some test harness to handle this correctly, before VCL fails the test. Change-Id: I4bd4c81122a6686b090fdd93256d4712ac5f05dd Reviewed-on: https://gerrit.libreoffice.org/64051 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-11-27tdf#42949 Fix IWYU warnings in include/vcl/[f-h]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ice2eb8c5994bf2ccb88972332ca4a1d3ed41752a Reviewed-on: https://gerrit.libreoffice.org/63826 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-22SAL_USE_VCLPLUGIN is a UNO bootstrap variableStephan Bergmann
...(which includes environment variables), so read it as one (as is already done in e.g. CreateSalInstance in vcl/source/app/salplug.cxx), esp. so since lo_initialize in desktop/source/lib/init.cxx doesn't set it as an environment variable Change-Id: I557ecf4fcc5daba1e748af789847c8bbb9f563d6 Reviewed-on: https://gerrit.libreoffice.org/63801 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-20Drop some headless mode variantsJan-Marek Glogowski
This fixes OSX "make debugrun" by dropping VCL_HIDE_WINDOWS handling and removing the internal GetPseudoHeadless() API. While at it moves the DialogCancelMode enum out of Application. Change-Id: I4876e752ddbfc39dd44faa673fb0e97810089a75 Reviewed-on: https://gerrit.libreoffice.org/61598 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17loplugin:staticconstfield improvementsNoel Grandin
Change-Id: Ia0a19736dfd4500bb17b04c072710f8ee8744031 Reviewed-on: https://gerrit.libreoffice.org/60526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-14loplugin:constfields in vclNoel Grandin
Change-Id: I1072642be4fdfa720e61f2d7bad3c2701eb81610 Reviewed-on: https://gerrit.libreoffice.org/60430 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-09loplugin:unusedmethodsNoel Grandin
Change-Id: I0308ddd467ab6e283c0503f98885a248eb28290c Reviewed-on: https://gerrit.libreoffice.org/58738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-31Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directory vcl Change-Id: I205fe0f4e80a66cd9c3b19f7e9716411da1d1cf5 Reviewed-on: https://gerrit.libreoffice.org/58221 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-27loplugin:returnconstant in vclNoel Grandin
Change-Id: I597ef6d75d1c21cdc15a91bf7f549bc14c851506 Reviewed-on: https://gerrit.libreoffice.org/58086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-19loplugin:constantparamNoel Grandin
Change-Id: I8e2e9009f0a70d2fa390e03688a988ac935d5f36 Reviewed-on: https://gerrit.libreoffice.org/57643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-19loplugin:unusedmethodsNoel Grandin
Change-Id: I2b7a055a44c63bfc072b82580811898e177fbb8e Reviewed-on: https://gerrit.libreoffice.org/57628 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-18tdf#104893 vcl opengl: fix assert failure when starting chart editingMiklos Vajna
OpenGLContext::prepareForYield() assumed that in case we have a current context, then it's the last one, but that's not the case for chart windows since commit 78b100ec9cb0db2f7b33ece5ad3287a67a37246f (only init the OpenGL context if we need it, 2016-06-07), which creates an OpenGLContext instance (which is then the last one in the context list) but explicitly doesn't initialize it (so that it would become the current one). Fix the problem by resetting not the last but the last current context. Change-Id: Ie0e96927473290590cd6333e5cdcb7daa009431b Reviewed-on: https://gerrit.libreoffice.org/54495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-15move Bitmap::ScopedWriteAccess inside vclNoel Grandin
would have liked to make the AcquireWriteAccess methods DLLPRIVATE, but they are needed by the workbench and testing code Change-Id: I22497788eb68dfb84b7e542e5ef53322892a5274 Reviewed-on: https://gerrit.libreoffice.org/51310 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-09loplugin:constantparam in vclNoel Grandin
Change-Id: I1618280494ff10d884a3285501303c6a74ef3542 Reviewed-on: https://gerrit.libreoffice.org/50951 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05Make LibreOffice buildable on Haiku.Kacper Kasper
* Obviously VCL wiring is missing, but most components do build. Change-Id: Ie853ada1423a8f4c2b647be59cd47a7730c42978 Reviewed-on: https://gerrit.libreoffice.org/50293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-02-06Unused include pngwrite in OpenGLContext (vcl)Julien Nabet
Change-Id: Ib8445ed268f84d850169cc54113119308045e9df Reviewed-on: https://gerrit.libreoffice.org/49295 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-24loplugin:unused-returns in vclNoel Grandin
Change-Id: I507320900a47f604d17ed7d402d531a7cbdf744e Reviewed-on: https://gerrit.libreoffice.org/48331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-07vcl, added checks for HAVE_FEATURE_OPENGLjan Iversen
missing HAVE_FEATURE_OPENGL caused link errors Change-Id: I1c44f9c9f729f351b6acf17ae60cd855b69394db
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin
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-11-10loplugin:unusedmethodsNoel Grandin
Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454 Reviewed-on: https://gerrit.libreoffice.org/44553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27loplugin:includeform: vcl (Windows)Stephan Bergmann
Change-Id: I4a0fc4b483069141d2b943079adf5aa741df968e
2017-10-23loplugin:includeform: vclStephan Bergmann
Change-Id: Id7dea3917740aaf4db8dada5e2bea6e117d714ea
2017-10-23overload std::hash for OUString and OStringNoel Grandin
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-10-19tdf#113225 - reset framebuffer count when resetting OpenGLContextMichael Meeks
Otherwise we can fail to allocate a new one when we need it post reset. http://crashreport.libreoffice.org/stats/crash_details/e4f26191-15d5-441a-868f-9ada21ef4424 Change-Id: Icc5ec6c51338e18a0a1bc890f56670e8fe9c73ea Reviewed-on: https://gerrit.libreoffice.org/43508 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-09-29Drop check for Windows versions we don't supportMike Kaganski
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-09-11hidpi+gtk3: move setting the opengl slide viewportCaolán McNamara
to when the window size is set, and adjust to gtk3 hidpi scaling factor Change-Id: Id9bd0defd0b6ae640ac57f88133d954202d4bcc3 Reviewed-on: https://gerrit.libreoffice.org/42143 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-20loplugin:unusedfields in vclNoel Grandin
Change-Id: I207866df495ec81bb9288e6d0f664b96d90251d6 Reviewed-on: https://gerrit.libreoffice.org/40217 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-28loplugin:oncevar in vclNoel Grandin
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-17loplugin:unusedfields in vcl part3Noel Grandin
Change-Id: I5a6319ba1667af6e9b7b92c22f858188c28c4c61 Reviewed-on: https://gerrit.libreoffice.org/38835 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-17loplugin:unusedfields in vcl part1Noel Grandin
Change-Id: I67d176003f39992cd0ff9271a7d6ce26d2cb6619 Reviewed-on: https://gerrit.libreoffice.org/38828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12clang-tidy readability-delete-null-pointerNoel Grandin
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-05-26Resolves: tdf##108069 2nd OpenGLContext::init should dispose earlier resultsCaolán McNamara
Change-Id: If6bb9517a4081576347d71ddf26d020119d34247