Fixes regression from otherwise a nice cleanup in:
d20092259c
Also get polarity of debug logging only with a context right.
Change-Id: Id322471f01e5656e758aefc57b0d4d5ad073ec54
Shader compilation can take a while the first time; best not to
disable GL at that point. Have more of a hair trigger at other times.
Also explicitly exit if we appear to have hung in std::abort handling.
Change-Id: I45f0873672f950fb3baba0ca859d854a0bb25064
...according to <https://www.opengl.org/sdk/docs/man/html/glGetError.xhtml>:
"To allow for distributed implementations, there may be several error flags. If
any single error flag has recorded an error, the value of that flag is returned
and that flag is reset to GL_NO_ERROR when glGetError is called. If more than
one flag has recorded an error, glGetError returns and clears an arbitrary error
flag value. Thus, glGetError should always be called in a loop, until it returns
GL_NO_ERROR, if all error flags are to be reset."
(The original code was flagged by clang-tidy's
clang-analyzer-deadcode.DeadStores.)
Change-Id: Ia64e2133b6a4581230b999d4b8b63aa59199ee32
Annotate when we are in an OpenGL rendering zone.
Check for this in the VCL signal handler, and force OpenGL off here
if exception occurred inside an OpenGL code-path.
Change-Id: I85a4b3d4a374593dc55d01a39ec4c7c3c262c332
Reviewed-on: https://gerrit.libreoffice.org/17881
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
GLX returns a wrong value if the y coords are inverted. Most other
programs don't even ask for this (gnome-shell for example) and just
assumes "true" (and this works because most relevant X servers work
like this). We make this more robust and assume true only if the
returned value is GLX_DONT_CARE (-1).
Change-Id: I4800b3364fd00f5f4a8f5a459472bfa8d97827ba
This may reduce some degree of dependency on boost.
Done by running a script like:
git grep -l '#include *.boost/scoped_array.hpp.' \
| xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
| xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'
... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.
Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Idea from bubli - look for loops where the index variable is of such
size that it cannot cover the range revealed by examining the length
part of the condition.
So far, I have only run the plugin up till the VCL module.
Also the plugin deliberately excludes anything more complicated than a
straightforward incrementing for loop.
Change-Id: Ifced18b01c03ea537c64168465ce0b8287a42015
Now it's possible to add a preamble to the compiled program, so there can
be just one program with #ifdef's inside and the small variants can be
selected using #define in the preamble instead of having several almost
identical programs.
Change-Id: I6c5112313b91b6269ebdecdfc896e0f96209ea2b
desktop/unx/source/glxtest.cxx is taken directly from the Mozilla
project.
THe whole concept is taken from Mozilla and is based on starting an
early process that creates an OpenGL context. This prevents crashing
drivers to crash Libreoffice.
We read the information from the pipe as soon as we create the first vcl
Window. In that place we then decide if the device/driver combination is
blacklisted.
Change-Id: I2624d4ce06d503281a4459cf3174f57cf1f7b733
The problem is that LO drawinglayer uses a coordinate system
with an origin at the top-left corner of the screen, while
OpenGL uses a complete coordinate system (with all four
quarters, e.g.: allows negative values). The points in
LO are always positive values which means they are drawn
in the first quarter of the OpenGL coordinate system which
also means that the origin is at the bottom-left corner
of the scene. This difference causes the flipped scene.
* To solve that problem scale the projection matrix with -1.0f
along the y axis.
* glDisable(GL_CULL_FACE) is necessary to avoid dropping primitives
after scaling with -1.0.
* Since projection matrix mirrors also the textures we don't need to
do that inside the ConvertBitmapExToRGBATextureBuffer() method.
Change-Id: Ieba642f3e665778a12368fe50a20865ec8f73514