summaryrefslogtreecommitdiff
path: root/vcl/opengl
AgeCommit message (Collapse)Author
2016-02-26log some information about used OpenGL deviceMarkus Mohrhard
Change-Id: I0c050396e6b1efa7dd2f003a79a9dc506135197a Reviewed-on: https://gerrit.libreoffice.org/22555 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-25opengl: shader based polyline rendering - fixes tdf#97137 for OGLTomaž Vajngerl
Adds native opengl polyline rendering to draw polylines, line joins and line caps as triangle strips. The vertex shader allows for the dynamic line width by calculating the correct vertex posiitons, and the fragment shader is used for anti-aliasing. Change-Id: If7982c828cae1fae59c57194c8ac77e5ad7f1d26
2016-02-24-Werror,-Wunused-functionStephan Bergmann
since ce81a477d228277f44e96356e85d92467eb7a0b9 "tdf#97458 - remove unused intel opengl driver version special-casing." Change-Id: I4d1e804bef054db5a999b23c35c308e1a0c5ece3
2016-02-22include breakpad into the buildMarkus Mohrhard
Change-Id: I1bfd107502332fc86ae5e96bbc1f475b8d669c6c Reviewed-on: https://gerrit.libreoffice.org/22547 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-16use consistent #define checks for the Windows platformNoel Grandin
stage 1 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f Reviewed-on: https://gerrit.libreoffice.org/22390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-15Unit test for opengl blocklist parsing and evaluatingTomaž Vajngerl
Parsing unit test checks that the xml values are parsed correctly and that the DriverInfo structure is populated with the expected values. Evaluate unit test checks that blacklisting / whitelisting logic blocks OS/vendor/driver/device as expected. Change-Id: Ib1b0926606f0835207c324193bbe19ba83f86bdc Reviewed-on: https://gerrit.libreoffice.org/22371 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-02-15rename X11WindowProvider to a NativeWindowHandle providerCaolán McNamara
sort of thing and genericize it Change-Id: I27e1e47f2b371e5269db079cfc1262d056105f80
2016-02-13vcl: include vcl headers via triangular brackets instead of quotesChris Sherlock
Change-Id: I311f7db622ce341527fe12a92b516f800b602f92
2016-02-11tdf#97763 - avoid divide by zero for scaling images to tiny dimensions.Michael Meeks
Change-Id: I27efebcc1c24d45c17da2ad2959b673153c3eead Reviewed-on: https://gerrit.libreoffice.org/22297 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-02-11tdf#97715 fix inv. scale calculation in DrawTransformedTextureTomaž Vajngerl
When image was rotated towards 90 degree the ixscale and iyscale went towards infinity. That caused problems in fragment shader areaScaleFastFragmentShader. The problem was with calculation of destination width and height which didn't take rotation into account correctly. This commit takes this calculation from WinSalGraphicsImpl::drawTransformedBitmap. Change-Id: I30f14a1ecda21ef167e58eda8e2fcef00bdfa2b7 Reviewed-on: https://gerrit.libreoffice.org/22289 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-02-10opengl: remove unneeded mnBufWidth{Height} from OpenGLSalBitmapTomaž Vajngerl
Change-Id: Idf445b9f6b403a0d37650c14e17b7d754451edf1 Reviewed-on: https://gerrit.libreoffice.org/22258 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-02-10opengl: invert50 shader compilation errorTomaž Vajngerl
- can't assign vec4 to vec2 - LHS of `&&' must be scalar boolean Change-Id: I46bef7d41198ed1a33f9c3f7796f25358849852e
2016-02-10tdf#97700 - vcl: opengl - fix memory corrupting size mis-match.Michael Meeks
Change-Id: Iab49a20c85f9deb3e8c60a782050aa4c12b663ad
2016-02-10tdf#97700 - vcl: opengl - add asserts for horrible size mismatch.Michael Meeks
We really need to be sure that our texture and its wrapper agree on the size of the texture, and particularly the buffer it is reading into to avoid DMA'ing junk over the heap. Add paranoid assertions, also add a canary at the end of the texture so we fail hard and fast in this case. Change-Id: Ibf4869fb5cba562aa117943ce0f2f3df21ca7036
2016-02-09vcl: opengl - clear the user buffer after greyscale conversion.Michael Meeks
Change-Id: Ie87fc935bf69b5eb2c620e60d041fb95b544ec96 Reviewed-on: https://gerrit.libreoffice.org/22243 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-02-09vcl: opengl - do some writes on the CPU to help valgrind in debug mode.Michael Meeks
Change-Id: Ic44a458f7717647f399a9419fcdc8acc812edc97 Reviewed-on: https://gerrit.libreoffice.org/22241 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-02-09vcl: opengl - fix crashing / memory corrupting issues with updateChecksum.Michael Meeks
Switch to use GetTexture which is robust over a number of corner-cases. Also ensure that we have a valid VCL OpenGLContext. Change-Id: I79b2b8ee241da4ed79e93e30df005e8c32ffcf02 Reviewed-on: https://gerrit.libreoffice.org/22242 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-02-09tdf#97666 -opengl: convert the bitmap to 8bit grays using GL shaderTomaž Vajngerl
Change-Id: I4d48d29ab752814f71c697a201e70a26ae937775 Reviewed-on: https://gerrit.libreoffice.org/22223 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-02-08tdf#97458 - remove unused intel opengl driver version special-casing.Michael Meeks
Change-Id: I938bcab02edb37a5e7d72f1551867e0f5a4dd89b Reviewed-on: https://gerrit.libreoffice.org/22215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bryan Quigley <gquigs@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-01-26vcl: replace boost::shared_array with std::shared_ptrMichael Stahl
Add o3tl::make_shared_array() to create the shared_ptr with the right deleter. The main difference then is that shared_array has operator[], but this code didn't even use it. Change-Id: I500ffc2f92b99c2a3924c0cdcdaa101956b69add
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>