Matthias Clasen [Fri, 10 Jan 2020 17:56:47 +0000 (12:56 -0500)]
css: Stop supporting builtin images
Change the default value of -gtk-icon-source to 'none',
and stop parsing 'builtin' as a value.
Dušan Kazik [Fri, 10 Jan 2020 06:47:50 +0000 (06:47 +0000)]
Update Slovak translation
Timm Bäder [Wed, 8 Jan 2020 19:59:11 +0000 (20:59 +0100)]
rename CODE-OWNERS to CODEOWNERS
gitlab reads the new filename but not the old one.
Emmanuele Bassi [Wed, 8 Jan 2020 15:46:19 +0000 (15:46 +0000)]
Merge branch 'fixed-fixed' into 'master'
fixed layout: Actually set child transforms
See merge request GNOME/gtk!1292
Matthias Clasen [Wed, 8 Jan 2020 15:34:04 +0000 (10:34 -0500)]
fixed layout: Actually set child transforms
The code was unintentionally appending to the
existing child transform, leading to ever-moving
children when you call gtk_fixed_put.
Alex Samorukov [Wed, 8 Jan 2020 14:15:45 +0000 (14:15 +0000)]
Merge branch 'master-fix-set-functions' into 'master'
quartz: impl_class->set_functions listed twice in the object
See merge request GNOME/gtk!1283
Alex Samorukov [Wed, 8 Jan 2020 14:15:45 +0000 (14:15 +0000)]
impl_class->set_functions listed twice in the object
Alex Samorukov [Wed, 8 Jan 2020 14:10:06 +0000 (14:10 +0000)]
Merge branch 'master-eventloop-fix' into 'master'
Move `[NSApplication sharedApplication]` after event loop init to avoid window focus issues (closes #2342).
See merge request GNOME/gtk!1286
Alex Samorukov [Wed, 8 Jan 2020 14:10:06 +0000 (14:10 +0000)]
move [NSApplication sharedApplication] after _gdk_quartz_events_init() to avoid initialization issues
(cherry picked from commit
46c2451c5a3cd42aa5a94935bfc850a484288ff3)
Timm Bäder [Wed, 8 Jan 2020 09:27:51 +0000 (09:27 +0000)]
Merge branch 'check-for-sincosf' into 'master'
gsk/gsktransform.c: Fix building on non-GCC
See merge request GNOME/gtk!1291
Chun-wei Fan [Wed, 8 Jan 2020 09:05:44 +0000 (17:05 +0800)]
build: Check for sincosf()
sincosf() is really a GCC-specific function that may more may not be
supported on non-GCC compilers, so we want to check for it, otherwise we
use a fallback implementation, not unlike the one in
demos/gtk-demo/gtkgears.c.
Timm Bäder [Tue, 7 Jan 2020 16:15:02 +0000 (17:15 +0100)]
gl renderer: Handle repeat nodes with invisible children
We can handle this pretty easily by normally drawing the other
(visible) child node, if any.
Timm Bäder [Tue, 7 Jan 2020 16:14:32 +0000 (17:14 +0100)]
testsuite: Add a testcase for blend nodes with invisible children
Timm Bäder [Mon, 6 Jan 2020 09:22:54 +0000 (10:22 +0100)]
sizerequest: Remove _gtk_widget_get_preferred_size_and_baseline
Private and unused function.
Timm Bäder [Sat, 4 Jan 2020 07:54:58 +0000 (08:54 +0100)]
transform: Properly compare scale transforms
If the epsilon we use there is too much, we can run into rendering
errors because the GPU will use the actual scale value.
Timm Bäder [Fri, 3 Jan 2020 16:07:39 +0000 (17:07 +0100)]
rendernodepaintable: ceil() bounds for intrinsic size
Otherweise we floor() implicitly when casting to int, resulting in
slight scaling later.
Timm Bäder [Thu, 2 Jan 2020 13:05:30 +0000 (14:05 +0100)]
label: Fix assumptions regaring link
Timm Bäder [Thu, 2 Jan 2020 13:03:21 +0000 (14:03 +0100)]
gltextureatlas: Packing must succeed here
Timm Bäder [Thu, 2 Jan 2020 12:52:14 +0000 (13:52 +0100)]
Window: Avoid some redundant assignments
Timm Bäder [Thu, 2 Jan 2020 12:49:01 +0000 (13:49 +0100)]
colorswatch: Avoid redundant assignment
Timm Bäder [Thu, 2 Jan 2020 09:28:08 +0000 (10:28 +0100)]
transform: Scale+translate bounds directyl
Make these two code paths look the same.
Timm Bäder [Thu, 2 Jan 2020 09:04:29 +0000 (10:04 +0100)]
widget: Use cssnode api to get the filter value
it's confusing that we use GtkStyleContext here while we use the CssNode
directly elsewhere.
Timm Bäder [Tue, 31 Dec 2019 13:03:42 +0000 (14:03 +0100)]
transform: Compare class before ->next
Timm Bäder [Tue, 31 Dec 2019 07:54:42 +0000 (08:54 +0100)]
snapshot: Only normalize rectangle if we have to
We can even replace the comment this way.
Timm Bäder [Tue, 31 Dec 2019 07:26:27 +0000 (08:26 +0100)]
bin: Move vfunc implementations before class_init
And avoid every single function prototype.
Timm Bäder [Tue, 31 Dec 2019 07:25:45 +0000 (08:25 +0100)]
bin: Avoid some type checks
Timm Bäder [Mon, 30 Dec 2019 11:59:01 +0000 (12:59 +0100)]
gl renderer: Sprinkle some const around
Timm Bäder [Mon, 30 Dec 2019 09:55:03 +0000 (10:55 +0100)]
text: Reset cursor opacity when unmapping
Otherwise we might get mapped again with a half-transparent cursor.
Timm Bäder [Mon, 30 Dec 2019 09:47:53 +0000 (10:47 +0100)]
scrolledwindow: Don't snapshot junction if we use indicators
The junction doesn't make sense when we use indicators, since the
scrollbars overlap anyway. Not snappshotting it anymore has no visual
effect since it's being drawn below the scrollbars anyway.
Timm Bäder [Mon, 30 Dec 2019 08:51:49 +0000 (09:51 +0100)]
cssimagelinear: Don't call get_start_end if !repeating
This makes it clear that the !repeating case is easier.
Timm Bäder [Mon, 30 Dec 2019 08:46:15 +0000 (09:46 +0100)]
cssimagelinear: Avoid computing the length if we know it
We handlet the common easy cases manually anyway, so don't bother
sqrt()ing the x/y coords in those cases.
Timm Bäder [Mon, 30 Dec 2019 08:16:18 +0000 (09:16 +0100)]
toolitem: Remove unused members
Timm Bäder [Mon, 30 Dec 2019 08:16:09 +0000 (09:16 +0100)]
toolitem: Plug memory leak
Timm Bäder [Sun, 29 Dec 2019 15:54:56 +0000 (16:54 +0100)]
gl renderer: Add util to load vertex data with texture region
Timm Bäder [Sun, 29 Dec 2019 15:43:51 +0000 (16:43 +0100)]
gl renderer: Fix inverted dy in inset shadows
Timm Bäder [Fri, 27 Dec 2019 07:30:28 +0000 (08:30 +0100)]
gsk: Add GskParseErrorFunc to the docs
Timm Bäder [Sun, 22 Dec 2019 14:53:46 +0000 (15:53 +0100)]
gl renderer: Avoid another manual rounded rect transform
We have transform_rect() for this now.
Timm Bäder [Sun, 22 Dec 2019 10:40:30 +0000 (11:40 +0100)]
adwaita: Solve junction problem without border image
This genius piece of CSS colors only the top left (or top right in RTL)
pixel of the scrollbar junction.
Doing it this way is better because we don't have to upload a cairo node
every frame.
Timm Bäder [Sun, 22 Dec 2019 09:48:58 +0000 (10:48 +0100)]
scrolledwindow: Remove a useless local variable
Timm Bäder [Sun, 22 Dec 2019 09:42:51 +0000 (10:42 +0100)]
scrolledwindow: Avoid using gtk_widget_get_preferred_size
This way we only measure in the direction we need.
Timm Bäder [Sat, 21 Dec 2019 21:03:53 +0000 (22:03 +0100)]
gl renderer: Don't force repeat node child offscreen
Timm Bäder [Fri, 20 Dec 2019 19:56:28 +0000 (20:56 +0100)]
renderborder: Only get border width if we really need to
We did this unconditionally before the if statement, but we don't need
to do it if any of the early-out checks in the not-border-image branch
hits.
Timm Bäder [Fri, 20 Dec 2019 19:38:42 +0000 (20:38 +0100)]
gl renderer: Fix a misleading comment
Timm Bäder [Fri, 20 Dec 2019 19:31:37 +0000 (20:31 +0100)]
gl renderer: Speed up bounds transformation
We started saving the scale of the current modelview directly in the
RenderOpBuilder, so we don't need to poke the modelview stack anymore.
Timm Bäder [Fri, 20 Dec 2019 11:30:39 +0000 (12:30 +0100)]
gl renderer: Add debug code for color nodes
Timm Bäder [Fri, 20 Dec 2019 11:21:26 +0000 (12:21 +0100)]
gl renderer: Trivial variable reordering
Timm Bäder [Fri, 20 Dec 2019 11:21:04 +0000 (12:21 +0100)]
gl renderer: transform border outline like everything else
Timm Bäder [Fri, 20 Dec 2019 10:43:33 +0000 (11:43 +0100)]
gl renderer: Move work to the blur vertex shader
Timm Bäder [Thu, 19 Dec 2019 12:03:22 +0000 (13:03 +0100)]
gl renderer: Avoid copying a matrix
Timm Bäder [Thu, 19 Dec 2019 11:37:57 +0000 (12:37 +0100)]
testsuite: Add a test case for rotated border node
Timm Bäder [Thu, 19 Dec 2019 11:30:08 +0000 (12:30 +0100)]
GskTransform: Compute sin/deg of 90deg rotations manually
Otherwise we might end up with inaccuracies, e.g. when
gsk_transform_transform_bounds()'ing bounds.
Timm Bäder [Thu, 19 Dec 2019 11:29:33 +0000 (12:29 +0100)]
GskTransform: Normalize angles
Make sure all angles are in the [0..365) range
Timm Bäder [Thu, 19 Dec 2019 08:15:13 +0000 (09:15 +0100)]
snapshot: Repeat color nodes by creating a larger color node
Timm Bäder [Thu, 19 Dec 2019 05:05:01 +0000 (06:05 +0100)]
gl renderer: Print debug node message
Timm Bäder [Thu, 19 Dec 2019 04:32:25 +0000 (05:32 +0100)]
gl driver: Inline function into only caller
Timm Bäder [Wed, 18 Dec 2019 10:43:26 +0000 (11:43 +0100)]
renderbackground: Try to omit a save/restore pair
Timm Bäder [Wed, 18 Dec 2019 08:48:25 +0000 (09:48 +0100)]
rendernodes: Use floats for everything
Timm Bäder [Wed, 18 Dec 2019 08:40:04 +0000 (09:40 +0100)]
renderbackground: Save a snapshot_translate() call
Just add the values manually when really using the snapshot later. Also
unifies the two if branches by pulling out getting the x/y values.
Timm Bäder [Wed, 18 Dec 2019 08:06:16 +0000 (09:06 +0100)]
gl renderer: Load vertex data directly into vertices GArray
Timm Bäder [Tue, 17 Dec 2019 17:11:45 +0000 (18:11 +0100)]
gl renderer: Pass linear gradient stops to shaders directly
No need to copy them into the render ops like this.
Timm Bäder [Tue, 17 Dec 2019 17:10:38 +0000 (18:10 +0100)]
gsk: Make GskColorStop.offset a float
Doesn't make sense for this to be double if everything else is float.
Also makes it possible to 'easily' pass this to the GPU.
Timm Bäder [Tue, 17 Dec 2019 16:15:17 +0000 (17:15 +0100)]
Avoid a few state changes
We can't optimize the save/restore calls away in the snapshot code, so
do it from the caller side.
Timm Bäder [Tue, 17 Dec 2019 15:46:05 +0000 (16:46 +0100)]
gl renderer: Move more work to the vertex shaders
Timm Bäder [Tue, 17 Dec 2019 15:24:17 +0000 (16:24 +0100)]
gl renderer: Don't invert offset value twice
Timm Bäder [Tue, 17 Dec 2019 15:13:12 +0000 (16:13 +0100)]
gl renderer: Remove unused variable from shader
Timm Bäder [Tue, 17 Dec 2019 15:06:28 +0000 (16:06 +0100)]
gl renderer: Move color computation to vertex shader
Timm Bäder [Tue, 17 Dec 2019 14:59:42 +0000 (15:59 +0100)]
gl renderer: Move final color computation to vertex shader
.. of the coloring program, which is used all the time for text.
Timm Bäder [Tue, 17 Dec 2019 14:55:24 +0000 (15:55 +0100)]
gl renderer: Compute final color in vertex shader
This is a very often used shader. No need to to do this for every
fragment.
Timm Bäder [Tue, 17 Dec 2019 12:20:39 +0000 (13:20 +0100)]
supp: Ignore calloc in the AMD driver
What'cha gonna do
Timm Bäder [Tue, 17 Dec 2019 12:20:28 +0000 (13:20 +0100)]
testentryicons: Fix a memory leak
Timm Bäder [Tue, 17 Dec 2019 12:06:02 +0000 (13:06 +0100)]
gl renderer: Avoid an invalid read
We need to copy the color here, since the program state can live across
frame boundaries.
Timm Bäder [Tue, 17 Dec 2019 11:39:36 +0000 (12:39 +0100)]
gl renderer: Remove some unneeded calculations from shaders
Timm Bäder [Tue, 17 Dec 2019 11:27:35 +0000 (12:27 +0100)]
gl renderer: Shuffle things around a bit
Timm Bäder [Tue, 17 Dec 2019 11:20:18 +0000 (12:20 +0100)]
gl renderer: Move work to the gradient vertex shader
No need to do this stuff once per fragment.
Timm Bäder [Tue, 17 Dec 2019 11:19:37 +0000 (12:19 +0100)]
gl renderer: Add some in/out compat glue to the shaders
so we can use _IN_ and _OUT_ and get the right things for
desktop/es/legacy GL.
Timm Bäder [Tue, 17 Dec 2019 08:14:54 +0000 (09:14 +0100)]
gl renderer: Upload GL_RGBA texture data in GLES
Colored icons are still broken this way, but at least they show up and
text works.
Timm Bäder [Tue, 17 Dec 2019 08:07:34 +0000 (09:07 +0100)]
gltextureatlas: Use more correct debug name for texture
These aren't all glyph atlases anymore.
Timm Bäder [Tue, 17 Dec 2019 08:06:15 +0000 (09:06 +0100)]
GdkGLContext: check for GL_KHR_debug for GL debug output
This is available in GLES.
Timm Bäder [Mon, 16 Dec 2019 06:34:35 +0000 (07:34 +0100)]
gl renderer: Mark beginning of frame if DEBUG_OPS is set
Timm Bäder [Mon, 16 Dec 2019 06:13:37 +0000 (07:13 +0100)]
gl renderer: Trivial declaration reorder
Timm Bäder [Mon, 16 Dec 2019 06:01:34 +0000 (07:01 +0100)]
gl renderer: Remove a few outdated comments
Timm Bäder [Mon, 16 Dec 2019 05:41:07 +0000 (06:41 +0100)]
gl renderer: Remove unused translation handling
Timm Bäder [Mon, 16 Dec 2019 05:32:36 +0000 (06:32 +0100)]
gl renderer: Don't copy matrix/offset of color matrix nodes into ops
Timm Bäder [Mon, 16 Dec 2019 05:29:01 +0000 (06:29 +0100)]
gl renderer: Initialize alpha uniform to 1.0
This makes gl-legacy work and gl-gles work except for text and icons.
Timm Bäder [Mon, 16 Dec 2019 05:16:26 +0000 (06:16 +0100)]
gl renderer: Make RoundedRect work in gles
Which can't return struct types containing arrays. So let's revert to
the previous version but still send the rect along as a vec4[3];
Timm Bäder [Sat, 14 Dec 2019 21:06:12 +0000 (22:06 +0100)]
gl renderer: Rewrite shader builder
Use a unified approach to write both vertex and fragment shader in the
same file.
Timm Bäder [Sat, 14 Dec 2019 14:43:12 +0000 (15:43 +0100)]
gl renderer: Fix program uniform updating code
This breaks the initial uniform value, but we will fix that in a later
commit in a different way.
Timm Bäder [Sat, 14 Dec 2019 14:41:32 +0000 (15:41 +0100)]
gl renderer: Only send clip corners if we need to
We change the clip bounds a lot more ofthen than the clip corners and
they are already split up in the shader, so only send the corners if we
need to.
Timm Bäder [Sat, 14 Dec 2019 14:14:15 +0000 (15:14 +0100)]
gl renderer: Fix color comparison
Timm Bäder [Sat, 14 Dec 2019 13:33:38 +0000 (14:33 +0100)]
gl renderer: Shorten debug output impl
This will leak a string but WHATEVER.
Timm Bäder [Sat, 14 Dec 2019 13:33:17 +0000 (14:33 +0100)]
gl renderer: Fix debug color output
Timm Bäder [Sat, 14 Dec 2019 12:53:59 +0000 (13:53 +0100)]
gl renderer: Rewort passing rounded rects to shaders
Timm Bäder [Wed, 11 Dec 2019 17:24:35 +0000 (18:24 +0100)]
gl renderer: Don't copy border outline corner sizes around
We already offset + scale the outline and its corners, just pass those
directly to the shader.
Timm Bäder [Tue, 10 Dec 2019 14:08:47 +0000 (15:08 +0100)]
gl renderer: stop copying current color around
Just use a pointer now.
Timm Bäder [Tue, 10 Dec 2019 13:49:30 +0000 (14:49 +0100)]
gl renderer: remove a memory leak
Timm Bäder [Tue, 10 Dec 2019 13:22:52 +0000 (14:22 +0100)]
GdkRGBA: Use floats instead of doubles
Timm Bäder [Mon, 9 Dec 2019 10:58:52 +0000 (11:58 +0100)]
progressbar: Remove unnecessary snapshot implementation
Timm Bäder [Sat, 7 Dec 2019 12:11:07 +0000 (13:11 +0100)]
gl renderer: Split blurring a node into its own function
Timm Bäder [Wed, 11 Dec 2019 07:38:57 +0000 (08:38 +0100)]
gl renderer: Remove some unused uniforms
Timm Bäder [Tue, 3 Dec 2019 15:16:18 +0000 (16:16 +0100)]
gl renderer: Drop a dead if statement
We already handle this earlier.