summaryrefslogtreecommitdiff
path: root/vcl/opengl
AgeCommit message (Collapse)Author
2016-01-18basebmp now only used from vcl/headless codeCaolán McNamara
Change-Id: I068d404431d3565f6ad5741edbd3693225824a4d
2016-01-13This stuff is private to vclTor Lillqvist
Change-Id: I623da89ea390a07bd6a3236b5c099be094a7acde
2016-01-13We only use the prev pointerTor Lillqvist
(Why not use a std::list? Maybe there is some reason.) Change-Id: I09010726e9fe45cfa0f530a085c48ec8d3d02cfb
2016-01-13Bin unused fieldTor Lillqvist
Change-Id: I664e3815bcdaff82a03309ae387154914471a80b
2016-01-12tdf#96385 - opengl: dynamically adjust priority of swap buffers.Michael Meeks
Initially we start with a very low priority, so that the lame bits of code that do eg. focus, and cursor rendering before the document is visible do not cause a swap, flash. Then after we've processed a REPAINT priority idle (hopefully our first paint) we adjust the swap priority to highest. Essentially a fusion of Tor's approach and mine. Change-Id: Ib9b78a18fb9359ac8c3dee1cfeb30177c08fe162 Reviewed-on: https://gerrit.libreoffice.org/21405 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-09tdf#96550 - vcl opengl - fix BGR/RGB swap for some 8-bit icons.Michael Meeks
Change-Id: Ic71b8a94cabc392e7b83df70c1691de8f4c12b43
2016-01-09tdf#96657 - vcl opengl: implement invert: Track Frame.Michael Meeks
Change-Id: I422ea8cfb8a81cca36203d496b92e15ea5b449d2 Reviewed-on: https://gerrit.libreoffice.org/21291 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-01-09tdf#96919 - vcl opengl: implement missing XOR mode.Michael Meeks
Also revert "tdf#96257: Silly work-around to produce same result ..." from commit ec8bc265050d86a749140c353360a78cce4e3fce. XOR rendering (it turns out) behaves oddly, and not for all operations. Change-Id: Ie07d988bbf7fed10fb5625ac547a01a306b05319 Reviewed-on: https://gerrit.libreoffice.org/21282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-01-08Don't use the "marketing" version number for the Intel driverTor Lillqvist
The 15.x.y.z.d number is not the real version number that our code sees. Change-Id: I8e434c0c3e3c4ff6ea8a6810f0b09f9b2befc438
2016-01-07The OpenGL Windows driver blacklist file should be in share, not user configTor Lillqvist
We don't want a potentially outdated copy to be used. Besides, when it was in the user profile, it did not exist the first time after an installation, or a user profile removal, when we attempted to read it. Change-Id: I21290090a3bbb44864730dff84c81e80add89fb3
2016-01-06We should compare an Intel version to 15.40.4.64, not 15.40.4.64.4256Tor Lillqvist
That's what the code originally did, when the versions were hardcoded in the C++ code. The 15.40.4.64.4256 is the "marketing" number for the version that was suggested to use instead. The code can not handle five-number versions anyway, and this blacklist entry was ignored. An actual version as reported by the system always has four numbers, to the best of my knowledge. Change-Id: If7e2e91bbd81fc75d03eacb38580df16c6e09d78
2016-01-06vcl: fix lifecycle errors & memory corruption.Michael Meeks
FixedTextureAtlasManager should use ref-counted textures properly. Also - dispose embedded textures early in VCL shutdown while we have a valid OpenGLContext. Also - dispose the native widget control cache earlier too. Change-Id: Id3f7a1c3b331496616f36cbf02f83737505278a5 Reviewed-on: https://gerrit.libreoffice.org/21148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-01-06loplugin:defaultparamsStephan Bergmann
Change-Id: Ic5bfc72c75745d0a4d9ff165d840ab51c90a8690
2016-01-06vcl: opengl - Kill the last glErrors on common paths.Michael Meeks
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-05Avoid indexing out of array boundsTor Lillqvist
Change-Id: I65022f30e21cb94fc8c653ef8e2797da3746875c
2016-01-05tdf#96894 - get ordering right for TextureAtlas cleanup on shutdown.Michael Meeks
Do it much earlier - while we have a valid OpenGLContext. Change-Id: Ie258283147d02984b6f507c0075d114ae7288051 Reviewed-on: https://gerrit.libreoffice.org/21089 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-01-04tdf#96690 - don't copy tiny non-rendered-to virtual devices.Michael Meeks
Change-Id: Ic9d90bb7f652599b5a6ce303aa026b7e4e255324
2016-01-02vcl: opengl - ensure we have the right GL context for rendering.Michael Meeks
Also significantly simplify, and remove paranoid ramblings from the flushing code. Change-Id: Ie7cc742caac290d77ac931c54cc4fe777a7872de
2016-01-02tdf#96858 - opengl - fix off-by-1 in glScissor clipping.Michael Meeks
Change-Id: I3085e2d2848e2041c2faadbfce099ce75c62b712 Reviewed-on: https://gerrit.libreoffice.org/21043 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-01-01Fix drawTransformedBitmap for NULL pAlphaBitmap #2.Michael Meeks
Change-Id: Ie4d03a01c557e93a3ba3b5925896e38ed07f9a27
2016-01-01vcl: un-bind render-buffer after setup & add debug.Michael Meeks
Change-Id: Ic94f94148397d46d4442f2290d331438c0799f75 Reviewed-on: https://gerrit.libreoffice.org/21029 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-01-01vcl: improve OpenGL debugging variously.Michael Meeks
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-31tdf#95507 - implement opengl / 50% invert method.Michael Meeks
Change-Id: I8488cb8e8074831a6f81e6c8c122462c9819d25d Reviewed-on: https://gerrit.libreoffice.org/21025 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-12-29cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: Ib43e53d5b6c9c130adb765ac9b769f58060ac640
2015-12-21loplugin:unusedmethodsNoel Grandin
Change-Id: Ifafdaf6da0225f244853a0042a6458643b570623
2015-12-18vcl: always re-use context from default window.Michael Meeks
This avoids problems with the initial default context getting destroyed. Change-Id: If465dfcd185a3336036b98cb2a205e0502d3f80b Reviewed-on: https://gerrit.libreoffice.org/20796 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-12-18vcl: opengl - lean on the default window's context much more.Michael Meeks
Avoid creating our own OpenGLContext to render until we need to refresh the screen. Change-Id: I29d4a1cb6193c92ed77ae98566f8b897a6bc67b5 Reviewed-on: https://gerrit.libreoffice.org/20709 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-12-16tdf#96546 - Bitmap getTexture calls can crash too - enter GL zone earlier.Michael Meeks
Change-Id: Idd095e0a3b5e5226eaf1db90bfb0a838bc51de19 Reviewed-on: https://gerrit.libreoffice.org/20741 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-12-15Get rid of :: prefix for basegfx in include/vcl and vclTor Lillqvist
We already used it without the :: prefix, in many cases in the same files even. It is nice to have some consistency. I was not bored enough to do it everywhere. Change-Id: Ic8ac5bd9b4b2c02c41e5ea937a3d9477824f21cf
2015-12-15opengl: remove device id from opengl blacklistTomaž Vajngerl
This device IDs were taken from Firefox blacklist and are not relevant for our opengl implementation that uses different opengl features. Change-Id: I32b4bf364e196e0c1fcfa0c5ee6f025757a93e65
2015-12-12check in dbg if we use correct SalBitmap instance that we expectTomaž Vajngerl
Change-Id: If1f176291304d2ef401bfb65c73ebf6635f0e756 Reviewed-on: https://gerrit.libreoffice.org/20668 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2015-12-11vcl: use a custom tag for VCL OpenGLContext's to avoid re-use.Michael Meeks
Other code is out of legacy mode now, so can't legacy as a proxy. Change-Id: Ie3807a3af680b707f2f08d058db955bc9cae6c2b Reviewed-on: https://gerrit.libreoffice.org/20647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-12-11loplugin:overrideStephan Bergmann
Change-Id: I0b0c2e33137bfd35a5048638ef3cce18ed1b06f0
2015-12-11loplugin:defaultparamsStephan Bergmann
Change-Id: Ib85337ebef0ba1a3ab00ad3adb59b4cffbba2b2f
2015-12-11tdf#93529 - move to a Mac-like double-buffered OpenGL model.Michael Meeks
This moves us to always rendering to an off-screen texture, and then (at idle) blitting this to the screen & swapping buffers. Ideally we should never see any rendering, or flicker again with this approach. Several fixes are included: + avoid multiple OpenGL contexts being created for the same window, created excessive flicker problems. + de-virtualize UseContext - which context we use is less critical. + kill 'mbOffscreen' distinction - all VCL rendering is offscreen. + implement 'doFlush' and high priority idle flushing. + bind stencil buffer for clipping vs. textures - fixing complex clopping when rendering to virtual-devices, and off-screen. + document environment. variables. + use white as default background glClear color, but red or random color for DBGUTIL. Change-Id: I6be08595b6c8deb7e6db0dbd81308b2c97d2b4ff
2015-12-11tdf#94851 use BGR color order in WindowsTomaž Vajngerl
Change-Id: I06dd26caed35bcfdf073abf64035a01e0b45fcce
2015-12-08ScaleOp is unused now after 33d7f3816aa02a1ad9b001e81fb62d21608fdf8eTor Lillqvist
Change-Id: I59093e5d5eb1b3b1e14faaf32ac83b0ddb6b1d81
2015-12-08makeSomeOpenGLContextCurrent() asserts that mpContext is not nullTor Lillqvist
So no need to test after calling it. Change-Id: I122bd5c2de23568b1cd3e98aef3c61d2ca91dfe9
2015-12-08Rename OpenGLSalBitmap::makeCurrent() to makeSomeOpenGLContextCurrent()Tor Lillqvist
The function does not, in any way, as far as I see, make the OpenGLSalBitmap object "current". It picks one OpenGLContext object and makes that current. So, rename it to be less misleading. Am I missing something? Change-Id: Ia9f8e2415e1075dd5892cd40140e6ad764feeaa4
2015-11-28-Werror,-Wunused-variableStephan Bergmann
Change-Id: I578ffc1f49e0e101781cb2c8c4160d5ac5be0d8b
2015-11-28Revert "Revert "write a log file about OpenGL driver""Michael Stahl
This reverts commit 2ebca292f96494a13a0d0baa8b19dd9010616abe. The build breakage in gengal was caused by the global variable aCacheFolder, which is initialized by a call to rtl::Bootstrap::expandMacros(), which initializes the global FundamentalIni object before tools::extendApplicationEnvironment() gets a chance to set URE_BOOTSTRAP, so FundamentalIni is empty. Change-Id: I10d8652dab15ee6924ff4ceff17000963975e30f Reviewed-on: https://gerrit.libreoffice.org/20232 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-11-28Missing includesStephan Bergmann
Change-Id: Ieb3066bbd9a34e28e61eebc475f48374bd50a33f
2015-11-28-Werror,-Wunused-functionStephan Bergmann
Change-Id: If5243c33723e2ad6d468f9bc44c5187cd19dc383
2015-11-28-Werror,-Wdeprecated-declarationsStephan Bergmann
Change-Id: I3767aee8c4272f971817757498f05494706ddd0b
2015-11-28-Werror,-WformatStephan Bergmann
"format specifies type 'int' but the argument has type 'DWORD' (aka 'unsigned long')" Change-Id: I96d239d2f674ffb30bcd596fc78d42a4af7316a1
2015-11-28-Werror,-WreorderStephan Bergmann
Change-Id: Ie24d1776f798923e2583659b2d9898da7c3f1dfd
2015-11-27Revert "write a log file about OpenGL driver"Thorsten Behrens
Caused enduring build breakage on Windows for gallery contents. This reverts commit c0772f7037794e1cea578a8833c79730fbe448c2. Change-Id: I4cd0d51b5dc88426cfef458e1b889c9d8abf9932
2015-11-25write a log file about OpenGL driverMarkus Mohrhard
Change-Id: Id960540977eb7d0d5f3bdc1c5737137a0d3694b8 Reviewed-on: https://gerrit.libreoffice.org/20117 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-11-24cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7