summaryrefslogtreecommitdiff
path: root/vcl/opengl
AgeCommit message (Collapse)Author
2017-01-17Refactor Scheduler to add Task classJan-Marek Glogowski
Moves all the "task-specific" stuff into a Task class and just keeps the "real" static Scheduler functions in the original Scheduler class. Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
2017-01-13new loplugin: useuniqueptr: vclNoel Grandin
Change-Id: Idcbc8655108ff57c06c33bbcabd652387bf3c4ec Reviewed-on: https://gerrit.libreoffice.org/32948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-09New loplugin:externvar: vclStephan Bergmann
Change-Id: I8b01a7bd7459db242364b6a766549374264f26f2
2017-01-04tdf#97228 Moved class ControlCacheKey in a seperate include file.Huzaifa Iftikhar
class ControlCacheKey defined in include/vcl/salnativewidgets.hxx is used only by vcl therefore it is moved to a seperate include file named ControlCacheKey.hxx which is inside vcl/inc/ControlCacheKey.hxx. This header file contains the definition of the the class ControlCacheKey. Since this class uses an object of another class named Size which is defined in gen.hxx therefore this is included in ControlCacheKey.hxx. All the files that references the class ControlCacheKey includes ControlCacheKey.hxx with the syntax: #include "ControlCacheKey.hxx" Change-Id: I7d7b3e1cf6950a953e6bbed670c1914826b2bacd Reviewed-on: https://gerrit.libreoffice.org/32422 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-12-20Related: tdf#104705 an effort to address crashCaolán McNamara
Change-Id: I43284c19d0f38fb8fbd7e908c5d255cdfd399015 Reviewed-on: https://gerrit.libreoffice.org/32222 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-16loplugin:nullptr (clang-cl)Stephan Bergmann
Change-Id: I557e752ca05146e2a571d027fc3d1875afd6ef26
2016-12-14Simplify GLX11Window::HasGLXExtension, avoiding strtokStephan Bergmann
Change-Id: If737cf4aaec1e6297db2bc8a80b19720ca9ca189
2016-12-13change from glew to epoxyCaolán McNamara
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-12-09move the windows restart because of bad-opengl requirements to a better placeCaolán McNamara
because if the opengl support is such that the opengl-for-vcl requirements don't fit, then on the second run after discovering this (the first having restarted) if you try opengl slide transitions libreoffice will just exit because it thinks this first check of opengl-for-slideshow is the first opengl-for-vcl effort. so move this code into the place which I believe is the opengl-for-vcl entry point this is all related to... commit 210c39dd9a6ebaa964c03c20e4b442ea36941ae9 Date: Fri Jun 3 09:25:13 2016 +0300 tdf#100193: Check earlier and harder whether OpenGL is good enough on Windows Change-Id: I3f6a72efff9c533ca9a0602227fd929ac645f60b Reviewed-on: https://gerrit.libreoffice.org/31763 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-08tdf#104034 skip polygons with less than 2 pointsTomaž Vajngerl
We can get polypolgons with polygons that have 0 or 1 point only, so we need to guard agains division-by-zero errors by skipping if we detect such polygons (as we can't draw them anyway). Change-Id: Ia27fcde9467864b10572a78a848ea642a3559185 Reviewed-on: https://gerrit.libreoffice.org/31770 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-12-08model the WinOpenGLContext::isCurrent like the X11OpenGLContext::isCurrentCaolán McNamara
i.e. if !m_aGLWin.hRC then we're definitely not a current context Change-Id: Id35f75c19629a17b714edf6aa6628d8f5b2f8ced
2016-12-08the return from ImplInit *is* checkedCaolán McNamara
bool WinOpenGLContext::init(HDC hDC, HWND hWnd) { ... return ImplInit(); } rtl::Reference<OpenGLContext> WinOpenGLSalGraphicsImpl::CreateWinContext() { ... if (!xContext->init(mrWinParent.mhLocalDC, mrWinParent.mhWnd)) } etc. Another problem here is ... "If we notice that OpenGL is broken the first time being called, it is not too late to call disableOpenGLAndTerminateForRestart(). The first time this will be called is from displaying the splash screen" isn't true when the first start causes opengl to be disabled, then on subsequent starts you can enter this function from launching an opengl slide transition. (note opengl is disabled if opengl is < 30, so all the versioning checks the slide transitions do is probably pointless now. The only actually useful use of opengl we have seems to be somewhat unloved) Change-Id: I1e159f826447520f39ea063fd4c0c83220b1385f
2016-12-07convert PolyFlags to scoped enumNoel Grandin
and remove the XPolyFlags enum, which has the same values and was being converted to PolyFlags anyhow Change-Id: Iaead84933c79a7603698a4e50257dd944df89c41 Reviewed-on: https://gerrit.libreoffice.org/31627 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-28don't leak impl. detailsDavid Tardon
Also, returning std::unique_ptr<>& doesn't make any sense. Change-Id: Iefb2a0bfe614264bc7b5d15652fcc15243df3d06
2016-11-25tdf#103820 & tdf#103824 fix texture refactoring mistakeTomaž Vajngerl
Change-Id: I657a4b46e3e7efbe8b1ea5c1e811e1d125f5146f
2016-11-23loplugin:unnecessaryoverride (dtors) in vclStephan Bergmann
Change-Id: I38e24991308bf52e75259a30d332145aef9a757b
2016-11-22loplugin:datamembershadowStephan Bergmann
Change-Id: If9e9371569750dd2c970450b808c6c5567faae55
2016-11-18loplugin:datamembershadowNoel Grandin
Change-Id: I8a737a2f22c7be9630a1f7562b4309e687bb85f9 Reviewed-on: https://gerrit.libreoffice.org/30948 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-10Windows 8 driver blacklistMarina Latini
Blacklisted intel driver for graphics card Intel(R) HD Graphics 4000 for Windows 8. With this card LibreOffice won't start. Change-Id: I3f4e04da7b4d61bddb1e755771b6a9538b596c51 Signed-off-by: Marina Latini <marina@studiostorti.com> Reviewed-on: https://gerrit.libreoffice.org/30754 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-11-09tdf#103758 wrong GL format for RGBA image buffersTomaž Vajngerl
Change-Id: I8a36234068ce0818b7baaa3b6c68d789753db6de Reviewed-on: https://gerrit.libreoffice.org/30711 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-11-09tdf#103804 reduced register areaScale shader and detection for intelTomaž Vajngerl
Some intel drivers crash when areaScale shader with "large" array is used. This adds a "reduced register" version of the areaScale shader. We still use the first version of the shader for other drivers and switch between the 2 implementations with a runtime detection. Change-Id: I1860f898c03b40a600eb1b41f7262719382a7171 Reviewed-on: https://gerrit.libreoffice.org/30571 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-11-07opengl: use shared_ptr for ImplOpenGLTextureTomaž Vajngerl
Change-Id: I755e312e3e0a69b99a8f02f7d05561b7289845ce Reviewed-on: https://gerrit.libreoffice.org/30597 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-11-04opengl: move shaders to its own directoryTomaž Vajngerl
Change-Id: I9ca5a97ae3ed2472257f468f6751903b458529a7 Reviewed-on: https://gerrit.libreoffice.org/30502 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-11-04opengl: change from BGRA to RGBA color arrangement on WindowsTomaž Vajngerl
BGRA is native color arrangement on Windows however some intel drivers have problems with large textures if they read from a BGRA buffer. So with this commit we switch to RGBA color arrangement. This shouldn't cause much performance differences, but we need to convert from RGBA to BGRA when printing. Change-Id: Ic112dc6a6c5d8b70e96041d0de15a03bbbdc406f Reviewed-on: https://gerrit.libreoffice.org/30544 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-26loplugin:expandablemethods in vclNoel Grandin
Change-Id: I1876e203d3a3a5fa36d83a9b282ba49429c1da2a Reviewed-on: https://gerrit.libreoffice.org/30261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19opengl: blit offscreen framebuffer instead of drawingTomaž Vajngerl
Change-Id: I3ab0da9cf83e0e85b8442b34ecd6eb91dd3d1bd3 Reviewed-on: https://gerrit.libreoffice.org/27875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-15clang-cl loplugin: vclStephan Bergmann
Change-Id: I40f8a6fef9d66b28a1d72551a6873b041b38b09e Reviewed-on: https://gerrit.libreoffice.org/29841 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-03Fix typosAndrea Gelmini
Change-Id: Ie75beb4e282a4d1b784a5847262e39cf9c851527 Reviewed-on: https://gerrit.libreoffice.org/29440 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22loplugin:unusedmethods in sc..vclNoel Grandin
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8 Reviewed-on: https://gerrit.libreoffice.org/29183 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-06don't need to include all these headers, reduce to required minCaolán McNamara
Change-Id: I1f05ed32cabc059309f46ec0a195705f0e774bd6
2016-09-05convert GradientStyle to scoped enumNoel Grandin
Change-Id: Ib740da708612df7a5f4b8c82262b9b1bd436604d
2016-08-31opengl: remove unsused "bitmap ops" in GL backendTomaž Vajngerl
Change-Id: I188570d11349a5344753f3948daedf0e17806c6c Reviewed-on: https://gerrit.libreoffice.org/28536 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-08-18cppcheck: noCopyConstructorCaolán McNamara
Change-Id: Id5323cb6f52666f85965e11b07e4f2bca8af4e78
2016-08-12fix windows buildNoel Grandin
after commit 500a3be0 "loplugin:countusersofdefaultparams in vcl..xmlsecurity" Change-Id: I09b07f241dc45f2d23370addfb1bc10aa2caedc4
2016-08-05opengl: add #version to shaders - minimum 130 which is OpenGL 3.0Tomaž Vajngerl
Change-Id: I5710ce91e804641d4c997bc3d06970a5ed0cb5b1 Reviewed-on: https://gerrit.libreoffice.org/27890 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-08-04tdf#101008 fix XOR renderingTomaž Vajngerl
Change-Id: Ied73966633e5ffd56faccea7ec1408bd83642b58 Reviewed-on: https://gerrit.libreoffice.org/27862 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-08-01Look also for "RDPDD Chained DD"Tor Lillqvist
Apparently in some remote desktop situations the device string uses "RDPDD" and not "RDPUDD". No idea what the semantic difference is. Change-Id: I85532b90d759d02fffb73d0f3d22166aefd4edab
2016-07-28opengl: don't initialize MSAA when we create VCL contextTomaž Vajngerl
Change-Id: Ic8060ebdabb86d8b724ee419fdfcc1f58e8a0316 Reviewed-on: https://gerrit.libreoffice.org/27614 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-28opengl: improve context creation, temp window creation on windowsTomaž Vajngerl
If anything fails at context creation then don't forget to deallocate resources. Temp window creation is written C like, as it was copy/pasted from an C example. Change-Id: Ia9d704e42206b1d4c37db2954bba4f165e3c8389 Reviewed-on: https://gerrit.libreoffice.org/27613 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-28tdf#100915 draw antialiased line just for polygon outlineTomaž Vajngerl
To get the anti-aliased polygon we draw a anti-aliased line around every trapezoid. This works fine until we draw a transparent polygon where the lines become visible because of blending. A much better and faster way is to just draw the polygon outline with anti-aliased lines. This is done with this commit. Change-Id: Ice50e5eb3343f2c5d51ade8ad0e170043541f0ff Reviewed-on: https://gerrit.libreoffice.org/27611 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-26tdf#101138 opengl: blacklist intel drivers for Win 7Tomaž Vajngerl
Change-Id: I1b3db15b2fbdd948dcc9bacf7891f8429f066150
2016-07-25opengl: log device/driver info, remove unneeded info messagesTomaž Vajngerl
Change-Id: Ica3698d0dbff1ee7a1e822d2765eb4019ccef224 Reviewed-on: https://gerrit.libreoffice.org/27498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-25opengl: check supported texture size on first GL initTomaž Vajngerl
Change-Id: I27ef828a8d47d50adbbcc3fb0fd152f4f6ffc446 Reviewed-on: https://gerrit.libreoffice.org/27497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-19clang-tidy performance-unnecessary-value-param in vclStephan Bergmann
Change-Id: I0b53c4bf5b4619cde357cf4eb432b153b1f7e6b5
2016-06-30loplugin:unusedfieldsNoel Grandin
Change-Id: If06fffa8db050df0f9c1c7da6163575bf522382e Reviewed-on: https://gerrit.libreoffice.org/26754 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-24tdf#100411 start the flush timer when batching (PostBatchDraw)Tomaž Vajngerl
When we batch a draw command we need to start the flush timer (if not already started) as otherwise it could happen that we won't flush the offscreen texture at the correct time or at all. This fixes a problem with drawing of pop-up "help" text. Change-Id: I6afcf173c3ac517ed0612cd413d95e28c19faa81
2016-06-21tdf#100451 convert texture buffer to 1-bit and 4-bit palette bufferTomaž Vajngerl
OpenGL doesn't support palettes so when the texture is created, the bitmap buffer is converted to 24-bit RGB. This works nice for showing the bitmaps on screen. The problem arises when we want to read the bitmap buffer back (like in a PDF export) as we have to convert that back to 1-bit or 4-bit palette bitmap buffer. For 4-bit this was not implemented yet, on the other hand for 1-bit it was implemented but it didn't take palette into account so the bitmap was not correct (inverted). This commit introduces a ScanlineWriter which handles writing RGB colors to 1-bit and 4-bit palette scanlines. The class sets up the masks and shifts needed to place the color information at the correct place in a byte. It also automatically converts a RGB to palette index. Change-Id: Ie66ca8cecff40c1252072ba95196ef65ba787f4c Reviewed-on: https://gerrit.libreoffice.org/26532 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-06-20add some OpenGL info to the crash reporterMarkus Mohrhard
Change-Id: Id377bc3bd814fad822d577603b1f147b71ad9ae2 Reviewed-on: https://gerrit.libreoffice.org/26445 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-06-13opengl: vertex colors are defined in range 0-255 (GLubyte)Tomaž Vajngerl
Change-Id: I27962119ade7bcbc20b94eb548bd2c9dfb386404 Reviewed-on: https://gerrit.libreoffice.org/26207 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>