Compare commits

..

4 Commits

Author SHA1 Message Date
Matthias Clasen
027461b209 path-tool: Add a dash command
This is the obvious wrapper around gsk_path_dash.
2023-08-29 00:42:30 -04:00
Matthias Clasen
ff17fd0e82 gsk: Add tests for gsk_path_dash 2023-08-29 00:42:30 -04:00
Matthias Clasen
dea4d52d1a Add gsk_path_dash
This is a function like gsk_path_foreach, but
it provides a dashed version of the path instead
of the original.
2023-08-29 00:42:30 -04:00
Matthias Clasen
f7e248c7fe curve: Add a vfunc for get_at_length
We can do this precisely for lines, so lets do it.
2023-08-28 23:28:08 -04:00
217 changed files with 23550 additions and 33558 deletions

View File

@@ -23,7 +23,6 @@ case "${backend}" in
--suite=gtk \
--no-suite=failing \
--no-suite=flaky \
--no-suite=headless \
--no-suite=gsk-compare-broadway
# Store the exit code for the CI run, but always
@@ -46,7 +45,6 @@ case "${backend}" in
--suite=gtk \
--no-suite=failing \
--no-suite=flaky \
--no-suite=headless \
--no-suite=${backend}_failing \
--no-suite=gsk-compare-broadway
exit_code=$?
@@ -69,7 +67,6 @@ case "${backend}" in
--suite=gtk \
--no-suite=failing \
--no-suite=flaky \
--no-suite=headless \
--no-suite=gsk-compare-opengl
kill ${server}

View File

@@ -35,7 +35,8 @@ The issue tracker is meant to be used for actionable issues only.
You should not open a new issue for security related questions.
When in doubt, follow [security](https://security.gnome.org/).
When in doubt, send an email to the [security](mailto:security@gnome.org)
mailing list.
### Bug reports
@@ -243,11 +244,13 @@ people committing to GTK to follow a few rules:
code, you should always ask. If your change is minor and you've been
working on GTK for a while it probably isn't necessary to ask. But when
in doubt, ask. Even if your change is correct, somebody may know a
better way to do things.
The `gtk` [room on matrix](https://matrix.to/#/#gtk:gnome.org) is also a
good place to find GTK developers to discuss changes, but if you live
outside of the EU/US time zones, the [gtk tag on the GNOME Discourse instance](https://discourse.gnome.org/tag/gtk)
is the most certain and preferred method.
better way to do things. If you are making changes to GTK, you should
be subscribed to the [gtk-devel](https://mail.gnome.org/mailman/listinfo/gtk-devel-list)
mailing list; this is a good place to ask about intended changes.
The `#gtk` IRC channel on irc.gnome.org is also a good place to find GTK
developers to discuss changes, but if you live outside of the EU/US time
zones, an email to the gtk-devel mailing list is the most certain and
preferred method.
0. Ask _first_.

58
NEWS
View File

@@ -1,64 +1,6 @@
Overview of Changes in 4.13.1, xx-xx-xxxx
=========================================
* GtkTooltip:
- Don't cross native boundaries when looking for tooltips
* GtkCenterLayout, GtkEntry, GtkSearchEntry:
- Fix some issues with baseline handling
* GtkFileChooser:
- Make "Visit file" scroll to the file
* GtkSwitch:
- Respect text direction
* Paths:
- GskPathMeasure performance has been improved
- Add custom contours for circles, rounded rectangles and rectangles
- Simplify GskPathPoint handling
- gsk_path_point_get_closest_point now returns the distance as well
* Input:
- Handle (some) single-key compose sequences
* GSK:
- Make the repeated gradients match between GL and cairo
- Make rounded rect shrinking match between Vulkan, GL and cairo
- Fix parsing of text nodes with color glyphs
- Restrict an optimization to the cases where it is crrect
- Fix rendering of shadows with opacity
- The Vulkan renderer now requires Vulkan 1.2
* macOS:
- Clamp damage regions to the surface size
* Tools:
- gtk4-path-tool gained restrict and reverse commands
- gtk4-path-tool show and render can show control points
* Demos:
- Add a demo for hit testing with paths
* Build:
- Fix build problems with C++ compilers
* Translation updates
Brazilian Portuguese
British English
Catalan
Czech
Danish
Galician
Georgian
Italian
Korean
Lithuanian
Polish
Punjabi
Slovenian
Overview of Changes in 4.13.0, 25-08-2023
=========================================

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -223,7 +223,7 @@ delete_messages (gpointer data)
static void
pop_message (GtkWidget *status)
{
GList *messages = (GList *) g_object_steal_data (G_OBJECT (status), "messages");
GList *messages = (GList *) g_object_get_data (G_OBJECT (status), "messages");
if (messages)
{
@@ -241,7 +241,7 @@ static void
push_message (GtkWidget *status,
const char *message)
{
GList *messages = (GList *) g_object_steal_data (G_OBJECT (status), "messages");
GList *messages = (GList *) g_object_get_data (G_OBJECT (status), "messages");
gtk_label_set_label (GTK_LABEL (status), message);
messages = g_list_prepend (messages, g_strdup (message));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1019 B

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -295,7 +295,6 @@
<file>gears.c</file>
<file>gestures.c</file>
<file>glarea.c</file>
<file>glyphs.c</file>
<file>gltransition.c</file>
<file>headerbar.c</file>
<file>hypertext.c</file>
@@ -340,7 +339,6 @@
<file>path_fill.c</file>
<file>path_maze.c</file>
<file>path_spinner.c</file>
<file>path_sweep.c</file>
<file>path_walk.c</file>
<file>path_text.c</file>
<file>peg_solitaire.c</file>
@@ -428,10 +426,6 @@
<gresource prefix="/fontrendering">
<file>fontrendering.ui</file>
</gresource>
<gresource prefix="/path_sweep">
<file>path_sweep.ui</file>
<file compressed="true">path_world.txt</file>
</gresource>
<gresource prefix="/path_walk">
<file>path_walk.ui</file>
<file compressed="true">path_world.txt</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -74,7 +74,14 @@ create_blurred_button (void)
static GtkWidget *
create_font_button (void)
{
return gtk_font_dialog_button_new (gtk_font_dialog_new ());
GtkFontDialog *dialog;
GtkWidget *button;
dialog = gtk_font_dialog_new ();
button = gtk_font_dialog_button_new (dialog);
g_object_unref (dialog);
return button;
}
static GtkWidget *

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -34,7 +34,6 @@ demos = files([
'gestures.c',
'glarea.c',
'gltransition.c',
'glyphs.c',
'headerbar.c',
'hypertext.c',
'iconscroll.c',
@@ -76,7 +75,6 @@ demos = files([
'path_fill.c',
'path_maze.c',
'path_spinner.c',
'path_sweep.c',
'path_walk.c',
'path_text.c',
'peg_solitaire.c',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -8,7 +8,6 @@
* is a rather complex path.
*/
#include "config.h"
#include <glib/gi18n.h>
#include <gtk/gtk.h>
@@ -132,24 +131,6 @@ gtk_maze_class_init (GtkMazeClass *klass)
widget_class->snapshot = gtk_maze_snapshot;
}
static void
celebrate (gboolean win)
{
char *path;
GtkMediaStream *stream;
if (win)
path = g_build_filename (GTK_DATADIR, "sounds", "freedesktop", "stereo", "complete.oga", NULL);
else
path = g_build_filename (GTK_DATADIR, "sounds", "freedesktop", "stereo", "suspend-error.oga", NULL);
stream = gtk_media_file_new_for_filename (path);
gtk_media_stream_set_volume (stream, 1.0);
gtk_media_stream_play (stream);
g_signal_connect (stream, "notify::ended", G_CALLBACK (g_object_unref), NULL);
g_free (path);
}
static void
pointer_motion (GtkEventControllerMotion *controller,
double x,
@@ -172,8 +153,6 @@ pointer_motion (GtkEventControllerMotion *controller,
return;
}
celebrate (FALSE);
self->active = FALSE;
gtk_widget_queue_draw (GTK_WIDGET (self));
}

View File

@@ -9,8 +9,6 @@
#include "paintable.h"
#undef SHOW_CONTROLS
#define GTK_TYPE_SPINNER_PAINTABLE (gtk_spinner_paintable_get_type ())
G_DECLARE_FINAL_TYPE (GtkSpinnerPaintable, gtk_spinner_paintable, GTK, SPINNER_PAINTABLE, GObject)
@@ -152,7 +150,6 @@ static gboolean
add_controls (GskPathOperation op,
const graphene_point_t *pts,
gsize n_pts,
float weight,
gpointer data)
{
GskPathBuilder *builder = data;
@@ -169,7 +166,7 @@ add_controls (GskPathOperation op,
break;
case GSK_PATH_QUAD:
case GSK_PATH_CONIC:
case GSK_PATH_ARC:
gsk_path_builder_line_to (builder, pts[1].x, pts[1].y);
gsk_path_builder_line_to (builder, pts[2].x, pts[2].y);
break;

View File

@@ -1,319 +0,0 @@
/* Path/Sweep
*
* This demo shows how path intersections can be used.
*
* The world map that is used here is a path with 211 lines and 1569 cubic
* Bėzier segments in 121 contours.
*/
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#define GTK_TYPE_PATH_SWEEP (gtk_path_sweep_get_type ())
G_DECLARE_FINAL_TYPE (GtkPathSweep, gtk_path_sweep, GTK, PATH_SWEEP, GtkWidget)
#define POINT_SIZE 8
enum {
PROP_0,
PROP_PATH,
N_PROPS
};
struct _GtkPathSweep
{
GtkWidget parent_instance;
GskPath *path;
graphene_rect_t bounds;
float y_pos;
gboolean in;
};
struct _GtkPathSweepClass
{
GtkWidgetClass parent_class;
};
static GParamSpec *properties[N_PROPS] = { NULL, };
G_DEFINE_TYPE (GtkPathSweep, gtk_path_sweep, GTK_TYPE_WIDGET)
static gboolean
intersection_cb (GskPath *path1,
const GskPathPoint *point1,
GskPath *path2,
const GskPathPoint *point2,
GskPathIntersection kind,
gpointer data)
{
GskPathBuilder *builder = data;
graphene_point_t p;
gsk_path_point_get_position (point1, path1, &p);
gsk_path_builder_add_circle (builder, &p, 4);
return TRUE;
}
static GskPath *
get_intersection_path (GskPath *path1,
GskPath *path2)
{
GskPathBuilder *builder = gsk_path_builder_new ();
gsk_path_foreach_intersection (path1, path2, intersection_cb, builder);
return gsk_path_builder_to_path (builder);
}
static void
gtk_path_sweep_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot)
{
GtkPathSweep *self = GTK_PATH_SWEEP (widget);
GskStroke *stroke;
if (self->path == NULL)
return;
gtk_snapshot_save (snapshot);
stroke = gsk_stroke_new (2.0);
gtk_snapshot_append_stroke (snapshot, self->path, stroke, &(GdkRGBA) { 0, 0, 0, 1 });
if (self->in)
{
graphene_rect_t bounds;
GskPathBuilder *builder;
GskPath *line, *isecs;
gsk_path_get_stroke_bounds (self->path, stroke, &bounds);
builder = gsk_path_builder_new ();
gsk_path_builder_move_to (builder, bounds.origin.x, bounds.origin.y + self->y_pos);
gsk_path_builder_line_to (builder, bounds.origin.x + bounds.size.width, bounds.origin.y + self->y_pos);
line = gsk_path_builder_free_to_path (builder);
gtk_snapshot_append_stroke (snapshot, line, stroke, &(GdkRGBA) { 0, 0, 0, 1 });
isecs = get_intersection_path (self->path, line);
gtk_snapshot_append_fill (snapshot, isecs, GSK_FILL_RULE_WINDING, &(GdkRGBA) { 1, 0, 0, 1 });
gtk_snapshot_append_stroke (snapshot, isecs, stroke, &(GdkRGBA) { 0, 0, 0, 1 });
gsk_path_unref (isecs);
gsk_path_unref (line);
}
gsk_stroke_free (stroke);
gtk_snapshot_restore (snapshot);
}
static void
gtk_path_sweep_measure (GtkWidget *widget,
GtkOrientation orientation,
int for_size,
int *minimum,
int *natural,
int *minimum_baseline,
int *natural_baseline)
{
GtkPathSweep *self = GTK_PATH_SWEEP (widget);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
*minimum = *natural = (int) ceilf (self->bounds.size.width);
else
*minimum = *natural = (int) ceilf (self->bounds.size.height);
}
static void
gtk_path_sweep_set_path (GtkPathSweep *self,
GskPath *path)
{
if (self->path == path)
return;
g_clear_pointer (&self->path, gsk_path_unref);
graphene_rect_init (&self->bounds, 0, 0, 0, 0);
if (path)
{
GskStroke *stroke;
self->path = gsk_path_ref (path);
stroke = gsk_stroke_new (2.0);
gsk_path_get_stroke_bounds (path, stroke, &self->bounds);
gsk_stroke_free (stroke);
}
gtk_widget_queue_resize (GTK_WIDGET (self));
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PATH]);
}
static void
gtk_path_sweep_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkPathSweep *self = GTK_PATH_SWEEP (object);
switch (prop_id)
{
case PROP_PATH:
gtk_path_sweep_set_path (self, g_value_get_boxed (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_path_sweep_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkPathSweep *self = GTK_PATH_SWEEP (object);
switch (prop_id)
{
case PROP_PATH:
g_value_set_boxed (value, self->path);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_path_sweep_dispose (GObject *object)
{
GtkPathSweep *self = GTK_PATH_SWEEP (object);
g_clear_pointer (&self->path, gsk_path_unref);
G_OBJECT_CLASS (gtk_path_sweep_parent_class)->dispose (object);
}
static void
gtk_path_sweep_class_init (GtkPathSweepClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = gtk_path_sweep_dispose;
object_class->set_property = gtk_path_sweep_set_property;
object_class->get_property = gtk_path_sweep_get_property;
widget_class->snapshot = gtk_path_sweep_snapshot;
widget_class->measure = gtk_path_sweep_measure;
properties[PROP_PATH] =
g_param_spec_boxed ("path", NULL, NULL,
GSK_TYPE_PATH,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPS, properties);
}
static void
motion_cb (GtkEventControllerMotion *controller,
double x,
double y,
gpointer data)
{
GtkPathSweep *self = data;
self->y_pos = y;
gtk_widget_queue_draw (GTK_WIDGET (self));
}
static void
enter_cb (GtkEventControllerMotion *controller,
double x,
double y,
gpointer data)
{
GtkPathSweep *self = data;
self->in = TRUE;
self->y_pos = y;
gtk_widget_queue_draw (GTK_WIDGET (self));
}
static void
leave_cb (GtkEventControllerMotion *controller,
gpointer data)
{
GtkPathSweep *self = data;
self->in = FALSE;
gtk_widget_queue_draw (GTK_WIDGET (self));
}
static void
gtk_path_sweep_init (GtkPathSweep *self)
{
GtkEventController *controller;
/* Data taken from
* https://commons.wikimedia.org/wiki/Maps_of_the_world#/media/File:Simplified_blank_world_map_without_Antartica_(no_borders).svg
*/
GBytes *data = g_resources_lookup_data ("/path_sweep/path_world.txt", 0, NULL);
GskPath *path = gsk_path_parse (g_bytes_get_data (data, NULL));
g_bytes_unref (data);
gtk_path_sweep_set_path (self, path);
gsk_path_unref (path);
controller = gtk_event_controller_motion_new ();
g_signal_connect (controller, "motion", G_CALLBACK (motion_cb), self);
g_signal_connect (controller, "enter", G_CALLBACK (enter_cb), self);
g_signal_connect (controller, "leave", G_CALLBACK (leave_cb), self);
gtk_widget_add_controller (GTK_WIDGET (self), controller);
}
GtkWidget *
gtk_path_sweep_new (void)
{
GtkPathSweep *self;
self = g_object_new (GTK_TYPE_PATH_SWEEP, NULL);
return GTK_WIDGET (self);
}
GtkWidget *
do_path_sweep (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
if (!window)
{
GtkBuilder *builder;
g_type_ensure (GTK_TYPE_PATH_SWEEP);
builder = gtk_builder_new_from_resource ("/path_sweep/path_sweep.ui");
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget));
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *) &window);
g_object_unref (builder);
}
if (!gtk_widget_get_visible (window))
gtk_window_present (GTK_WINDOW (window));
else
gtk_window_destroy (GTK_WINDOW (window));
return window;
}

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow" id="window">
<property name="title" translatable="yes">World Map</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkPathSweep" id="view">
<property name="hexpand">true</property>
<property name="vexpand">true</property>
</object>
</child>
</object>
</property>
</object>
</interface>

View File

@@ -11,8 +11,6 @@
<property name="lower">0</property>
<property name="upper">5000</property>
<property name="value">500</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
</property>
</object>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1019 B

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -12,11 +12,6 @@ SYNOPSIS
--------
| **gtk4-path-tool** <COMMAND> [OPTIONS...] <PATH>
|
| **gtk4-path-tool** simplify [OPTIONS...] <PATH>
| **gtk4-path-tool** intersection [OPTIONS...] <PATH> <PATH>
| **gtk4-path-tool** union [OPTIONS...] <PATH> <PATH>
| **gtk4-path-tool** difference [OPTIONS...] <PATH> <PATH>
| **gtk4-path-tool** symmetric-difference [OPTIONS...] <PATH> <PATH>
| **gtk4-path-tool** decompose [OPTIONS...] <PATH>
| **gtk4-path-tool** show [OPTIONS...] <PATH>
| **gtk4-path-tool** render [OPTIONS...] <PATH>
@@ -60,22 +55,6 @@ Showing
The ``show`` command displays the given path in a window. The interior
of the path is filled.
``--fill``
Fill the path (this is the default).
``--stroke``
Stroke the path instead of filling it.
``--points``
Show points on the path.
``--controls``
Show control points.
``--fill-rule=VALUE``
The fill rule that is used to determine what areas are inside the path.
@@ -91,10 +70,13 @@ of the path is filled.
The color that is used to render the background behind the path.
If not specified, white is used.
``--point-color=COLOR``
``--fill``
The color that is used to render the points.
If not specified, red is used.
Fill the path (this is the default).
``--stroke``
Stroke the path instead of filling it.
``--line-width=VALUE``
@@ -137,22 +119,6 @@ Rendering
The ``render`` command renders the given path as a PNG image.
The interior of the path is filled.
``--fill``
Fill the path (this is the default).
``--stroke``
Stroke the path instead of filling it.
``--points``
Show points on the path.
``--controls``
Show control points.
``--fill-rule=VALUE``
The fill rule that is used to determine what areas are inside the path.
@@ -168,16 +134,19 @@ The interior of the path is filled.
The color that is used to render the background behind the path.
If not specified, white is used.
``--point-color=COLOR``
The color that is used to render the points.
If not specified, red is used.
``--output-file=FILE``
The file to save the PNG image to.
If not specified, "path.png" is used.
``--fill``
Fill the path (this is the default).
``--stroke``
Stroke the path instead of filling it.
``--line-width=VALUE``
The line width to use for the stroke. ``VALUE`` must be a positive number.
@@ -200,7 +169,6 @@ The interior of the path is filled.
The limit at which to clip miters at line joins. The default value is 4.
<<<<<<< HEAD
``--dashes=VALUE``
The dash pattern to use for this stroke. A dash pattern is specified by
@@ -214,21 +182,6 @@ The interior of the path is filled.
The offset into the dash pattern where dashing should begin.
The default value is 0.
Boolean Operations
^^^^^^^^^^^^^^^^^^
The ``intersection``, ``union``, ``difference`` and ``symmetric-difference`` commands
perform boolean operations on paths. Given two paths, they create a new path which
encircles the area that is the intersection, union, difference or symmetric difference
of the areas encircled by the paths.
Simplification
^^^^^^^^^^^^^^
The ``simplify`` command removes areas of overlap from a path such that the resulting
path encircles the same area, but every edge in the resulting path is a boundary between
the inside and the outside.
Reversing
^^^^^^^^^

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -82,18 +82,6 @@ gdk_array(init) (GdkArray *self)
#endif
}
G_GNUC_UNUSED static inline gsize
gdk_array(get_capacity) (const GdkArray *self)
{
return self->end_allocation - self->start;
}
G_GNUC_UNUSED static inline gsize
gdk_array(get_size) (const GdkArray *self)
{
return self->end - self->start;
}
static inline void
gdk_array(free_elements) (_T_ *start,
_T_ *end)
@@ -122,38 +110,6 @@ gdk_array(clear) (GdkArray *self)
gdk_array(init) (self);
}
/*
* gdk_array_steal:
* @self: the array
*
* Steals all data in the array and clears the array.
*
* If you need to know the size of the data, you should query it
* beforehand.
*
* Returns: The array's data
**/
G_GNUC_UNUSED static inline _T_ *
gdk_array(steal) (GdkArray *self)
{
_T_ *result;
#ifdef GDK_ARRAY_PREALLOC
if (self->start == self->preallocated)
{
gsize size = GDK_ARRAY_REAL_SIZE (gdk_array(get_size) (self));
result = g_new (_T_, size);
memcpy (result, self->preallocated, sizeof (_T_) * size);
}
else
#endif
result = self->start;
gdk_array(init) (self);
return result;
}
G_GNUC_UNUSED static inline _T_ *
gdk_array(get_data) (const GdkArray *self)
{
@@ -167,6 +123,18 @@ gdk_array(index) (const GdkArray *self,
return self->start + pos;
}
G_GNUC_UNUSED static inline gsize
gdk_array(get_capacity) (const GdkArray *self)
{
return self->end_allocation - self->start;
}
G_GNUC_UNUSED static inline gsize
gdk_array(get_size) (const GdkArray *self)
{
return self->end - self->start;
}
G_GNUC_UNUSED static inline gboolean
gdk_array(is_empty) (const GdkArray *self)
{

View File

@@ -473,7 +473,8 @@ gdk_display_get_event (GdkDisplay *display)
* @display: a `GdkDisplay`
* @event: (transfer none): a `GdkEvent`
*
* Adds the given event to the event queue for @display.
* Appends the given event onto the front of the event
* queue for @display.
*
* Deprecated: 4.10: This function is only useful in very
* special situations and should not be used by applications.

View File

@@ -1408,11 +1408,8 @@ gdk_display_create_vulkan_device (GdkDisplay *display,
},
.enabledExtensionCount = device_extensions->len,
.ppEnabledExtensionNames = (const char * const *) device_extensions->pdata,
.pNext = &(VkPhysicalDeviceVulkan12Features) {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES,
.shaderSampledImageArrayNonUniformIndexing = VK_TRUE,
.shaderStorageBufferArrayNonUniformIndexing = VK_TRUE,
.descriptorIndexing = VK_TRUE,
.pNext = &(VkPhysicalDeviceDescriptorIndexingFeatures) {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES,
.descriptorBindingPartiallyBound = VK_TRUE,
.descriptorBindingVariableDescriptorCount = VK_TRUE,
.descriptorBindingSampledImageUpdateAfterBind = VK_TRUE,
@@ -1556,7 +1553,7 @@ gdk_display_create_vulkan_instance (GdkDisplay *display,
.applicationVersion = 0,
.pEngineName = "GTK",
.engineVersion = VK_MAKE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION, GDK_MICRO_VERSION),
.apiVersion = VK_API_VERSION_1_2
.apiVersion = VK_API_VERSION_1_0
},
.enabledLayerCount = used_layers->len,
.ppEnabledLayerNames = (const char * const *) used_layers->pdata,

View File

@@ -188,14 +188,6 @@ copy_surface_data (GdkMacosBuffer *from,
}
}
static void
clamp_region_to_surface (cairo_region_t *region,
GdkSurface *surface)
{
cairo_rectangle_int_t rectangle = {0, 0, surface->width, surface->height};
cairo_region_intersect_rectangle (region, &rectangle);
}
static void
_gdk_macos_cairo_context_begin_frame (GdkDrawContext *draw_context,
GdkMemoryDepth depth,
@@ -213,8 +205,6 @@ _gdk_macos_cairo_context_begin_frame (GdkDrawContext *draw_context,
surface = GDK_MACOS_SURFACE (gdk_draw_context_get_surface (draw_context));
buffer = _gdk_macos_surface_get_buffer (surface);
clamp_region_to_surface (region, GDK_SURFACE (surface));
_gdk_macos_buffer_set_damage (buffer, region);
_gdk_macos_buffer_set_flipped (buffer, FALSE);

View File

@@ -90,7 +90,7 @@ struct _GdkMacosDisplay
/* Note if we have a key window that is not a GdkMacosWindow
* such as a NSPanel used for native dialogs.
*/
guint key_window_is_foreign : 1;
guint key_window_is_foregin : 1;
};
struct _GdkMacosDisplayClass

View File

@@ -424,7 +424,7 @@ select_key_in_idle_cb (gpointer data)
self->select_key_in_idle = 0;
/* Don't steal focus from NSPanel, etc */
if (self->key_window_is_foreign)
if (self->key_window_is_foregin)
return G_SOURCE_REMOVE;
if (self->keyboard_surface == NULL)
@@ -941,7 +941,7 @@ _gdk_macos_display_get_surfaces (GdkMacosDisplay *self)
NSArray *array = [NSApp orderedWindows];
GQueue sorted = G_QUEUE_INIT;
self->key_window_is_foreign = FALSE;
self->key_window_is_foregin = FALSE;
for (id obj in array)
{
@@ -949,7 +949,7 @@ _gdk_macos_display_get_surfaces (GdkMacosDisplay *self)
GdkMacosSurface *surface;
if ([nswindow isKeyWindow])
self->key_window_is_foreign = !GDK_IS_MACOS_WINDOW (nswindow);
self->key_window_is_foregin = !GDK_IS_MACOS_WINDOW (nswindow);
if (!GDK_IS_MACOS_WINDOW (nswindow))
continue;

View File

@@ -46,21 +46,6 @@ static const struct xdg_activation_token_v1_listener token_listener = {
token_done,
};
static struct wl_surface *
peek_launcher_toplevel (GdkSeat *seat)
{
struct wl_surface *wl_surface = NULL;
GdkSurface *focus_surface;
focus_surface = gdk_wayland_device_get_focus (gdk_seat_get_keyboard (seat));
while (focus_surface && focus_surface->parent)
focus_surface = focus_surface->parent;
if (focus_surface)
wl_surface = gdk_wayland_surface_get_wl_surface (focus_surface);
return wl_surface;
}
static char *
gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
GAppInfo *info,
@@ -77,6 +62,7 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context
struct wl_event_queue *event_queue;
struct wl_surface *wl_surface = NULL;
GdkWaylandSeat *seat;
GdkSurface *focus_surface;
AppLaunchData app_launch_data = { 0 };
event_queue = wl_display_create_queue (display->wl_display);
@@ -92,7 +78,9 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context
_gdk_wayland_seat_get_last_implicit_grab_serial (seat, NULL),
gdk_wayland_seat_get_wl_seat (GDK_SEAT (seat)));
wl_surface = peek_launcher_toplevel (GDK_SEAT (seat));
focus_surface = gdk_wayland_device_get_focus (gdk_seat_get_keyboard (GDK_SEAT (seat)));
if (focus_surface)
wl_surface = gdk_wayland_surface_get_wl_surface (focus_surface);
if (wl_surface)
xdg_activation_token_v1_set_surface (token, wl_surface);

View File

@@ -96,12 +96,6 @@
#define XDG_ACTIVATION_VERSION 1
#define OUTPUT_VERSION 3
#ifdef HAVE_TOPLEVEL_STATE_SUSPENDED
#define XDG_WM_BASE_VERSION 6
#else
#define XDG_WM_BASE_VERSION 5
#endif
static void _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland);
G_DEFINE_TYPE (GdkWaylandDisplay, gdk_wayland_display, GDK_TYPE_DISPLAY)
@@ -644,8 +638,7 @@ _gdk_wayland_display_open (const char *display_name)
wl_registry_bind (display_wayland->wl_registry,
display_wayland->xdg_wm_base_id,
&xdg_wm_base_interface,
MIN (display_wayland->xdg_wm_base_version,
XDG_WM_BASE_VERSION));
MIN (display_wayland->xdg_wm_base_version, 4));
xdg_wm_base_add_listener (display_wayland->xdg_wm_base,
&xdg_wm_base_listener,
display_wayland);

View File

@@ -672,18 +672,10 @@ xdg_toplevel_configure_bounds (void *data,
toplevel->pending.has_bounds = TRUE;
}
static void
xdg_toplevel_wm_capabilities (void *data,
struct xdg_toplevel *xdg_toplevel,
struct wl_array *capabilities)
{
}
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
xdg_toplevel_configure,
xdg_toplevel_close,
xdg_toplevel_configure_bounds,
xdg_toplevel_wm_capabilities,
};
static void

View File

@@ -286,16 +286,15 @@ _gdk_win32_display_init_monitors (GdkWin32Display *win32_display)
GdkMonitor *ex_monitor;
w32_ex_monitor = GDK_WIN32_MONITOR (g_list_model_get_item (win32_display->monitors, i));
g_object_unref (w32_ex_monitor);
ex_monitor = GDK_MONITOR (w32_ex_monitor);
if (w32_ex_monitor->remove)
{
w32_ex_monitor->hmonitor = NULL;
g_list_store_remove (G_LIST_STORE (win32_display->monitors), i);
gdk_monitor_invalidate (ex_monitor);
}
if (!w32_ex_monitor->remove)
continue;
g_object_unref (w32_ex_monitor);
w32_ex_monitor->hmonitor = NULL;
g_list_store_remove (G_LIST_STORE (win32_display->monitors), i);
gdk_monitor_invalidate (ex_monitor);
}
for (i = 0; i < new_monitors->len; i++)

View File

@@ -20,7 +20,7 @@
#pragma once
#include <gsk/gsk.h>
#include <gsk/gskrenderer.h>
G_BEGIN_DECLS

View File

@@ -142,8 +142,6 @@ struct _GskGLRenderJob
const GskGLRenderModelview *current_modelview;
GskGLProgram *current_program;
guint source_is_glyph_atlas : 1;
/* If we should be rendering red zones over fallback nodes */
guint debug_fallback : 1;
@@ -1262,7 +1260,6 @@ done:
GL_TEXTURE_2D,
GL_TEXTURE0,
texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_offscreen_rect (job, &node->bounds);
gsk_gl_render_job_end_draw (job);
@@ -1328,7 +1325,6 @@ blur_offscreen (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
offscreen->texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_program_set_uniform1f (job->current_program,
UNIFORM_BLUR_RADIUS, 0,
blur_radius_x);
@@ -1358,7 +1354,6 @@ blur_offscreen (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
pass1->texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_program_set_uniform1f (job->current_program,
UNIFORM_BLUR_RADIUS, 0,
blur_radius_y);
@@ -1466,8 +1461,7 @@ gsk_gl_render_job_visit_color_node (GskGLRenderJob *job,
batch = gsk_gl_command_queue_get_batch (job->command_queue);
/* Limit the size, or we end up with a coordinate overflow somewhere. */
if (job->source_is_glyph_atlas &&
node->bounds.size.width < 300 &&
if (node->bounds.size.width < 300 &&
node->bounds.size.height < 300 &&
batch->any.kind == GSK_GL_COMMAND_KIND_DRAW &&
batch->any.program == program->id)
@@ -1674,7 +1668,6 @@ gsk_gl_render_job_visit_clipped_child (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
offscreen.texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_offscreen_rect (job, clip);
gsk_gl_render_job_end_draw (job);
}
@@ -1765,7 +1758,6 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
offscreen.texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_offscreen (job, &node->bounds, &offscreen);
gsk_gl_render_job_end_draw (job);
}
@@ -2131,7 +2123,6 @@ gsk_gl_render_job_visit_transform_node (GskGLRenderJob *job,
offscreen.texture_id,
linear_filter ? GL_LINEAR : GL_NEAREST,
linear_filter ? GL_LINEAR : GL_NEAREST);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_offscreen (job, &child->bounds, &offscreen);
gsk_gl_render_job_end_draw (job);
}
@@ -2341,7 +2332,6 @@ gsk_gl_render_job_visit_blurred_inset_shadow_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
blurred_texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_offscreen (job, &node->bounds, &offscreen);
gsk_gl_render_job_end_draw (job);
}
@@ -2607,7 +2597,6 @@ gsk_gl_render_job_visit_blurred_outset_shadow_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
blurred_texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_program_set_uniform_rounded_rect (job->current_program,
UNIFORM_OUTSET_SHADOW_OUTLINE_RECT, 0,
&transformed_outline);
@@ -2633,7 +2622,6 @@ gsk_gl_render_job_visit_blurred_outset_shadow_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
blurred_texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_program_set_uniform_rounded_rect (job->current_program,
UNIFORM_OUTSET_SHADOW_OUTLINE_RECT, 0,
&transformed_outline);
@@ -2871,7 +2859,6 @@ gsk_gl_render_job_visit_cross_fade_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE1,
offscreen_end.texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_program_set_uniform1f (job->current_program,
UNIFORM_CROSS_FADE_PROGRESS, 0,
progress);
@@ -2918,7 +2905,6 @@ gsk_gl_render_job_visit_opacity_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
offscreen.texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_offscreen (job, &node->bounds, &offscreen);
gsk_gl_render_job_end_draw (job);
}
@@ -3060,7 +3046,6 @@ gsk_gl_render_job_visit_text_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
texture_id);
job->source_is_glyph_atlas = TRUE;
last_texture = texture_id;
}
@@ -3157,6 +3142,10 @@ gsk_gl_render_job_visit_shadow_node (GskGLRenderJob *job,
offscreen.was_offscreen = TRUE;
}
else if (dx == 0 && dy == 0)
{
continue; /* Invisible anyway */
}
else
{
offscreen.bounds = &shadow_child->bounds;
@@ -3177,7 +3166,6 @@ gsk_gl_render_job_visit_shadow_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
offscreen.texture_id);
job->source_is_glyph_atlas = FALSE;
rgba_to_half (&shadow->color, color);
gsk_gl_render_job_draw_offscreen_with_color (job, &bounds, &offscreen, color);
gsk_gl_render_job_end_draw (job);
@@ -3234,7 +3222,6 @@ gsk_gl_render_job_visit_blur_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
offscreen.texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_coords (job,
min_x, min_y, max_x, max_y,
0, 1, 1, 0,
@@ -3285,7 +3272,6 @@ gsk_gl_render_job_visit_blend_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
bottom_offscreen.texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_offscreen (job, &node->bounds, &bottom_offscreen);
gsk_gl_render_job_end_draw (job);
}
@@ -3308,7 +3294,6 @@ gsk_gl_render_job_visit_blend_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE1,
top_offscreen.texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_program_set_uniform1i (job->current_program,
UNIFORM_BLEND_MODE, 0,
gsk_blend_node_get_blend_mode (node));
@@ -3371,7 +3356,6 @@ gsk_gl_render_job_visit_mask_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE1,
mask_offscreen.texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_program_set_uniform1i (job->current_program,
UNIFORM_MASK_MODE, 0,
gsk_mask_node_get_mask_mode (node));
@@ -3408,7 +3392,6 @@ gsk_gl_render_job_visit_color_matrix_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
offscreen.texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_program_set_uniform_matrix (job->current_program,
UNIFORM_COLOR_MATRIX_COLOR_MATRIX, 0,
gsk_color_matrix_node_get_color_matrix (node));
@@ -3491,7 +3474,6 @@ gsk_gl_render_job_visit_gl_shader_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0 + i,
offscreens[i].texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_program_set_uniform2f (program,
UNIFORM_CUSTOM_SIZE, 0,
node->bounds.size.width,
@@ -3626,7 +3608,6 @@ gsk_gl_render_job_visit_texture (GskGLRenderJob *job,
offscreen.has_mipmap ? GL_LINEAR_MIPMAP_LINEAR : GL_LINEAR,
GL_LINEAR,
offscreen.sync);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_offscreen (job, bounds, &offscreen);
gsk_gl_render_job_end_draw (job);
}
@@ -3664,7 +3645,6 @@ gsk_gl_render_job_visit_texture (GskGLRenderJob *job,
slice->texture_id,
use_mipmap ? GL_LINEAR_MIPMAP_LINEAR : GL_LINEAR,
GL_LINEAR);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_coords (job,
x1, y1, x2, y2,
@@ -3783,7 +3763,6 @@ gsk_gl_render_job_visit_texture_scale_node (GskGLRenderJob *job,
min_filter,
mag_filter,
sync);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_coords (job,
0, 0, clip_rect.size.width, clip_rect.size.height,
u0, v0, u1, v1,
@@ -3825,7 +3804,6 @@ gsk_gl_render_job_visit_texture_scale_node (GskGLRenderJob *job,
slice->texture_id,
min_filter,
mag_filter);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_coords (job,
slice_bounds.origin.x,
slice_bounds.origin.y,
@@ -3858,7 +3836,6 @@ render_texture:
GL_TEXTURE_2D,
GL_TEXTURE0,
texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_coords (job,
job->offset_x + clip_rect.origin.x,
job->offset_y + clip_rect.origin.y,
@@ -3911,7 +3888,6 @@ gsk_gl_render_job_visit_repeat_node (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
offscreen.texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_program_set_uniform4f (job->current_program,
UNIFORM_REPEAT_CHILD_BOUNDS, 0,
(node->bounds.origin.x - child_bounds->origin.x) / child_bounds->size.width,
@@ -4406,7 +4382,6 @@ gsk_gl_render_job_render_flipped (GskGLRenderJob *job,
GL_TEXTURE_2D,
GL_TEXTURE0,
texture_id);
job->source_is_glyph_atlas = FALSE;
gsk_gl_render_job_draw_rect (job, &job->viewport);
gsk_gl_render_job_end_draw (job);
}

View File

@@ -75,10 +75,10 @@ void main() {
if (offset < next_offset) {
float f = (offset - curr_offset) / (next_offset - curr_offset);
vec4 curr_color = get_color(i);
vec4 next_color = get_color(i + 1);
vec4 curr_color = gsk_premultiply(get_color(i));
vec4 next_color = gsk_premultiply(get_color(i + 1));
vec4 color = mix(curr_color, next_color, f);
gskSetScaledOutputColor(gsk_premultiply(color), u_alpha);
gskSetScaledOutputColor(color, u_alpha);
return;
}
}

View File

@@ -97,10 +97,10 @@ void main() {
if (offset < next_offset) {
float f = (offset - curr_offset) / (next_offset - curr_offset);
vec4 curr_color = get_color(i);
vec4 next_color = get_color(i + 1);
vec4 curr_color = gsk_premultiply(get_color(i));
vec4 next_color = gsk_premultiply(get_color(i + 1));
vec4 color = mix(curr_color, next_color, f);
gskSetScaledOutputColor(gsk_premultiply (color), u_alpha);
gskSetScaledOutputColor(color, u_alpha);
return;
}
}

View File

@@ -28,8 +28,6 @@ gsk_rounded_rect_shrink (GskRoundedRect r, vec4 amount)
if (r.corner_points1.zw == r.bounds.zy) new_corner_points1.zw = new_bounds.zy;
if (r.corner_points2.xy == r.bounds.zw) new_corner_points2.xy = new_bounds.zw;
if (r.corner_points2.zw == r.bounds.xw) new_corner_points2.zw = new_bounds.xw;
new_corner_points1 = clamp (new_corner_points1, new_bounds.xyxy, new_bounds.zwzw);
new_corner_points2 = clamp (new_corner_points2, new_bounds.xyxy, new_bounds.zwzw);
return GskRoundedRect (new_bounds, new_corner_points1, new_corner_points2);
}

View File

@@ -77,10 +77,10 @@ void main() {
if (offset < next_offset) {
float f = (offset - curr_offset) / (next_offset - curr_offset);
vec4 curr_color = get_color(i);
vec4 next_color = get_color(i + 1);
vec4 curr_color = gsk_premultiply(get_color(i));
vec4 next_color = gsk_premultiply(get_color(i + 1));
vec4 color = mix(curr_color, next_color, f);
gskSetScaledOutputColor(gsk_premultiply(color), u_alpha);
gskSetScaledOutputColor(color, u_alpha);
return;
}
}

Some files were not shown because too many files have changed in this diff Show More