Commit Graph

51844 Commits

Author SHA1 Message Date
Matthias Clasen
d61f6ff393 vulkan: Implement blend modes
This is another example for a 2-texture shader.
So far, only separable blend modes are implemented.
The implementation is not optimized, with an
if-else cascade in the shader.
2017-09-23 01:59:50 -04:00
Matthias Clasen
b192120f39 vulkan: fix a clip handling problem
We were looking at uninitialized memory here, instead
of the type of the source clip, as we should.

This showed up as mispositioned clip in the first frame
of a crossfade stack transition, and also as overdraw in
sliding stack transitions.
2017-09-22 22:16:10 -04:00
Matthias Clasen
a75d995bd4 vulkan: Implement crossfade
This is the first shader using two textures. It almost works.
2017-09-22 22:16:10 -04:00
Matthias Clasen
8ad0539cf7 vulkan: Drop GskVulkanPipelineLayout
We already move the descriptor set layout out of it,
so we can just as well keep the pipeline layouts in
the render object as well, and get rid of this extra
object. Update all callers.
2017-09-22 22:16:09 -04:00
Matthias Clasen
9b0ee4ac99 Allow different pipeline layouts
These are differentiated by the number of textures; currently
we have shaders with 0 and 1 textures.
2017-09-22 22:16:09 -04:00
Matthias Clasen
5ff6481310 Add a getter to the pipeline layout directly from the pipeline
This is a step towards allowing multiple pipeline layouts.
2017-09-22 22:16:09 -04:00
Matthias Clasen
4c7a51f88a vulkan: Move descriptor set layout to the render object
We want to maintain a single descriptor set layout while introducing
multiple pipeline layouts, so split this off.
2017-09-22 22:16:09 -04:00
Arash Mousavi
87a112a5ad
Update Persian translations 2017-09-22 22:54:21 +03:30
Rico Tzschichholz
9f259a7391 gdk: Add g-i annotations for new event getters 2017-09-22 14:18:00 +02:00
Matthias Clasen
88664f7ccb Fix a typo 2017-09-21 22:53:49 -04:00
Emilio Pozuelo Monfort
00932b2c11 Drop gail-4.0.pc.in
libgail is gone.
2017-09-21 20:34:26 +02:00
Matthias Clasen
e97a78840f gsk: vulkan: Drop an unused api
We don't use the upload-single-region api anymore.
No need to keep it around.
2017-09-21 13:47:17 -04:00
Matthias Clasen
dbc0caf27d vulkan: Batch uploads from the glyph cache
This uses the new api that was introduced in the previous
commit.
2017-09-21 13:45:01 -04:00
Matthias Clasen
64322a2c41 vulkan: Add an api to update multiple image regions
Instead of doing multiple copy commands with a tiny buffer
for each glyph, we can just batch them all together. This
also avoids the issue of creating multiple barriers for the
same image.
2017-09-21 13:42:57 -04:00
Matthias Clasen
9a1460218c vulkan: Quiet another validation warning
It complains if a vertex shader has an out that is not matched
to an in of the fragment shader.
2017-09-21 12:05:00 -04:00
Matthias Clasen
8e26864778 vulkan: Quiet another validation error 2017-09-20 23:46:16 -04:00
Matthias Clasen
75bf6db5e0 Cosmetic change 2017-09-20 23:26:15 -04:00
Matthias Clasen
ce06c4b840 gsk: Make repeat nodes deserializable
This was just a simple oversight.
2017-09-20 23:26:15 -04:00
Matthias Clasen
b18ab9761a gsk: Fix serialization of text nodes 2017-09-20 23:26:15 -04:00
Matthias Clasen
b5eeb98374 Add simple aging for the glyph cache
This should prevent the cache from growing out of bounds.
2017-09-20 23:26:14 -04:00
Lionel Landwerlin
7d7f8e5f8e gsk vulkan: Use new api in the glyph cache
Use the newly introduced gsk_vulkan_image_new_for_atlas.
2017-09-20 23:26:14 -04:00
Lionel Landwerlin
b97fb75146 gsk: vulkan: rework image layout/access transitions
By tracking the last transition we can build the appropriate barriers.
Also use the most appropriate initial layout/access at creation :

for linear image : predefined (we prepare the content ourself through memcpy)
for everything else : undefined (we don't care about the content, will most likely be erase)
2017-09-20 23:26:14 -04:00
Lionel Landwerlin
28bd26ca06 gsk: vulkan: silence anisotropy validation warning 2017-09-20 23:26:14 -04:00
Matthias Clasen
b321b26a73 glyph cache: Upload glyphs incrementally
This does not work yet.
2017-09-20 23:26:14 -04:00
Matthias Clasen
7bbd4d41e0 vulkan: pass the context when creating a glyph cache 2017-09-20 23:26:14 -04:00
Matthias Clasen
5ee5af9bc8 vulkan: Add an upload_region api to GskVulkanImage
This will let us update larger textures incrementally.
Sadly, it does not work yet.
2017-09-20 23:26:14 -04:00
Matthias Clasen
6dbec5e4fc Add some debug output for the glyph cache
Print out some statistics and dump the glyph caches to a png,
for now.
2017-09-20 23:26:14 -04:00
Matthias Clasen
baeff2a49b Make the glyph cache grow as needed
Make it possible to have more than one texture in the
glyph cache, and create new ones when we run out of space
in the existing ones.
2017-09-20 23:26:14 -04:00
Matthias Clasen
cead00757d vulkan: Move glyph cache to a separate file
Otherwise things will get too messy.
2017-09-20 23:26:14 -04:00
Matthias Clasen
4d4a0212fb vulkan: Better glyph cache api
Move the glyph caching api to something that can support using
multiple textures. We now split the text render ops into multiple
ops for different textures, and make each op render just a substring
of the text node's glyph string.
2017-09-20 23:26:14 -04:00
Daniel Boles
c0fdf522dd ToolItem: Fix nullable annotation put on wrong arg
D’oh
2017-09-20 23:55:15 +01:00
Daniel Boles
9c7e996bce gdkseatdefault: Grab touch events where applicable
gdk_seat_default_grab() grabs POINTER_EVENTS if the capability is
GDK_SEAT_CAPABILITY_ALL_POINTING. But that enumerator is a union that
includes GDK_SEAT_CAPABILITY_TOUCH, but we never grabbed TOUCH_EVENTS,
an unused macro that was presumably created with this purpose in mind.

So, check which of the ALL_POINTING capabilities we have, and set the
right mask of POINTER_EVENTS and/or TOUCH_EVENTS as required.

As part of this, explicitly let TABLET_STYLUS take over pointer events,
as this is the intended behaviour and was the effective result before.

This should fix touch events being lost in migrating from Device.grab()
to Seat.grab(GDK_SEAT_CAPABILITY_ALL_POINTING), as found by Inkscape.

https://bugzilla.gnome.org/show_bug.cgi?id=781757
2017-09-20 19:19:35 +01:00
Daniel Boles
761194dad7 Overlay: Document style classes added per position 2017-09-20 19:19:25 +01:00
Piotr Drąg
38d1c78ff3 Update POTFILES.in 2017-09-19 19:49:39 +02:00
Carlos Garnacho
e0a3c9d2de gtkmain: Ensure to emit real GDK_LEAVE_NOTIFY events.
If we got a GDK_LEAVE_NOTIFY event from GDK, we would reset the
GtkPointerFocus, but the event would be silently consumed.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
fb81d7fc8f gdk/x11: Implement GDK_CROSSING_TOUCH_BEGIN/END/DEVICE_CHANGE events
The behavior where a touchpoint takes over the pointer position is
really backend dependent. Since this went away from the generic code,
implement it here.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
97139e4027 gdk: Remove remainings of fake crossing event delivery across touch
This was by all lights broken, and is basically an implementation detail
of the X11 backend since the pointer emulating touch just steals the pointer
cursor, so should be reimplemented there.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
f3b0a3780e gdk: Coalesce 2 GdkWindow fields in GdkPointerWindowInfo struct
One used to point to the toplevel and the other to the client-side window
that the pointer pointed to. The latter was made to be like the former in
most places, so put those together, and fix the remaining cases where the
variable might not end up with a toplevel/native window.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
c00567a64c gdk: Remove unused variable
It was supporting API that has been removed.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
0317b0d18d gdk: Remove implicit touch grab accounting
This is not necessary now that there's no client-side windows to track.
The only removed piece that could make sense is emission of grab broken
events, but it's already an stretch since the semantics of those with
multi-touchpoint is unclear.

Anyhow, This should be fixed at the GTK level, while we let GDK deal with
seat/device level grabs.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
44cb3ccfa1 gdk: Remove motion hints
Motion hints are now literally a thing of the past. Everything should be
using the full motion event stream.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
3e1f672170 gdk: Drop generation of synthesized crossing events on grabs
GDK just needs to care about toplevels nowadays, which means these events
are already delivered from the windowing. We don't need to generate
intra-window crossing events ourselves.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
a9988e18b0 gtk: Remove 2BUTTON and 3BUTTON events and event types
Those should be interpreted by widget-local gestures, not guessed at a
high level with no notions of the specific context. Users will want
GtkGestureMultiPress to replace these events.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
403a724164 gdk: Remove array of event masks
This has been unused since all events are just forwarded instead of
checking client-side windows evmasks.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
1f91ca0cec gtklistbox: Remove enter/leave/motion event handlers
Those worked similarly to those in GtkFlowBox, but would additionally
handle "active" state for child rows. Simplify this to just enabling/
disabling active state on gesture press/release, we don't get the
nice state updates when hovering around with a mouse button pressed,
but the rationale from flowbox applies here, and makes a nice cleanup.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
7d196db4c0 gtkcolorswatch: Remove enter/leave event handlers
Those just maintained prelight state, which is already managed internally.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
9d5c04012e gtkbutton: Remove enter/leave event handlers
They just maintain priv->in_button and widget state up-to-date, this
basically matters during user interaction, and is already maintained
in the gesture ::update handler. This seems to be sufficient.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
c4d57f85f4 gtkflowbox: Drop crossing/motion event handlers
Those basically controlled priv->active_child_active, which would
1) trigger a redraw when the pointer enters/leaves it, and 2) ensure
that press/release happen on the same child for it to be activated.

The former is not necessary, and the latter can be simplified by
just checking again the child on the coordinates given by the
::release gesture handler. This makes all enter/leave/motion_notify
event handlers unneeded.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
27a391bad8 gtkspinbutton: Remove motion notify handler
It does nothing nowadays.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
b31029457b gtkcalendar: Use scroll event controller 2017-09-19 18:40:50 +02:00