summaryrefslogtreecommitdiff
path: root/vcl/opengl
AgeCommit message (Collapse)AuthorFilesLines
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann2-7/+7
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12opengl: convert to RGB buffer, use unique_ptrTomaž Vajngerl1-6/+5
User RGB buffer rather then RGBA when converting an unsupported bitmap buffer for reading into a texture. Also use unique_ptr rather then manually deleting ImplPixelFormat instance. Change-Id: I4c94c22b7e185c176e45a1b9c4db6443fe6c4234
2015-10-12opengl: Extract calculation - bytes per row into its own functionTomaž Vajngerl1-14/+18
Change-Id: I24864df3e698704d84f62be25daa3dd54b4dd356
2015-10-12opengl: improve VCL_GL_INFO reporting in OpenGLSalBitmapTomaž Vajngerl1-6/+14
Change-Id: I00d695e11f4df140482bba7d8909216515e330be
2015-10-12opengl: remove code duplication when rendering a texture comboTomaž Vajngerl1-19/+18
Change-Id: Ic184e0e96103bb63322c8aaf8758c4c8f423e0b9
2015-10-05opengl: take row stride into account when reading to 1-bit bitmapTomaž Vajngerl1-15/+21
Change-Id: Iaa67b209d5b6ab0d9c567a71dee0684a85f53f6b
2015-10-01vcl: Fix possible memory leak in OpenGLSalBitmapDaniel Robertson1-0/+1
Fix possible memory leak in OpenGLSalBitmap::CreateTexture Change-Id: Ic2d259569a5e89f60af7065b9d66ef03f82f90e7 Reviewed-on: https://gerrit.libreoffice.org/19049 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-30cppcheck: uninitMemberVarCaolán McNamara1-3/+4
Change-Id: I8409a6f00803e357a20b53fd59d77f155e057753
2015-09-30Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia7394ab3c0aa28002a7022e73c2b7d9eb73dacb8 Reviewed-on: https://gerrit.libreoffice.org/18991 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-28opengl: use VCL_GL_INFO in salbmp so messages appear apitraceTomaž Vajngerl1-12/+12
Change-Id: I134820fa81c206b835d68dcaa3967045038b6f33
2015-09-17make CalcMaskShift a verifiable operationCaolán McNamara1-11/+37
and check it on untrusted data Change-Id: I7c97a27d70f91b9686adf9dcb8b68c5aa25c2b4c Reviewed-on: https://gerrit.libreoffice.org/18637 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-16tdf#94281 - don't mix legacy and VCL OpenGLContext's.Michael Meeks3-3/+9
Each has rather different assumptions about how life should be. Change-Id: I85fffc77d14f3a5335a077fcb541a2b31c372043
2015-09-16opengl: check framebuffer completenessTomaž Vajngerl1-2/+5
Change-Id: Idd80b7390694038ab0913edab0e496593beb0e15
2015-09-16opengl: support reading back 1-bit masks from textureTomaž Vajngerl1-12/+46
Change-Id: Ibe8d9140f7a54016f2cd684198856ac27d880aa3
2015-09-16tdf#93666: use x,y coords when reading texture part + don't bindTomaž Vajngerl1-10/+12
Fixes shrinking shapes with gradients when the VirtualDev is reused to create a alpha mask (and the texture is reused and reading back from just one part of the texture which uses glReadPixels code-path). Binding texture is not necessary when we use and bind it to the framebuffer. Change-Id: Ie3994f749e1a2c17d4d3df44710b7453d7a4f45f
2015-09-16opengl: optimize search for a free slot in texture atlasTomaž Vajngerl1-7/+10
Change-Id: Ic853457871b914f9c1beb2f648bf7d9d18dce957
2015-09-16opengl: this doesn't really do anything as data is null anywayTomaž Vajngerl1-41/+4
Change-Id: Iacd75beecc14023173a9aa52a30298bbfe787d61
2015-09-16GL paint-flushing guard re-work.Michael Meeks1-23/+5
Unfortunately, since we can have 2x SalGraphics' on a OutputDevice, and one of these can be a printer - things got very confused around which context to glFlush. This de-tangles the various reference-counts. Change-Id: I1062be0b02a91fc9009deaa3ec29c5dbb227df20 Reviewed-on: https://gerrit.libreoffice.org/18604 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-09-16tdf#94213 - cleanup associated GL contexts properly when DCs released.Michael Meeks1-0/+1
Change-Id: I6b9fb899777d8e460999ac3ff038a1302e434bb5 Reviewed-on: https://gerrit.libreoffice.org/18605 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-09-16clean up VclEventListeners and VclEventListeners2Noel Grandin1-0/+1
Move them inside the vcl module. there is no need to expose their implementation. Make the VclEventListeners2 implementation similar to the VclEventListeners implemenation - I can't see the benefit of this extra complication with invalidated iterators, given the very small number of listeners typically on such a list. Change-Id: I040ddd24b10d2109af13ee25b5181703af17a109
2015-09-16tdf#94252 - avoid switching contexts un-necessarily to reduce flicker.Michael Meeks1-0/+9
Change-Id: Id4ac387174fa03c5886a990d89fd53a4f18db11c
2015-09-16tdf#94213 - release offscreen texture properly on re-size.Michael Meeks2-3/+24
We need to ensure that we use an initialized context, and that (when we re-parent) we DeInit and so reset the previous OpenGLContext. Make UseContext more paranoid as well for good measure. Change-Id: Ia45334222045e5d2f48da47560fab8511223a9a5 Reviewed-on: https://gerrit.libreoffice.org/18601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-09-15tdf#93814: Added support for caching shader program binaries.Marco Cecchetti1-2/+5
Change-Id: I21c844b47282f6b3eec443933a86421a074e24df Reviewed-on: https://gerrit.libreoffice.org/18555 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2015-09-10windows opengl: mpProgram seen as 0Miklos Vajna1-0/+6
in JunitTest_sc_unoapi_3. Change-Id: Ic7e32979f31a3376b67eb3bef59373632461e39f
2015-09-09Revert "add some warnings to non-implemented features"Tor Lillqvist1-4/+4
These warnings are too annoying. So sue me. This reverts commit 5c60dab390d66a4d5abeaf548efecf3913b90839.
2015-09-08OpenGL: use CHECK_GL_ERROR() only when a context is bound.Michael Meeks1-2/+2
Removes a large number of spurious GL errors left & right. Change-Id: I0b5639478812982b39d3b88be2600dad5d3f1fd0
2015-09-08tdf#94006 - re-factor to use rtl::Reference for OpenGLContexts.Michael Meeks5-53/+36
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-03tdf#93892: Un-share maUserBuffer when the BitmapWriteAccess is requested.Jan Holesovsky1-1/+17
Otherwise Bad Things Happen, and we may accidentally overwrite random other / shared data. Change-Id: I463354a6e910a2cb43faa229708fe5c14c79535a
2015-09-03Restored missing includes from source files.Ashod Nakashian1-0/+2
These source files relied on pch to include these missing headers (at least on Windows). Also included the script used to find the missing includes. The script is self-contained and includes unittests. It detects superfluous includes and required includes (which was used to restore the includes in this patch). Change-Id: I7ee09e5c712f42d5f6c3524898bc62dda78f5cc0 Reviewed-on: https://gerrit.libreoffice.org/18208 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-03opengl: let OutputDevice do the bezier subdivisionTomaž Vajngerl1-22/+8
Change-Id: I0620cd29695d792320c6e3209dff84822485d883
2015-09-02tdf#93859 opengl - don't cache radiobuttons, refactor code dupl.Tomaž Vajngerl2-2/+2
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-09-01More useful param typeStephan Bergmann2-3/+3
...for arg that ultimately ends up as const GLVoid *pixels arg to glTexImage2D Change-Id: I69ba2f1dd397fa103f3f59638bec727add3caed7
2015-09-01WaE: C-style cast from const sal_uInt64 * to sal_uInt8 * [loplugin:cstylecast]Tor Lillqvist1-1/+1
Change-Id: I2ab166ab0286213bf61f83fc257a3cc7123413c6
2015-09-01Removed the crc table from the check-sum headerMarco Cecchetti1-1/+1
Now can be accessed through the vcl_get_crc64_table() function Change-Id: Ife85dde373a48652a0d67460184c1f325eb91702
2015-09-01gl-checksum: added a minimum size check for using GL versionMarco Cecchetti1-1/+12
(nWidth * nHeight) < (1024*768) || nWidth < 128 || nHeight < 128 Change-Id: Iedda6a333958c76c19b837890eb3fa28e631bc90
2015-09-01CRC is an integer type -> mnChecksum.Michael Meeks1-1/+1
Change-Id: I9e4d36105a59c5f81677d8e062106dae6f709464
2015-09-01vcl_get_checksum wraps the call to the real checksum functionMarco Cecchetti1-1/+1
Change-Id: I72916f18966756ecc99e77f1b164e99377eb456e
2015-09-01moved chechsum.hxx in include/vclMarco Cecchetti1-1/+1
Change-Id: I70f82f16d5907ce0bbe2d838c4acee226886aab2
2015-09-01Added support for computing 64-bit checksum of bitmap in OpenGLMarco Cecchetti3-1/+178
Added a C++ and a GLSL implementation of a 64-bit CRC algorithm. Changed hardcoded checksum value in ooxmlimport unit test (testN777345). Change-Id: I16bb985a14866775efda49e21fe033ff64645896
2015-09-01tdf#93839 - Encourage vdevs to pick up new GL Contexts when they go invalid.Michael Meeks1-0/+13
Change-Id: I21726d0dd052fdc87e8dd36ff7122518325f6313
2015-09-01windows opengl: Don't paint cached widgets upside down.Jan Holesovsky1-2/+2
2015-09-01opengl: use "old" SubdivideBezier when drawing PolyLinesTomaž Vajngerl1-19/+14
SubdivideBezier creates polygons which are more exact for drawing in opengl when drawing hairline PolyLines - so let's use that with AA line drawing. Change-Id: I490fd0f19361b5fc9e1f4e03851c1ae1a1f75f71
2015-08-31tdf#93772 - handle framebuffer unbinding on GL context switch.Michael Meeks1-1/+1
Also start gl tests in vcldemo: $ SAL_FORCEGL=1 vcldemo --gltests Change-Id: I8f0022770d57cd60c830659e3f7fcc0721320a10 Reviewed-on: https://gerrit.libreoffice.org/18132 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-31tdf#93751 - ensure textures are unbound from framebuffers post destroy.Michael Meeks2-2/+17
Change-Id: I81aec0e6f8db57905826c54c3442528be6068700
2015-08-29we only use 8 array entriesMarkus Mohrhard1-1/+1
Change-Id: Ie85fa48906e1e6b8c19e2daba65517ea923be457 Reviewed-on: https://gerrit.libreoffice.org/18071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-08-28Add missing helpful GL trace messages outside of the impl. itself.Michael Meeks2-13/+13
Change-Id: I5b71e3c9edc3e1e89e52c2e17b5fe0a025ac66ea
2015-08-28tdf#93736 need to create trapezoid from input polygonTomaž Vajngerl1-14/+18
Currently we draw the polyline from the input polygon, but we should first create a trapezoid and draw its polygons when drawing the hairline. Change-Id: Idd850d18d05410c75a8a2c922338caf46158bfd4
2015-08-28tdf#93529 - use debug messages while rendering to break up the trace.Michael Meeks2-27/+27
Change-Id: I56629a721202d7a04bd493d4604278dea85b4212
2015-08-28initial work for conditional formatting import for orcusMarkus Mohrhard1-0/+4
Conflicts: sc/source/filter/inc/orcusinterface.hxx Change-Id: If79f58c44072b7c2c20fc2026b2a6eed6d202b63
2015-08-27coverity#1320472 Uninitialized scalar fieldCaolán McNamara1-6/+9
Change-Id: I50e07779a541bbea6b285a855fb54d419d4aed13