Timm Bäder
3a5630358f
gl renderer: Fix rounded clips in hidpi
2018-03-15 11:01:53 +01:00
Timm Bäder
04fadc508b
GskGLDriver: Use g_assert_cmphex for GL constants
2018-03-15 09:25:42 +01:00
Timm Bäder
d417595a05
gl renderer: Draw rounded clip child to a texture
...
And then clip the texture using the current (maybe also rounded) clip.
This way, the result is correct. We don't necessarily have to do the
offscreen drawing in any case, but got the safe route for now.
2018-03-14 17:28:41 +01:00
Timm Bäder
90c8619f42
gl renderer: Properly draw gl textures from a different context
...
Temporarily switch to the texture's gl context, download the texture and
create a new one in our context for it.
2018-03-14 17:28:41 +01:00
Benjamin Otte
160e6ad6f6
gdk: Split out GL texture
...
Put GdkGLTexture into its own file and rename the API to
gdk_gl_texture_foo() instead of gdk_texture_foo_for_gl().
Apart from naming, no actual code changes.
2018-03-07 16:17:15 +01:00
Timm Bäder
0234e8e2c9
gl renderer: Limit texture node size to clip
2018-03-04 19:12:04 +01:00
Timm Bäder
da431b2a43
glglyphcache: Pass lookup key to g_hash_table_lookup directly
2018-03-04 19:12:04 +01:00
Timm Bäder
ad776cc57b
gl renderer: Increase offscreen texture size
...
This fixes blurry checkbutton marks in hidpi setups, but breaks button
hover effects. That's another problem.
2018-02-16 18:00:06 +01:00
Timm Bäder
0a51f38963
gl renderer: Check the scale factor for every render
...
This way we pick up changes in the GdkWindow's scale_factor.
2018-02-06 09:19:40 +01:00
Timm Bäder
c739db0e29
gl renderer: Use a gl texture in render_texture
...
Get rid of the manual y flipping and cairo business. This keeps the gl
unit tests working at least.
2018-02-04 13:10:51 +01:00
Timm Bäder
4fa4b8525e
gl renderer: Clear resources after render_texture
...
This makes multiple consecutive render_texture calls on the same
renderer work.
2018-02-03 13:24:55 +01:00
Timm Bäder
6e70079e63
gl renderer: Reset clip when drawing offscreen
...
Just like we reset the scissor test and the viewport, we also can't use
the current clip anymore in this case.
2018-01-27 12:13:37 +01:00
Timm Bäder
684624005a
gl renderer: Fix hidpi cairo node rendering
...
We can't just unconditionally create a larger texture here, since the
incoming cairo surface might have a device scale that doesn't fit our
scale_factor. Instead, look up the surface device scale and use that.
2018-01-27 11:06:38 +01:00
Timm Bäder
1fb5d389db
gl renderer: Make width/height relation more obvious
...
In add_offscreen_ops, we use the max_x/min_x values for the texture and
viewport width, and the max_y/min_y for the texture and viewport height.
2018-01-27 11:00:59 +01:00
Timm Bäder
e3557f681c
gl renderer: Fix outset shadow outline transform
...
This fixes hidpi blurred outset shadows
2018-01-23 21:46:31 +01:00
Timm Bäder
8f4e0705dc
gl renderer: Fix shadow node child offset
...
We shouldn't apply the shadow offset when drawing the child offscreen,
instead apply it afterwards when we draw it to the current render
target.
2018-01-19 15:00:22 +01:00
Timm Bäder
41a922928e
gl renderer: Render GL textures upside down
...
These come from an FBO so we need to flip the texture coords on the y
axis, just like we do everywhere else.
2018-01-18 08:21:11 +01:00
Matthias Clasen
31fcf5b3a7
gsk: Handle GL textures
...
These textures already have a GL texture in them,
no need to create a new one.
2018-01-17 11:57:25 -05:00
Timm Bäder
4946810960
gl renderer: Render unblurred outset shadows differently
...
We don't need to draw anything to a texure for those.
2018-01-15 10:56:43 +01:00
Matthias Clasen
ba21a7764b
gsk: Reorganize env vars
...
Get rid of GSK_RENDERING_MODE and add the flags to GSK_DEBUG,
following the same pattern we use in gdk now.
2018-01-14 17:05:04 -05:00
Matthias Clasen
c56419818f
gsk: make logging per-renderer
...
Add a setter for per-renderer debug flags, and use
them where possible. Some places don't have easy access
to a renderer, so this is not complete.
Also, use g_message instead of g_print throughout.
2018-01-14 17:05:04 -05:00
Timm Bäder
b9a05be2da
gl renderer: Sprinkle some const around
2018-01-10 08:46:22 +01:00
Timm Bäder
f7ba3224b9
gl renderer: Bring back hexbox drawing
2018-01-08 17:44:37 +01:00
Timm Bäder
fcc8d778b5
gl renderer: Avoid some code duplication
2018-01-02 08:10:06 +01:00
Timm Bäder
d1a08aa2a9
gl driver: Remove some type checks in a hot path
2018-01-02 08:10:06 +01:00
Timm Bäder
0e57d173b3
gl renderer: Remove an unnecessary block
2018-01-02 08:10:06 +01:00
Timm Bäder
f92cca5229
gl renderer: Fix release build
2017-12-29 08:59:47 +01:00
Timm Bäder
6587864824
gl driver: Remove more unused API
2017-12-29 05:48:43 +01:00
Timm Bäder
e0436b3d59
gl renderer: Properly delete all shader programs
2017-12-29 05:48:43 +01:00
Timm Bäder
d2d18f74f8
gl driver: Remove gl-context property
...
No need for this to be a property.
2017-12-29 05:48:43 +01:00
Timm Bäder
1cbd4d229e
gl driver: Remove dead warning code
...
_get_fbo never returns NULL.
2017-12-29 05:48:43 +01:00
Timm Bäder
c9656e2864
gl driver: Only support one fbo per texture
2017-12-29 05:48:43 +01:00
Timm Bäder
352590cf9f
gl driver: Remove vao API
...
Unused.
2017-12-29 05:48:43 +01:00
Timm Bäder
825608af2a
gl renderer: Remove unused parameter
2017-12-29 05:48:43 +01:00
Timm Bäder
aeaab5557b
gl renderer: Only draw what we have to
2017-12-29 05:48:42 +01:00
Timm Bäder
2bc10fa365
gl renderer: draw all outset shadows
...
Instead of falling back to cairo for most of them.
2017-12-29 05:48:40 +01:00
Timm Bäder
9f2674077a
gl renderer: Properly flip texture in render_texture path
...
Just do this on the CPU instead.
2017-12-28 16:48:35 +01:00
Timm Bäder
a720a63fa3
gl renderer: Insert render target op in render_texture path
2017-12-28 16:48:35 +01:00
Timm Bäder
7a2d30323e
gl renderer: try doing outset box shadows
...
Still fall back in cases we can't handle that way.
2017-12-21 19:12:33 +01:00
Timm Bäder
f044b01549
gl renderer: Don't crash if the first op is an opacity one
2017-12-21 19:12:32 +01:00
Timm Bäder
490e15021c
gl renderer: Force cross-fade nodes offscreen
2017-12-21 19:12:32 +01:00
Timm Bäder
48be2aed23
gl renderer: Use one function per op type to apply data
2017-12-21 19:12:32 +01:00
Timm Bäder
28499032da
gl renderer: Don't leak gl resources
2017-12-21 19:12:32 +01:00
Timm Bäder
ee27b17a12
gl renderer: Fix indentation mishap
2017-12-21 19:12:32 +01:00
Timm Bäder
a83037c440
gl renderer: Implement cross fade nodes
2017-12-21 19:12:32 +01:00
Timm Bäder
075e6ac266
gl renderer: Fix shadow nodes if the child is a container
2017-12-21 19:12:32 +01:00
Timm Bäder
18e7d777a2
gl renderer: Move declarations to the beginning of the block
2017-12-21 19:12:32 +01:00
Timm Bäder
e9be72a73e
gl renderer: Fix use of uninitialized values
2017-12-21 19:12:32 +01:00
Timm Bäder
33457b4035
gl renderer: Ensure texture sizes arent 0
...
We already ceil() the given float texture sizes here, so if they are
valid, the result should definitely be > 0. Textures with size 0 can't
be properly used, especially not as render targets, where they will
trigger an assertion failure later in a glCheckFramebuffer call.
2017-12-21 19:12:32 +01:00
Timm Bäder
49c7cf36e4
gl renderer: Fix inset and outset shadows in hidpi
2017-12-21 19:12:32 +01:00