Benjamin Otte [Mon, 10 Jul 2023 01:42:55 +0000 (03:42 +0200)]
vulkan: Emit a renderpass op
... instead of doing the equivalent things manually by creating a
RenderPass and calling the relevant functions.
Now all renderpass operations are indeed stored in ops.
Also reshuffle the command emission code, because we no longer need to
emit the ops for the base renderpass.
As a result we only submit a single command buffer containing all the
render passes instead of once per render pass.
We also bind vertex buffers and descriptor sets only once now at the
start instead of once per renderpass.
Benjamin Otte [Sun, 9 Jul 2023 21:45:20 +0000 (23:45 +0200)]
vulkan: Sort the ops
Use the OpClass.stage to order operations:
1. Put upload ops first
This way we can ensure they are executed first.
2. Move subpasses for offscreens in front of the pass using them.
Benjamin Otte [Sun, 9 Jul 2023 21:44:52 +0000 (23:44 +0200)]
vulkan: Store a pointer to the first op
This is not yet useful, but will be soon.
Benjamin Otte [Sun, 9 Jul 2023 21:44:02 +0000 (23:44 +0200)]
vulkan: Indent verbose prints again
This feature was lost when refactoring, restore it.
Benjamin Otte [Sun, 9 Jul 2023 20:33:54 +0000 (22:33 +0200)]
vulkan: Rename offscreenp to renderpassop
They should be used for all renderpasses, not just offscreens.
Benjamin Otte [Sun, 9 Jul 2023 18:28:12 +0000 (20:28 +0200)]
vulkan: Move the render ops to the Render
This is a massive refactoring because it collects all the renderops
of all renderpasses into one long array in the Render object.
Lots of code in there is still flaky and needs cleanup. That will
follow in further commits.
Other than that it does work fine though.
Benjamin Otte [Sun, 9 Jul 2023 14:50:19 +0000 (16:50 +0200)]
vulkan: Batch together multiple draw calls
If multiple instances of the same op appear in order, we can emit one
vkCmdDraw() for all of them together.
So do that.
Benjamin Otte [Sun, 9 Jul 2023 14:27:02 +0000 (16:27 +0200)]
vulkan: Unify some functions
All the ops that just execute a shader do pretty much the same stuff, so
put it all in a single function that they all call.
It's basically faking a base class for them.
Benjamin Otte [Sun, 9 Jul 2023 13:56:30 +0000 (15:56 +0200)]
vulkan: Make Op->command() return the next op
This way, ops can batch themselves.
They don't dothat yet, but you know where this is going...
Benjamin Otte [Sun, 9 Jul 2023 13:40:48 +0000 (15:40 +0200)]
vulkan: Add a Stage enum
It's declaring at which stage this command should run. So far nothing is
using it, but that will follow in future commits.
Benjamin Otte [Sat, 8 Jul 2023 21:16:01 +0000 (23:16 +0200)]
vulkan: Bind descriptor sets early
Simplfies the code and doesn't change anything.
Benjamin Otte [Sat, 8 Jul 2023 19:28:56 +0000 (21:28 +0200)]
vulkan: Remove unused arguments from Op vfuncs
Makes code a lot simpler.
Benjamin Otte [Sat, 8 Jul 2023 18:40:48 +0000 (20:40 +0200)]
vulkan: Cache VkRenderPasses in render object
Instead of recreating the same renderpass object in every frame and for
every offscreen, just reuse it.
Technically, we can save this per-renderer or even per-display (it
should really be cached by VkDevice), but we have no infrastructure for
that.
Benjamin Otte [Sat, 8 Jul 2023 18:16:39 +0000 (20:16 +0200)]
vulkan: Rename function
The function name gsk_vulkan_render_get_pipeline() had been used for
GskVulkanPipeline. Since those are gone now, we can use that name for
VkPipelines.
Benjamin Otte [Sat, 8 Jul 2023 18:10:04 +0000 (20:10 +0200)]
vulkan: Cache framebuffer in image
Instead of recreating them every frame for every render pass, reuse the
same framebuffer.
Benjamin Otte [Sat, 8 Jul 2023 07:04:12 +0000 (09:04 +0200)]
vulkan: Put the vertex buffer into the render object
Renderpasses get recreated every frame, but we keep render objects
around. So if we keep the vertex buffer in the render object, we can
also keep it around and just reuse it.
Also, we only need one buffer for all the render passes, which is
another bonus.
The initial buffer size is chosen at 128kB. Maximized Nautilus,
gnome-text-editor with an open file and widget-factory take ~100kB when
doing a full redraw. Other apps are between 30-50kB usually.
So I chose a value that is not too big, but catches ~90% of cases.
Benjamin Otte [Fri, 7 Jul 2023 01:18:44 +0000 (03:18 +0200)]
vulkan: Add an offscreen end op
This is basically a fancy no-op for now, but reordering of ops will need
it to indicate end of offscreen commands.
Benjamin Otte [Fri, 7 Jul 2023 00:38:22 +0000 (02:38 +0200)]
vulkan: Don't intern strings
Interning strings is slow, especially if we can instead do direct
pointer compares.
Also refactor the pipeline lookup code a bit to make use of the
refactored code.
Benjamin Otte [Thu, 6 Jul 2023 04:40:09 +0000 (06:40 +0200)]
vulkan: Add VulkanOp->next
Set it after creating all the ops and then use it for iterating.
Note that we cannot set it while creating the ops because the array may
be realloc()ed into a different memory region which would invalidate all
the pointers.
It currently has no use, but that will come later.
Also put the typedefs into headers in gsk/vulkan, they have nthing to do
outside that directory.
Benjamin Otte [Wed, 5 Jul 2023 07:10:08 +0000 (09:10 +0200)]
vulkan: Remove all the semaphores
They aren't necessary with just one queue.
Benjamin Otte [Wed, 5 Jul 2023 05:16:58 +0000 (07:16 +0200)]
vulkan: Remove unused stuff from render object
Neither cleanup images nor multiple renderpasses are used anymore since
both of those are now handled inside the render ops.
Benjamin Otte [Wed, 5 Jul 2023 05:06:17 +0000 (07:06 +0200)]
vulkan: Pass the node when setting up
Remove the function to add a node from both the GskVulkanRender and the
GskVulkanRenderPass.
That means they are both now meant to draw exactly one node.
Benjamin Otte [Wed, 5 Jul 2023 04:32:52 +0000 (06:32 +0200)]
vulkan: Add infrastructure for printing ops
... and add a GSK_DEBUG=verbose setting making use of it.
Benjamin Otte [Mon, 3 Jul 2023 23:55:17 +0000 (01:55 +0200)]
vulkan: Repurpose mask shader
Use if for mask nodes to do the generic source image + mask image
operation with the 4 available mask modes.
Benjamin Otte [Mon, 3 Jul 2023 14:14:57 +0000 (16:14 +0200)]
vulkan: Remove op.get_pipeline()
It's unused now that GskVulkanPipeline is gone.
Benjamin Otte [Mon, 3 Jul 2023 13:49:36 +0000 (15:49 +0200)]
vulkan: Remove GskVulkanPipeline
Pipelines are handled differently now.
Benjamin Otte [Mon, 3 Jul 2023 13:57:30 +0000 (15:57 +0200)]
vulkan: Add gskvulkanprivate.h
It's the new place for all the common stuff.
Because the old place is about to go away.
Benjamin Otte [Mon, 3 Jul 2023 13:47:53 +0000 (15:47 +0200)]
vulkan: Turn push constants into an op
This removes the last remaining original op from the gskvulkanrenderpass.c,
so that file got some cleanup, too.
Benjamin Otte [Mon, 3 Jul 2023 07:15:04 +0000 (09:15 +0200)]
vulkan: Make glyphs use new node ops
This is a rudimentary - but working - port.
Glyph uploads are still using the old machinery, a bunch of functions
still exist that probably aren't necessary anymore and each glyph emits
its own node.
This will need to be improved in further commits.
Benjamin Otte [Mon, 3 Jul 2023 05:53:22 +0000 (07:53 +0200)]
vulkan: Add a glyph shader
This shader is an updated version of the mask shader, but I want to use
the mask name for the mask node and that's a different functionality.
Also, add an operation for it and partially implement the mask node
using it, so we can test that this shader works.
Replacing the shader used for text rendering is the next step.
Benjamin Otte [Mon, 3 Jul 2023 01:23:17 +0000 (03:23 +0200)]
vulkan: Remove hacky function arguments
They're unused now that we removed the old render ops.
Benjamin Otte [Mon, 3 Jul 2023 01:15:59 +0000 (03:15 +0200)]
vulkan: Port linear gradient to new ops
This was the last user of GskVulkanOpRender, so delete that one, too.
Benjamin Otte [Sun, 2 Jul 2023 22:56:31 +0000 (00:56 +0200)]
vulkan: Make border shader use new ops
Benjamin Otte [Sun, 2 Jul 2023 04:30:10 +0000 (06:30 +0200)]
vulkan: Add a blur op and use it
This removes the last old user of offscreens, so those functions are now
gone, too.
Benjamin Otte [Sun, 2 Jul 2023 03:09:24 +0000 (05:09 +0200)]
vulkan: Port inset and outset shadow to new ops
Benjamin Otte [Sat, 1 Jul 2023 04:14:48 +0000 (06:14 +0200)]
vulkan: Port blend mode to new ops
Benjamin Otte [Thu, 29 Jun 2023 19:44:40 +0000 (21:44 +0200)]
vulkan: Add cross-fade op
The benefit here is that we can now properly cross-fade when one of
start/end is fully clipped out by just replacing it with an opacity op
for the other.
This was not possible with the old way we did things.
Benjamin Otte [Thu, 29 Jun 2023 19:43:26 +0000 (21:43 +0200)]
vulkan: Factor out call to opacity op
I want to reuse it for crossfades (see next commit).
Benjamin Otte [Thu, 29 Jun 2023 04:58:55 +0000 (06:58 +0200)]
vulkan: Convert color op to new method
This is a straightforward and simple port.
Benjamin Otte [Thu, 29 Jun 2023 04:36:17 +0000 (06:36 +0200)]
vulkan: Create pipeline differently for ops
Instead of creating a pipeline GObject, just ask for the VkPipeline.
And instead of having the Op handle it, just let the renderpass look
up/create the relevant pipeline while creating commands so that it can
insert vkCmdBindPipeline calls as-needed.
Benjamin Otte [Wed, 28 Jun 2023 23:56:41 +0000 (01:56 +0200)]
Revert "vulkan: Always render clip extents"
This reverts commit
0f184d3270cfac522a05ae06d28cc2f1e32c0e6d.
The renderer is good enough to make use of the clip region.
Or rather: If it isn't, the renderpass should take care of that, not the
render object.
Benjamin Otte [Wed, 28 Jun 2023 18:50:43 +0000 (20:50 +0200)]
vulkan: Combine textures and samplers again
This reverts most of commit
f420c143e0d8947a433704969bab02aea47d82f5
again because it turns out GPUs like combined images and samplers.
But: The one thing we don't revert is allowing the C code to select any
combination of sampler and image:
gsk_vulkan_render_get_image_descriptor() now takes a 2nd argument
specifying the sampler.
This allows the same flexibility as before, we just combine things
early.
This change was inspired by
https://developer.nvidia.com/blog/vulkan-dos-donts/
Benjamin Otte [Wed, 28 Jun 2023 03:43:53 +0000 (05:43 +0200)]
vulkan: Store shaders in the display
Have a resource path => vkShaderModule hash table instead of doing fancy
custom objects.
A benefit is that shader modules are now shared between all renderers
and pipelines.
Benjamin Otte [Wed, 28 Jun 2023 02:30:35 +0000 (04:30 +0200)]
vulkan: Initialize ops differently
Instead of creating the op manually, just pass in the renderpass and
have the op created from there.
This way ops aren't really initialized anymore, they are more appended
to the queue, so instead of foo_op_init() we can just call the function
foo_op().
Benjamin Otte [Mon, 26 Jun 2023 21:26:19 +0000 (23:26 +0200)]
vulkan: Use VkPipeline instead of GskVulkanPipeline
This is in preparation for getting rid of GskVulkanPipelines.
Benjamin Otte [Mon, 26 Jun 2023 01:47:25 +0000 (03:47 +0200)]
vulkan: Use new ops for repeat nodes
The new code always uses an offscreen, even for children that are
exactly fitting texture nodes.
I would have had to write more code and didn't consider it worth it,
especially because it would have required complicating the
get_as_image() function.
This was the last node using the texture pipeline.
Benjamin Otte [Sun, 25 Jun 2023 23:40:45 +0000 (01:40 +0200)]
vulkan: Implement fallback using new nodes
With Cairo upload and texture nodes being available, we can do that now.
Benjamin Otte [Sun, 25 Jun 2023 23:39:32 +0000 (01:39 +0200)]
vulkan: Pass bounds to texture op
This way the node can do the normalization (and maybe stop doing it
in the future).
Benjamin Otte [Sun, 25 Jun 2023 23:38:50 +0000 (01:38 +0200)]
vulkan: Add a Cairo upload node
... and use it for cairo nodes.
Benjamin Otte [Sun, 25 Jun 2023 22:29:13 +0000 (00:29 +0200)]
vulkan: Port opacity to new ops
Benjamin Otte [Sun, 25 Jun 2023 21:04:43 +0000 (23:04 +0200)]
vulkan: Add offscreen and color-matrix op
.. and use them for color-matrix operations.
Benjamin Otte [Sun, 25 Jun 2023 20:48:02 +0000 (22:48 +0200)]
vulkan: Split out a function
We'll need it elsewhere soon.
Benjamin Otte [Sun, 25 Jun 2023 20:16:37 +0000 (22:16 +0200)]
vulkan: Add an argument to vfunc
We need this in the future.
Benjamin Otte [Sun, 25 Jun 2023 15:32:58 +0000 (17:32 +0200)]
vulkan: Remove nonexisting function from header
Benjamin Otte [Sun, 25 Jun 2023 03:02:48 +0000 (05:02 +0200)]
vulkan: Split out a function
Making that function externally usable allows having render passes
managed externally.
Also remove a nonexisting function from the header.
Benjamin Otte [Sun, 25 Jun 2023 03:25:01 +0000 (05:25 +0200)]
vulkan: Use new ops for TextureScale nodes
Benjamin Otte [Sat, 24 Jun 2023 22:56:13 +0000 (00:56 +0200)]
vulkan: Add new renderops for texture rendering
Adds 2 ops:
- Upload
Creates a new Vulkan image and uploads data into it
- Texture
Draws a given image
These 2 ops are then used for GskTextureNodes.
Benjamin Otte [Sat, 24 Jun 2023 22:54:10 +0000 (00:54 +0200)]
vulkan: Split texture caching code
Instead of having one function that gets the image for the texture and
uploads it if it doesn't exist yet, make it 2 functions:
One to get the texture if it exists.
One to assign an uploaded image to the texture.
This way, we can potentially do the upload ourselves.
Benjamin Otte [Sat, 24 Jun 2023 20:29:47 +0000 (22:29 +0200)]
vulkan: Actually run the op_finish()
It's a no-op for all current ops, so it isn't really necessary. But
that's about to change.
Benjamin Otte [Sat, 24 Jun 2023 20:23:04 +0000 (22:23 +0200)]
vulkan: Pass context, not uploader
We don't need the uploader when creating the image, only when uploading.
Benjamin Otte [Sat, 24 Jun 2023 02:49:39 +0000 (04:49 +0200)]
vulkan: Create the first real VulkanOp
Split out the scissor op into its own implementation as a proof of
concept of how ops are meant to look when they are actually working.
Benjamin Otte [Sat, 24 Jun 2023 02:09:56 +0000 (04:09 +0200)]
vulkan: Allocate render ops differently
Allocate the memory up front instead of passing the Op into it.
This way, we can split ops into their own source file and use
init/finish style to use them.
Benjamin Otte [Sat, 24 Jun 2023 02:00:02 +0000 (04:00 +0200)]
vulkan: Invent a new abstraction
GskVulkanOp is meant to be a proper abstraction of operations
the Vulkan renderer will be doing.
For now it's an atrocious clunky piece of junk wedged into the
renderpass codebase.
It's so temporary that I didn't even adjust indentation of the code.
Benjamin Otte [Fri, 23 Jun 2023 03:08:17 +0000 (05:08 +0200)]
vulkan: Use the actual RenderOp type
... instead of the generic one.
This is again preparation for future changes.
Benjamin Otte [Fri, 23 Jun 2023 02:40:05 +0000 (04:40 +0200)]
vulkan: Use a byte array for render ops
This allows allocating only as much memory as is needed for each op.
We don't do that yet, this is still preparation.
Benjamin Otte [Fri, 23 Jun 2023 02:22:49 +0000 (04:22 +0200)]
vulkan: Split out a function
This is preparation for future changes.
Emmanuele Bassi [Fri, 14 Jul 2023 14:04:47 +0000 (14:04 +0000)]
Merge branch 'dboles/EventControllerKeyModifiersDocs' into 'main'
EventControllerKey: doc fixes re Modifiers
See merge request GNOME/gtk!6186
Daniel Boles [Fri, 14 Jul 2023 13:22:57 +0000 (14:22 +0100)]
EventControllerKey: Remove redundant/unliked "See"
Saying "See [Thing]" is not very helpful without it being a link to
Thing, and we already get that for free as the "Type:" of the param.
Daniel Boles [Fri, 14 Jul 2023 13:22:25 +0000 (14:22 +0100)]
EventControllerKey: Remove wrong signal arg, which
caused the resulting parameter to be called keyval, but it must be state
Ekaterine Papava [Fri, 14 Jul 2023 11:48:35 +0000 (11:48 +0000)]
Update Georgian translation
Emmanuele Bassi [Thu, 13 Jul 2023 23:40:03 +0000 (23:40 +0000)]
Merge branch 'nielsdg/fix-sectionmodel-signal-doc' into 'main'
sectionmodel: Fix GIR comment for sections-changed
See merge request GNOME/gtk!6185
Niels De Graef [Thu, 13 Jul 2023 23:03:21 +0000 (01:03 +0200)]
sectionmodel: Fix GIR comment for sections-changed
Make sure to end the signal name with a colon so GIR recognizes the
signal. This should also fix the problem that the documentation for that
signal is currently missing in the rendered gi-docgen output.
Benjamin Otte [Thu, 13 Jul 2023 13:19:29 +0000 (13:19 +0000)]
Merge branch 'vulkan-resize-fix' into 'main'
vulkan: Wait for device to be idle before create/recreating swapchain
See merge request GNOME/gtk!6183
José Roberto de Souza [Wed, 12 Jul 2023 20:26:27 +0000 (13:26 -0700)]
vulkan: Wait for device to be idle before create/recreating swapchain
Wait for device to be idle because this function is also called in
window resizes.
And if we destroy old swapchain it also destroy the old VkImages,
those images could be in use by a vulkan render.
This fixes a issue reported in Mesa repository when running
GTK with Xe KMD.
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9044
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Matthias Clasen [Wed, 12 Jul 2023 20:11:46 +0000 (20:11 +0000)]
Merge branch 'fix-validate-crash' into 'main'
buildertool: Exit orderly
Closes #5948
See merge request GNOME/gtk!6182
Matthias Clasen [Wed, 12 Jul 2023 19:49:11 +0000 (15:49 -0400)]
buildertool: Exit orderly
The validate command does need a display connection,
for better or worse. So exit in an orderly fashion
if we don't have one, instead of crashing.
Fixes: #5948
Benjamin Otte [Tue, 11 Jul 2023 00:04:17 +0000 (00:04 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
textbtree: Remove unnecessary check
See merge request GNOME/gtk!6179
Benjamin Otte [Mon, 10 Jul 2023 23:38:02 +0000 (01:38 +0200)]
vulkan: Change the clip intersection check
Intersection with a roudned clip takes too long.
Instead, rename the function to may_intersect() to be clear about what
it does and then just intersect with the regular rectangle.
Benjamin Otte [Sat, 8 Jul 2023 08:42:07 +0000 (10:42 +0200)]
vulkan: intersect rects also for CLIP_NONE
If we don't clip anything, we stil have bounds - either the framebuffer
size or (more likely) the scissor rect. And we don't want to draw
anything that is outside these bounds.
So clip in those cases, too.
Stops gtk4-demo --run=listbox from trying to render the whole listbox
instead of only the visible parts.
Benjamin Otte [Mon, 10 Jul 2023 04:23:45 +0000 (06:23 +0200)]
rendernode: Implement proper GSK_IS_RENDERNODE()
Use G_TYPE_CHECK_INSTANCE_TYPE() instead of just checking for != NULL.
After all, this is a GTypeInstance.
Also fixes some gcc complaints when checking
node == NULL || GSK_IS_RENDERNODE (node)
which gcc was convinced would be always true.
Benjamin Otte [Mon, 10 Jul 2023 04:18:44 +0000 (06:18 +0200)]
textbtree: Remove unnecessary check
Since
a93614409ed79e1297469bdc1de3cb69663de71e we don't allocate the
stack anymore, so this NULL check is unnecessary now - and it's flagged
by compilers.
Matthias Clasen [Fri, 7 Jul 2023 01:15:56 +0000 (01:15 +0000)]
Merge branch 'dboles/image-notify-storage-type' into 'main'
Image—Notify when :storage-type changes from EMPTY
See merge request GNOME/gtk!6170
Emmanuele Bassi [Thu, 6 Jul 2023 23:57:16 +0000 (23:57 +0000)]
Merge branch 'wip/corey/listitemleak' into 'main'
gtklistitemmanager: Stop leaking item
Closes #5940
See merge request GNOME/gtk!6171
Corey Berla [Thu, 6 Jul 2023 23:24:29 +0000 (16:24 -0700)]
gtklistitemmanager: Stop leaking item
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5940
Daniel Boles [Thu, 6 Jul 2023 22:03:20 +0000 (23:03 +0100)]
Image—Notify when :storage-type changes from EMPTY
PROP_STORAGE_TYPE was only notified if it was changing *to* EMPTY, in
gtk_image_clear_internal(). We did not notify when it changes *from*
EMPTY to something non-empty. We should as not doing so is confusing,
e.g. if a user wants to bind :storage-type to :visible if non-empty,
which I just did! So, in functions that apply an ImageType, now notify.
Also do so in gtk_image_set_from_definition, declared in imageprivate.h,
even though none of the function there are currently used anywhere.
(Should they be removed?)
Yosef Or Boczko [Thu, 6 Jul 2023 09:38:02 +0000 (09:38 +0000)]
Update Hebrew translation
Matthias Clasen [Wed, 5 Jul 2023 23:38:38 +0000 (23:38 +0000)]
Merge branch 'wip/carlosg/switch-stylus-buttons' into 'main'
gdk/wayland: Switch behavior of BTN_STYLUS/STYLUS2 as middle/right click
Closes #5935
See merge request GNOME/gtk!6168
Carlos Garnacho [Wed, 5 Jul 2023 14:24:03 +0000 (16:24 +0200)]
gdk/wayland: Switch behavior of BTN_STYLUS/STYLUS2 as middle/right click
This mapping of stylus evdev input event codes into GDK button numbers
makes gdk/wayland inconsistent with gdk/x11, so depending on the backend
the same button middle-click pastes or right-click pops up menus.
Make the wayland backend consistent with X11, so that a GNOME wayland
session gets these buttons consistently mapped across all kinds of
clients.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5935
Daniel Boles [Wed, 5 Jul 2023 11:07:33 +0000 (12:07 +0100)]
GdkTexture: Don't mention private new_from_surface
The stuff about Cairo Surfaces is in gdktextureprivate.h, & so end users
will not be able to use them; we shouldn't confuse by implying they can.
Daniel Boles [Wed, 5 Jul 2023 11:01:43 +0000 (12:01 +0100)]
docs/list-widget: links, DirList, correct Sections
* Add links to various symbols.
* Mention DirectoryList in the "ready-made choices available" section.
* Don't say that GridView can display headers: it makes no attempt to.
Matthias Clasen [Wed, 5 Jul 2023 10:57:45 +0000 (10:57 +0000)]
Merge branch 'ebassi/issue-5934' into 'main'
Lower the Python requirement
Closes #5934
See merge request GNOME/gtk!6167
Emmanuele Bassi [Wed, 5 Jul 2023 09:13:47 +0000 (10:13 +0100)]
Do not use bleeding edge Python
The match operator was added in Python 3.10, which is a bit too new for
some downstreams.
While at it, let's fix the flake8 errors and warnings.
Fixes: #5934
Emmanuele Bassi [Wed, 5 Jul 2023 09:12:20 +0000 (10:12 +0100)]
Add flake8 configuration file
Ignore long lines; most of our Python scripts generate code or other
types of files, which makes long lines a necessity.
We should validate all our Python script in our CI as well.
Daniel Boles [Tue, 4 Jul 2023 21:42:50 +0000 (22:42 +0100)]
AlertDialog: Remove spurious/unmatched backtick
Daniel Boles [Tue, 4 Jul 2023 18:44:56 +0000 (19:44 +0100)]
ListBase: Fix a typo
Matthias Clasen [Mon, 3 Jul 2023 23:37:36 +0000 (23:37 +0000)]
Merge branch 'update-uac-script-format' into 'main'
tools/generate-uac-manifest.py: Fix formatting (unify with copy in GLib)
See merge request GNOME/gtk!6164
Benjamin Otte [Mon, 3 Jul 2023 20:40:30 +0000 (20:40 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
gsk: Catch values < 0 before bad things happen
See merge request GNOME/gtk!6165
Benjamin Otte [Mon, 3 Jul 2023 18:51:51 +0000 (20:51 +0200)]
testsuite: Add a test for mask out of bounds effects
Inverted alpha masks have an effect on the source, even if the mask
doesn't cover the source at all - or worse, is completely clipped out.
The GL renderer handles this fine, but Cairo and Vulkan had
optimizations that got this wrong.
Benjamin Otte [Mon, 3 Jul 2023 18:45:53 +0000 (20:45 +0200)]
gsk: Fix luminance in Cairo and GL renderer
In particular, fix the combination of luminance and alpha. We want to do
mask = luminance * alpha
and for inverted
mask = (1.0 - luminance) * alpha
so add a test that makes sure we do that and then fix the code and
existing tests to conform to it.
Benjamin Otte [Mon, 3 Jul 2023 05:14:53 +0000 (07:14 +0200)]
rendernode: Work around a Cairo bug
When color-matrix modifying a clear surface, the surface would remain
clear according to Cairo.
That's very unfortunate when we prepare a mask for inverted-alpha
masking.