Timm Bäder
538491efa1
gl renderer: Fix only_translation check
2018-12-02 13:25:43 +01:00
Timm Bäder
5907ff694f
gl renderer: Render non-trivial transforms to a texture
...
This way we can e.g. render rotated clips, borders, etc.
2018-11-29 08:50:18 +01:00
Timm Bäder
c0cf592336
gl renderer: Cache offscreen textures per node, not size
2018-11-29 08:50:16 +01:00
Timm Bäder
12378f0afa
gl renderer: Expand matrix metadata extraction
...
Instead of getting the translation x/y everytime we use the modelview,
get it once, when extracting the metadata. Do the same with the scale.
And save if the matrix is "simple" at all, i.e. if it only consists of a
translation and/or scale. This will be helpful later when we start
drawing transformed nodes on textures.
2018-11-29 08:23:42 +01:00
Timm Bäder
5ea211bbb1
Revert "gldriver: Don't create surfaces to upload textures"
...
This reverts commit 6466e53bfc
.
This breaks GtkGLArea.
2018-11-29 07:39:11 +01:00
Timm Bäder
ef751bc809
gl renderer: Use stack to keep track of modelview matrix
...
So we can avoid calculating metadata for matrices all the time.
2018-11-27 05:39:27 +01:00
Timm Bäder
6466e53bfc
gldriver: Don't create surfaces to upload textures
2018-11-27 05:37:38 +01:00
Timm Bäder
5936d7f8f2
gl renderer: Properly retrieve matrix scale
...
So rotating offscreen nodes works.
2018-11-08 05:13:50 +01:00
Timm Bäder
d15df65a9d
gl renderer: Save some matrix multiplications
...
We do this for every single node, which is a little costly, especially
since the common case for the modelview matrix these days is a simple
translation. So, check whether the new modelview matrix is only a
translation matrix and if so, don't do a full matrix multiplication per
node.
2018-10-11 12:27:56 +02:00
Timm Bäder
392b4d9ac5
gl renderer: Pull a few declarations into the closest scope
2018-07-17 17:33:47 +02:00
Timm Bäder
b7d948af69
gl renderer: Use a GArray for the shadow cache
...
It's very small usually, in default Adwaita the only blurred outset
shadow we have is the one for the CSD'd toplevel window.
2018-07-17 17:33:46 +02:00
Benjamin Otte
3ce3867403
gl: Don't accidentally use ints for float variables
...
The int was floor()ing the x/y coordinates of glyphs, which could cause
significant repositioning of glyphs when text was scaled via the MVP.
2018-07-13 14:56:04 +02:00
Timm Bäder
3dd188fe7e
gl renderer: Cache blurred outset shadow nodes
...
Since these are particularly expensive to render and we have a pretty
big one used in every client-side decorated window.
2018-07-08 21:50:59 +02:00
Timm Bäder
165dab8265
gl renderer: Ignore 0-sized fallback nodes
2018-06-26 21:41:29 +02:00
Timm Bäder
7f8106f2a9
gl renderer: call glViewport directly
2018-06-16 10:09:12 +02:00
Руслан Ижбулатов
10b2f6540a
Fix wrong format strings in various places
2018-06-10 21:20:59 +00:00
Timm Bäder
4ab3aada3f
gl renderer: use w axis vector from graphene
...
Instead of initializing our own one every time.
2018-06-04 21:58:44 +02:00
Timm Bäder
719b2b0525
gl renderer: Remove an outdated comment
2018-05-27 17:51:51 +02:00
Timm Bäder
251913c80e
gl renderer: Use offsets for more node types
2018-05-27 16:20:55 +02:00
Timm Bäder
c8aa5b8b4e
gl renderer: Add helper for printing a render node tree
2018-05-19 10:18:50 +02:00
Timm Bäder
31e0aaf6b0
gl renderer: Remove ops debug message
...
Without a node name, this doesn't make much sense anymore.
2018-05-02 19:48:34 +02:00
Timm Bäder
d506799e72
gl renderer: Ignore nodes outside of the clip
...
Pretty sure this will bite me later but for now we avoid rendering nodes
that we are not going to see anyway.
2018-05-01 15:13:11 +02:00
Timm Bäder
3a5a9d9233
gl renderer: Use simple offset for selected offset node children
2018-05-01 15:13:11 +02:00
Benjamin Otte
a865621519
gdk: Move begin/end_frame() functions
...
As they require a draw context and the draw context is already bound to
the surface, it makes much more sense and reduces abiguity by moving
these APIs to the draw context.
As a side effect, we simplify GdkSurface APIs to a point where
GdkSurface now does not concern itself with drawing anymore at all,
apart from being the object that creates draw contexts.
2018-04-24 23:16:58 +02:00
Benjamin Otte
48fc18c37b
gdk: Get rid of GdkDrawingContext
...
All information is kept in GdkDrawContext these days, so use that one.
2018-04-24 23:16:58 +02:00
Benjamin Otte
c6ae0ff2d1
gdk: Get rid of gdk_drawing_context_get_clip()
...
Use the identical gdk_draw_context_get_frame_region() instead.
2018-04-24 23:16:58 +02:00
Benjamin Otte
4d481ecb95
gsk: Refactor damage computation for GL renderer
...
Previously, we got the damage, then computed the changed area, then
started a frame with that changed area.
But starting a frame computes the damage for us.
So now we start a frame, then get the damage area from that, then
compute the change area.
2018-04-24 23:16:58 +02:00
Benjamin Otte
49f9d2108d
gsk: Add GskDebugNode
2018-04-24 04:06:58 +02:00
Timm Bäder
d74be1fcf0
gl renderer: Rename texture_id parameter to fbo_id
...
So this makes sense again.
2018-04-21 10:13:16 +02:00
Timm Bäder
29f38056a9
gl renderer: Fix fallback node scaling
2018-04-21 10:06:57 +02:00
Timm Bäder
4336c6412a
gl renderer: Remove unused viewport member
2018-04-15 17:12:01 +02:00
Timm Bäder
add82735bb
gl renderer: Don't use texture ids in glBindFramebuffer calls
2018-04-14 11:47:02 +02:00
Timm Bäder
fdfdada362
gl renderer: Increase GArray size by 2 up front
...
Since we know we will add two elements anyway.
2018-04-14 11:47:02 +02:00
Timm Bäder
5e81761ad0
gl renderer: Slightly change ops_offset behavior
...
Add the given delta to the current one instead of replacing it.
2018-04-11 19:14:54 +02:00
Timm Bäder
0336825537
gl renderer: Don't draw all rounded clip nodes to a texture
...
We only need to do that if the rounde clip node intersects with the
outer one.
2018-04-11 19:14:54 +02:00
Timm Bäder
d7af16c8e4
gl renderer: Render everyhing according to MV scale
...
And not the surface's scale factor. This way the magnifier works.
2018-04-11 15:31:22 +02:00
Timm Bäder
cc66b50dcd
gl renderer: Remove unused field
2018-04-11 15:31:22 +02:00
Benjamin Otte
7c313c7b25
gsk: move begin/end_frame vfuncs into the renderers
2018-04-05 14:56:38 +02:00
Timm Bäder
08296b8aee
gl renderer: Don't highlight cairo nodes as fallback
2018-03-31 14:45:01 +02:00
Timm Bäder
809fdaa3e4
shaderbuilder: Insert newlines directly after defines
...
Instead of doing that in the loop in the last interation, we can just do
it after the loop.
2018-03-30 23:15:04 +02:00
Timm Bäder
f6330846c9
gl renderer: Remover unused mask uniform
2018-03-30 23:15:04 +02:00
Timm Bäder
badada9cf8
shader builder: Remove unused members
2018-03-30 23:15:04 +02:00
Timm Bäder
be3a42b7b1
shader builder: Reuse GString for shader code
2018-03-30 23:15:04 +02:00
Chun-wei Fan
dfb06e1c7a
gsk/gl: Include cairo.h consistently
...
Follow the other sources that include cairo.h, by just doing #include
<cairo.h>, not <cairo/cairo.h>.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-03-28 22:05:17 +08:00
Timm Bäder
cc0a69e101
gl renderer: Fix some crashes
...
When the first op is a modelview or projection change.
2018-03-27 18:20:52 +02:00
Timm Bäder
b26e584e29
gl renderer: Rename everything called window to surface
2018-03-26 21:13:52 +02:00
Benjamin Otte
ce743f28a1
rendernode: Add an offset node
...
This is a special case of the transform node that does a 2D translation.
The implementation in the Vulkan and GL renderers is crude and just does
the same as the transform node.
Nothing uses that node yet.
2018-03-26 18:16:36 +02:00
Timm Bäder
433517fdc9
gl renderer: Skip all 0-sized nodes
...
These will cause problems later on.
2018-03-25 11:47:57 +02:00
Timm Bäder
7240178988
gl renderer: Remove cairo node special case
2018-03-25 11:47:57 +02:00
Alexander Larsson
695d141f32
Merge branch 'rename-window-to-surface' into 'master'
...
Rename window to surface
See merge request GNOME/gtk!72
2018-03-20 16:16:57 +00:00