Commit Graph

131 Commits

Author SHA1 Message Date
Markus Mohrhard
145ad19643 some debug code for finding leaked OpenGLContexts
Change-Id: I10e8c344ae6aa2e0a4ef562154f57e2070c70e2f
2015-01-20 12:03:57 +01:00
Chris Sherlock
6cc84edfaf Revert "vcl: increment ref in OpenGLSalGraphicsImpl::AcquireContext"
This reverts commit 3d58099064.

Change-Id: Ib16fea0df909d41b2d51d5f3efe44dd4b3419352
Reviewed-on: https://gerrit.libreoffice.org/14033
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-01-20 10:52:34 +00:00
Chris Sherlock
3d58099064 vcl: increment ref in OpenGLSalGraphicsImpl::AcquireContext
Change-Id: Id8167dfe55eb6f7a83454f5eb7a3b5a96e252980
2015-01-20 21:49:50 +11:00
Luboš Luňák
fb907e83ee draw polypolygon outline properly (if wanted)
Again, polygons can apparently have curved edges.

Change-Id: I6519da7bb7f0dde7f1550fe6b03c09be127f77d6
2015-01-19 22:48:13 +01:00
Luboš Luňák
bd976c2764 do not draw with SALCOLOR_NONE
Change-Id: I882a42f58ac298d333985068b2fe6ef9ac198c8b
2015-01-19 22:48:11 +01:00
Luboš Luňák
168315e3b7 remove needless loop
Change-Id: Iaec5aa5bd353c888a3b35a277a3618c29d9cbd67
2015-01-19 22:48:09 +01:00
Luboš Luňák
e437b13008 try to handle properly fillcolor != linecolor in opengl polypolygons drawing
Change-Id: I962416f48fdb348d8a3d95edf747cfe2f1c929c9
2015-01-19 12:17:52 +01:00
Luboš Luňák
90630adcc1 draw polypolygons properly in opengl backend
The polygons that make the polypolygon cannot be simply drawn one onto another,
because if they overlap, it's actually xor (as used e.g. for drawing the border
when editing a text box Impress, which without this fix just made it a full
rectangle instead of a frame).

Change-Id: I67c7f6448fb3ee0f9742a2299c612515abff68d8
2015-01-19 12:17:52 +01:00
Luboš Luňák
b8b37e6ef2 fix opengl hairline special casing
Apparently polygons can consist of curves too.

Change-Id: Ie35861e6d182e4bd4ac0523e78a90618c96f09a6
2015-01-19 12:17:52 +01:00
Luboš Luňák
1f978c136e use AA for convex polygons when needed too
Change-Id: I8e66d369956a9bcf9c63c6eccad47d4b7a7eb67d
2015-01-19 12:17:52 +01:00
Caolán McNamara
674436511d coverity#1264396 Uninitialized scalar field
Change-Id: I085f2d0e15c88b995bea3f99945c9ab2e2bcc909
2015-01-15 20:18:02 +00:00
Caolán McNamara
9de63f23c7 WaE: vcl/opengl/gdiimpl.cxx
Change-Id: Ibd5c8574b0454f9f3688a65d246fd2dea4d0dda8
2015-01-12 20:22:17 +00:00
Luboš Luňák
e126f5cb09 implement optimized hairline drawing for opengl
As a side effect, this prevents the lines from looking too wide,
because of generic polygon drawing being a bit too generous with AA.

Change-Id: I17314c39fd57e33ecbd10b8a8785c600bdc5b212
2015-01-12 13:34:38 +01:00
Luboš Luňák
ca1f918c32 make AA edges of objects look smoother (opengl)
Change-Id: I66a04febdbfa673e0883ab6f574bb7768cad7953
2015-01-12 13:34:14 +01:00
Luboš Luňák
67d6aef4c5 clean up resetting of solid color when using opengl AA
118529d4644a and 011903894 might have been technically correct, but
'mProgramIsSolidLineColor' is clearly a misnomer at best, and they'd
have made it even more likely that this would break yet again.

Change-Id: I1f01663e2abc0b1b0e557ae7241637a96e1a402a
2015-01-12 13:31:49 +01:00
Luboš Luňák
b8b49af63e fix confusion between transparency and opacity
Change-Id: Ifa69f3272ebda2a61ac00d2affb8aebd4524f0fc
2015-01-12 13:31:47 +01:00
Markus Mohrhard
1ddb7c2c9d it makes no sense to use the line color in some cases
Hopefully that helps a little bit with some strange rendering effects.

Change-Id: I6b001bf31d745d6d19f91acadee5ceb0e5480025
2015-01-07 08:54:47 +01:00
Markus Mohrhard
3a74b40f0f make sure to use the FillColor when we used it before
Change-Id: I36443d12e1607221b9505d1e05a51e804d714e16
2015-01-07 08:54:46 +01:00
Markus Mohrhard
5c60dab390 add some warnings to non-implemented features
Change-Id: Icbd1a46dc426a0527422d55f77e67eac755bbc8b
2014-12-31 01:04:31 +01:00
Luboš Luňák
783ba49aa0 draw also opengl polygon with AA edges if AA is wanted
Especially given that lines are sometimes actually drawn using polygons.

Change-Id: I429a24faff94f8b9accc20bdee3ff66f47669bde
2014-12-18 12:05:36 +01:00
Luboš Luňák
5e7709c5e9 use AA for lines only when AA is active
Change-Id: I9965f58b8f06f1cec2c419dcf16d8aebf9cd97b8
2014-12-15 22:15:01 +01:00
Caolán McNamara
580e211541 -Werror=unused-but-set-variable
Change-Id: Ia65754272ff5c1661241dd503cef23c7a89b660e
2014-12-15 12:55:49 +00:00
Luboš Luňák
f8520e2999 draw lines anti-aliased (opengl vcl)
Change-Id: I3a67da89cedbb6a58b2556abf4553857125af5a6
2014-12-15 13:05:35 +01:00
Luboš Luňák
cbc57a99c2 allow using more than one opengl program during one draw "operation"
I.e. between one PreDraw()/PostDraw() pair.

Change-Id: I358d603ff33fa7416a4033bf074fe390b1112fcc
2014-12-15 13:05:17 +01:00
Michael Meeks
b7d74366a9 vcldemo: disable broken gradient stencil use.
Change-Id: Ifce85b1a7fa8e8b6fc57802a5fb559d2db50ba2a
2014-12-11 14:09:12 +01:00
Louis-Francis Ratté-Boulianne
01bed8089a vcl: Re-use a framebuffer of the same size when possible
Conflicts:
	include/vcl/opengl/OpenGLContext.hxx

Change-Id: Id9c7932976ce9d9282776c20d93d9cca4d290056
2014-12-11 07:57:33 +01:00
Louis-Francis Ratté-Boulianne
4c424d7852 vcl: Keep the same context for VirtualDevice to avoid FBO switches
Change-Id: I66496fae902db9df5b8301b00bb779f42adaa7a7
2014-12-11 07:57:32 +01:00
Louis-Francis Ratté-Boulianne
f0f5f50243 vcl: Limit Cairo surface size to the clipping region to improve performance
Conflicts:
	vcl/unx/generic/gdi/openglx11cairotextrender.cxx

Change-Id: I469b34c9f1047a274550229391d3dfb578291df6
2014-12-11 07:57:30 +01:00
Louis-Francis Ratté-Boulianne
53193345e0 vcl: Release the OpenGL context for offscreen rendering after each operation
Change-Id: If253a4c0a1f64b1cc54e0079d4455abf39620ac0
2014-12-03 14:05:34 +01:00
Louis-Francis Ratté-Boulianne
0a04ceca6c vcl: Don't create new contexts for Virtual Devices on Windows
Change-Id: I561a8142f986aca89e796ce2c4a0902fae41f9e6
2014-12-03 14:05:34 +01:00
Markus Mohrhard
8091457a23 Revert "use boost::shared_ptr instead of manual ref counting"
This reverts commit 8eeb02dcc1.

Conflicts:
	include/vcl/opengl/OpenGLContext.hxx
	vcl/inc/openglgdiimpl.hxx
	vcl/opengl/gdiimpl.cxx

Change-Id: I85cc7a46876ffba5ab861f6dd83b07da466b212b
2014-12-02 21:52:14 +01:00
Michael Meeks
aefeef36fd vcl: use resetToReInitialize to avoid context problems on Windows.
It appears that we have to do this for VirtualDevices, where we have
freed / re-allocated the underlying resource, or we fail to switch the
current context, and render to the wrong place, before blatting a
blank texture over the top of it.

Change-Id: I0253f216ea7dc9786374dc83ca38f4f6295e3035
2014-12-02 11:58:47 +01:00
Louis-Francis Ratté-Boulianne
f1bfdc153b vcl: Fix a coordinate issue when getting a bitmap from a VirtualDevice
Change-Id: I06fef2765f2dc9d64a991385a984a4c75a1fd424
2014-12-02 11:58:46 +01:00
Louis-Francis Ratté-Boulianne
99ade27b04 vcl: Only load OpenGL shaders once for each context
Change-Id: Idbf9026c5e64ef41d4c913153dfddf36923ff7de
2014-12-02 11:58:45 +01:00
Michael Meeks
5dcaefdae5 vcl: Consolidate size information around the GeometryProvider.
Conflicts:
	vcl/inc/openglgdiimpl.hxx

Change-Id: I1d764a8dba1850d2475f08e1014a085846f336c3
2014-12-02 08:34:52 +01:00
Louis-Francis Ratté-Boulianne
d6b51a87b4 vcl: Use the current OpenGL context for VirtualDevice and Bitmap if possible
Conflicts:
	include/vcl/opengl/OpenGLContext.hxx
	vcl/inc/openglgdiimpl.hxx
	vcl/opengl/gdiimpl.cxx
	vcl/opengl/x11/gdiimpl.cxx
	vcl/source/opengl/OpenGLContext.cxx

Change-Id: I17f6ce66fb8b5bc027d35b4016ae56c24ee0a738
2014-12-02 08:34:51 +01:00
Tor Lillqvist
ea25c799ea WaE: implicit conversion of NULL constant to 'boost::detail::sp_nullptr_t'
Change-Id: I71923bdeb7b66662f114b3e72d9e3846f8b9ff92
2014-12-01 10:06:23 +02:00
Markus Mohrhard
8eeb02dcc1 use boost::shared_ptr instead of manual ref counting
Change-Id: I3c2ed9b5641202ff965c3a0c833c8201b2b1548b
2014-12-01 07:37:06 +01:00
Markus Mohrhard
6acfb0e75e no need to declare variables before use
Change-Id: Ia732e283fa07ec5ece58e49dca2dcc5c61495109
2014-11-30 00:47:32 +01:00
Markus Mohrhard
ae88bc4f53 if we use hungarian notation let use it consistently
Change-Id: Ia17a5d983afb98e0b348909a66be85ea55f8a47a
2014-11-30 00:47:32 +01:00
Michael Meeks
7a1cb6c395 vcl: misc. TODO comment expansion.
Change-Id: Iac9e998c2737a370aff382f8c4ae68af8e59f521
2014-11-25 10:13:25 +00:00
Caolán McNamara
8ccf559473 coverity#1255909 Uninitialized scalar field
Change-Id: I162199233c9d3feb03e7ab33b777174b2a03035a
Reviewed-on: https://gerrit.libreoffice.org/13104
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-11-24 20:40:42 +00:00
Caolán McNamara
f47080cb24 coverity#1255387 help coverity out here wrt Division by zero
Change-Id: I3923655d6d4b9c2906cda72e1f91f20d9b5a1354
2014-11-24 16:35:56 +00:00
Louis-Francis Ratté-Boulianne
357011b5ba vcl: Make sure the active framebuffer is the right one before drawing
Change-Id: Icc30bee1d58dbf8f5e7b65ba90cfdf0c9135b464
2014-11-22 20:14:22 +01:00
Louis-Francis Ratté-Boulianne
7a64d1e1cc vcl: Improve precision and performance of clipping when region is a RegionBand
Change-Id: I7a481ba86d03b0eb8f4b456e38cfa89b6cbc209d
2014-11-22 20:14:21 +01:00
Louis-Francis Ratté-Boulianne
fa77801f3e vcl: Track the GL context's clip region and update before drawing when needed
Change-Id: Ibec92851dc87f6696ee55a8db10fe160cd97d09c
2014-11-22 20:14:20 +01:00
Louis-Francis Ratté-Boulianne
5f86a6165b vcl: Move the painting fence to the OpenGL context
Change-Id: I462e68a1ad7a56fafe57504959cf169a70665f81
2014-11-22 20:14:20 +01:00
Louis-Francis Ratté-Boulianne
e26237f6cb vcl: Always use the same OpenGL context when drawing in a window
Change-Id: Ief0e947149c133aaa8e81973e088c4df6432bfdc
2014-11-22 20:14:19 +01:00
Louis-Francis Ratté-Boulianne
3149cc341b vcl: Draw native widgets twice on black/white background to synthesize alpha
Change-Id: Ic4c073360070a559855732d2de41ae9085d7d51b
2014-11-22 20:14:18 +01:00
Louis-Francis Ratté-Boulianne
360b988ea0 vcl: Correctly set the values for the GL scissor test when clipping
Change-Id: I5ff59f93a3760e6a920860f8aa5fc3f62d0d183d
2014-11-22 20:14:18 +01:00