summaryrefslogtreecommitdiff
path: root/vcl/opengl/x11
AgeCommit message (Collapse)Author
2017-05-28remove unnecessary use of OString::getStrNoel Grandin
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
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-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-11-28don't leak impl. detailsDavid Tardon
Also, returning std::unique_ptr<>& doesn't make any sense. Change-Id: Iefb2a0bfe614264bc7b5d15652fcc15243df3d06
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-09-06don't need to include all these headers, reduce to required minCaolán McNamara
Change-Id: I1f05ed32cabc059309f46ec0a195705f0e774bd6
2016-05-23loplugin:overrideTor Lillqvist
Change-Id: Id782278645789d0b252ba3c096ca9e5538a3e5b3
2016-05-21split GLWindow into platform dependent parts and move to respective backendsCaolán McNamara
Change-Id: I636d9bdac907000e4089aebdc5548ea89ec58083 Reviewed-on: https://gerrit.libreoffice.org/25252 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-21WaE: -Werror=maybe-uninitializedCaolán McNamara
Change-Id: I9311a1fbe7e22780bd086ffeb5ca24476f3121b8
2016-05-21move glX stuff to X-only modulesCaolán McNamara
Change-Id: I8ca818dac72f0368b6af10c838603e63c7c85b1e
2016-05-21Split OpenGLContext up into SalInstance specific classesCaolán McNamara
which, at least theoretically, allows there to be vclplug specific ones. i.e. a gtk3 specific one which doesn't assume gtk3 is running under X Change-Id: I6c007a87abbd3049b6fffc70d349e3b7ac445eec
2016-05-16Fix typosAndrea Gelmini
Change-Id: If7262e114b5b4cd40e9c0a8929940199ea747595 Reviewed-on: https://gerrit.libreoffice.org/25025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-04-30opengl: track state of active and bound textures in contextTomaž Vajngerl
Add TextureState which is responsible to track the state of texture binding (and unbinding) and changing the current active texture unit. This is necessary because all GL calls reset the internal state without checking what the current state actually is and this can accumulate to a large amount of overhead. We also unbound the textures (glBindTexture with 0 as ID) after every operation which is also a major unneeded overhead which is fixed by this commit. Change-Id: I770a6a744c0c41850c576b928f027375962088aa Reviewed-on: https://gerrit.libreoffice.org/24503 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
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-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-15rename X11WindowProvider to a NativeWindowHandle providerCaolán McNamara
sort of thing and genericize it Change-Id: I27e1e47f2b371e5269db079cfc1262d056105f80
2016-01-13This stuff is private to vclTor Lillqvist
Change-Id: I623da89ea390a07bd6a3236b5c099be094a7acde
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>
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-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-11-23VirtualDevices either match another device depth, or are 1 bitCaolán McNamara
cairo can therefore always render to a svp virtual device with need for a fallback Change-Id: I5d03ae541820389e26f7448444444be009fb28a4
2015-11-23establish that Virtual Devices either match Physical Device depth or ...Caolán McNamara
are 1 or (rarely) 8 bit and lock that down. Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05
2015-11-17Check for OpenGL errors right where an error might be generatedTor Lillqvist
CHECK_GL_ERROR() is now zero-cost in a production build, so no reason to avoid it. Don't check for OpenGL errors after glX or wgl calls. They don't generate OpenGL errors but use the X and Win32 error mechanisms, as far as I see. Change-Id: I8f97ef434cbdc89d6e345a247456cfc4a1a82bb6
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
2015-09-16tdf#94281 - don't mix legacy and VCL OpenGLContext's.Michael Meeks
Each has rather different assumptions about how life should be. Change-Id: I85fffc77d14f3a5335a077fcb541a2b31c372043
2015-09-08tdf#94006 - re-factor to use rtl::Reference for OpenGLContexts.Michael Meeks
Don't use rtl::Reference for the global / list state, so the ref-count reflects the number of real users. Hold a reference during ~OpenGLContext. Change-Id: I4e57a7246159acd58ae7d5a0dfc8704b9795c894
2015-09-02tdf#93859 opengl - don't cache radiobuttons, refactor code dupl.Tomaž Vajngerl
Radio buttons and check boxes can't be cached with current framework as they have an additional rendering state provided in additional data. Refactor code to control which controls can be cached in one place only. Change-Id: I095a01cbf5dde013247d70ada89020f64c8c6510
2015-08-07opengl: cache native widget textures also for WindowsTomaž Vajngerl
Change-Id: I476f0ffaef383f3227c0c12b50fcdebf393190f6 Reviewed-on: https://gerrit.libreoffice.org/17487 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2015-07-24opengl: don't cache checkboxes for nowTomaž Vajngerl
Change-Id: I67d0dcb48d1843587abbc1dc0f7da1f8057b281e
2015-07-24Use LRU map for caching of native widgetsTomaž Vajngerl
Change-Id: Ia0423dac5309aabc5e81357cf4f67b5ee14bab31
2015-07-24tdf#92018 cache native controls for X11 OpenGL backend (for now)Tomaž Vajngerl
Change-Id: I85c7cc01113bc4ac810c450a6460059463cc8e03
2015-06-15remove unnecessary check for null when calling deleteNoel Grandin
Idea originally from caolan. Found using the following command: find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;' Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-12that case can't happen anymoreMarkus Mohrhard
Change-Id: If488a6aa6769ad45f08ad78de35402f676abe784 Reviewed-on: https://gerrit.libreoffice.org/16240 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-06-12in general this seems to make more senseMarkus Mohrhard
Change-Id: I00dfbaa9971e3ee589672e51bca07e8eddfdc167 Reviewed-on: https://gerrit.libreoffice.org/16238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-06-03more style fixesMarkus Mohrhard
Change-Id: Iadf157f3d2673047e2d81c74847b16d12478ca65
2015-06-03adapt coding styleMarkus Mohrhard
We will not update with a new version from mozilla. Change-Id: Icf9571e1efecee18a19760b2eb3041e3d9e6f108
2015-06-03document that it is a reference to a mozilla bugMarkus Mohrhard
Change-Id: Ic57a0785db05908ffd9faef30544646d2e70ee5a
2015-05-20convert SAL_LAYOUT flags to scoped enumNoel Grandin
Change-Id: I0aeea1f32136e43e90a1afb0ea84dbaff2b77587
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann
Change-Id: Iad602cece6e328c7f5d5f36adb294c97b152ade3
2015-03-26const_cast: convert some C-style casts and remove some redundant onesStephan Bergmann
Change-Id: I17c57a85bcda98ef36ddefd6562d4681d0c7d5fc
2015-02-28tdf#89482 - return size of system virtual device resource at construction.Michael Meeks
Change-Id: I832a5626b52935180f24857e56297840667eec2a Reviewed-on: https://gerrit.libreoffice.org/14678 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-02-16boost::foo_ptr->std::foo_ptrCaolán McNamara
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2014-12-15use AA for lines only when AA is activeLuboš Luňák
Change-Id: I9965f58b8f06f1cec2c419dcf16d8aebf9cd97b8
2014-12-04Move SalGenericData::GetSalDisplay() out of generic/gendata.hxxStephan Bergmann
...as it needs SalDisplay to be a complete type, but unx/saldisp.hxx depends on X11 headers and can thus e.g. not be included in generic/gendata.hxx on Android. Change-Id: Iec5f51408eef0d6eb7e2d04105a7408372b06079
2014-12-03vcl: Don't create new contexts for Virtual Devices on WindowsLouis-Francis Ratté-Boulianne
Change-Id: I561a8142f986aca89e796ce2c4a0902fae41f9e6