Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c5988a22a4 | |||
| 498bf67cec | |||
| 65455cdb91 | |||
| d4963ba2e5 | |||
| ec5fed6cc4 | |||
| b7ae5404a3 | |||
| fb4f210430 | |||
| 82df109444 | |||
| bd84142f43 | |||
| 65074bbbac | |||
| 21fb5ec0b2 | |||
| e57f92b7e9 | |||
| e94e348ad5 | |||
| 91234e75f8 | |||
| 212e9a6957 |
@@ -1,84 +1,6 @@
|
||||
Overview of Changes in 4.13.7, xx-xx-xxxx
|
||||
Overview of Changes in 4.13.6, xx-xx-xxxx
|
||||
=========================================
|
||||
|
||||
Overview of Changes in 4.13.6, 25-01-2024
|
||||
=========================================
|
||||
|
||||
This release changes the ngl renderer to be the default renderer.
|
||||
|
||||
The intent of this change is to get wider testing and verify that
|
||||
the new renderers are production-ready. If significant problems
|
||||
show up, we will revert this change for 4.14.
|
||||
|
||||
You can still override the renderer choice using the GSK_RENDERER
|
||||
environment variable.
|
||||
|
||||
Since ngl can handle fractional scaling much better than the old gl
|
||||
renderer, we allow fractional scaling by default with gl now. If you
|
||||
are using the old gl renderer (e.g. because your system is limited to
|
||||
GLES2), you can disable fractional scaling by setting the GDK_DEBUG
|
||||
environment variable to include the gl-no-fractional key.
|
||||
|
||||
* GtkColumnView:
|
||||
- Fix infinite loops in dispose
|
||||
- Fix problems with weak ref cycles in GtkExpression
|
||||
|
||||
* GtkListView:
|
||||
- Fix some corner cases with sections during insertions and deletions
|
||||
- Don't double-recycle widgets
|
||||
|
||||
* GtkStack:
|
||||
- Add automatic cleanup for GtkStackPage
|
||||
|
||||
* GDK:
|
||||
- Use standard cursor names for drag cursors
|
||||
- Enable fractional scaling with gl by default
|
||||
|
||||
* GSK:
|
||||
- Many fixes and improvements to the unified renderers:
|
||||
- Fix text rendering with the uber shader
|
||||
- Fix rounding issues with fractional scales
|
||||
- Fix some memory leaks
|
||||
- Many text rendering fixes
|
||||
- Implement subpixel positioning for glyphs
|
||||
- Support custom fonts in node files
|
||||
- Add tests for font rendering
|
||||
- Fix drawing of repeat nodes
|
||||
- Implement subpixels positioning
|
||||
- Evict stale textures, glyphs and atlases from the cache
|
||||
- Some fixes and improvements to the GL renderer:
|
||||
- Fix problems with GLES on Nvidia
|
||||
- Avoid a crash in the mask demo
|
||||
- Respect opacity of the first child node in containers
|
||||
- Some fixes and improvements to the fallback renderer:
|
||||
- Fix drawing of repeat nodes
|
||||
- Make ngl the default renderer
|
||||
|
||||
* Wayland:
|
||||
- Fix problems with tablet cursors
|
||||
- Fix problems without seats
|
||||
|
||||
* Accessibility:
|
||||
- Respect a separate "show-status-shapes setting
|
||||
- Fix change notification for accessible names on some widgets
|
||||
|
||||
* Inspector:
|
||||
- Show the git commit in devel builds
|
||||
|
||||
* Tools:
|
||||
- Make gtk4-node-editor autosave its contents
|
||||
- Add a benchmark command to gtk4-rendernode-tool
|
||||
|
||||
* Translation updates:
|
||||
French
|
||||
Galician
|
||||
Georgian
|
||||
Occitan
|
||||
Persian
|
||||
Russian
|
||||
Vietnamese
|
||||
|
||||
|
||||
Overview of Changes in 4.13.5, 07-01-2024
|
||||
=========================================
|
||||
|
||||
|
||||
@@ -1567,6 +1567,23 @@ edit_action_cb (GtkWidget *widget,
|
||||
node_editor_window_edit (self, &start);
|
||||
}
|
||||
|
||||
static void
|
||||
node_editor_window_map (GtkWidget *widget)
|
||||
{
|
||||
char *path;
|
||||
|
||||
GTK_WIDGET_CLASS (node_editor_window_parent_class)->map (widget);
|
||||
|
||||
path = get_autosave_path (NULL);
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS))
|
||||
{
|
||||
g_free (path);
|
||||
return;
|
||||
}
|
||||
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
static void
|
||||
node_editor_window_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
@@ -1643,6 +1660,8 @@ node_editor_window_class_init (NodeEditorWindowClass *class)
|
||||
widget_class->realize = node_editor_window_realize;
|
||||
widget_class->unrealize = node_editor_window_unrealize;
|
||||
|
||||
widget_class->map = node_editor_window_map;
|
||||
|
||||
properties[PROP_AUTO_RELOAD] = g_param_spec_boolean ("auto-reload", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_STATIC_NAME);
|
||||
@@ -1746,16 +1765,16 @@ set_initial_text (NodeEditorWindow *self)
|
||||
path = get_autosave_path (NULL);
|
||||
path1 = get_autosave_path ("-unsafe");
|
||||
|
||||
if (g_file_get_contents (path1, &initial_text, &len, NULL))
|
||||
if (g_file_get_contents (path, &initial_text, &len, NULL))
|
||||
{
|
||||
gtk_text_buffer_set_text (self->text_buffer, initial_text, len);
|
||||
g_free (initial_text);
|
||||
}
|
||||
else if (g_file_get_contents (path1, &initial_text, &len, NULL))
|
||||
{
|
||||
self->auto_reload = FALSE;
|
||||
gtk_revealer_set_reveal_child (GTK_REVEALER (self->crash_warning), TRUE);
|
||||
|
||||
gtk_text_buffer_set_text (self->text_buffer, initial_text, len);
|
||||
g_free (initial_text);
|
||||
}
|
||||
else if (g_file_get_contents (path, &initial_text, &len, NULL))
|
||||
{
|
||||
gtk_text_buffer_set_text (self->text_buffer, initial_text, len);
|
||||
g_free (initial_text);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
<attribute name="label" translatable="yes">_Help</attribute>
|
||||
<attribute name="action">app.help</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Help</attribute>
|
||||
<attribute name="action">app.help</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Inspector</attribute>
|
||||
<attribute name="action">app.inspector</attribute>
|
||||
|
||||
@@ -322,16 +322,12 @@ stroke bounds of the path.
|
||||
|
||||
### text
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| ------------ | ------------------- | ------------------- | ----------- |
|
||||
| color | `<color>` | black | non-default |
|
||||
| font | `<string>` `<url>`? | "Cantarell 11" | always |
|
||||
| glyphs | `<glyphs>` | "Hello" | always |
|
||||
| offset | `<point>` | 0 0 | non-default |
|
||||
| hint-metrics | `<hint metrics>` | off | non-default |
|
||||
| hint-style | `<hint style>` | slight | non-default |
|
||||
| antialias | `<antialias>` | on | non-default |
|
||||
| dpi | `<number>` | 96 | non-default |
|
||||
| property | syntax | default | printed |
|
||||
| -------- | ------------------- | ------------------- | ----------- |
|
||||
| color | `<color>` | black | non-default |
|
||||
| font | `<string>` `<url>`? | "Cantarell 11" | always |
|
||||
| glyphs | `<glyphs>` | "Hello" | always |
|
||||
| offset | `<point>` | 0 0 | non-default |
|
||||
|
||||
Creates a node like `gsk_text_node_new()` with the given properties.
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@ base_url = "https://gitlab.gnome.org/GNOME/gtk/-/blob/main/"
|
||||
|
||||
[extra]
|
||||
content_images = [
|
||||
"../images/favicon.svg",
|
||||
"../images/favicon-192x192.png",
|
||||
"images/gtk-logo.svg",
|
||||
]
|
||||
urlmap_file = "urlmap.js"
|
||||
|
||||
@@ -24,8 +24,6 @@ base_url = "https://gitlab.gnome.org/GNOME/gtk/-/blob/main/"
|
||||
|
||||
[extra]
|
||||
content_images = [
|
||||
"../images/favicon.svg",
|
||||
"../images/favicon-192x192.png",
|
||||
"images/gtk-logo.svg",
|
||||
]
|
||||
urlmap_file = "urlmap.js"
|
||||
|
||||
@@ -67,8 +67,6 @@ content_files = [
|
||||
"macos.md",
|
||||
]
|
||||
content_images = [
|
||||
"../images/favicon.svg",
|
||||
"../images/favicon-192x192.png",
|
||||
"images/gtk-logo.svg",
|
||||
"images/rotated-text.png",
|
||||
"images/default_cursor.png",
|
||||
|
||||
@@ -36,8 +36,6 @@ content_files = [
|
||||
"paths.md",
|
||||
]
|
||||
content_images = [
|
||||
"../images/favicon.svg",
|
||||
"../images/favicon-192x192.png",
|
||||
"gtk-logo.svg",
|
||||
"images/arc-dark.png",
|
||||
"images/arc-light.png",
|
||||
|
||||
@@ -85,8 +85,6 @@ content_files = [
|
||||
"visual_index.md",
|
||||
]
|
||||
content_images = [
|
||||
"../images/favicon.svg",
|
||||
"../images/favicon-192x192.png",
|
||||
"images/aboutdialog.png",
|
||||
"images/action-bar.png",
|
||||
"images/appchooserbutton.png",
|
||||
|
||||
@@ -220,8 +220,8 @@ A number of options affect behavior instead of logging:
|
||||
`gl-disable`
|
||||
: Disable OpenGL support
|
||||
|
||||
`gl-no-fractional`
|
||||
: Disable fractional scaling for OpenGL.
|
||||
`gl-fractional`
|
||||
: Enable fractional scaling for OpenGL. This is experimental
|
||||
|
||||
`gl-debug`
|
||||
: Insert debugging information in OpenGL
|
||||
@@ -460,13 +460,6 @@ disable certain optimizations of the "ngl" and "vulkan" renderer.
|
||||
The special value `all` can be used to turn on all values. The special
|
||||
value `help` can be used to obtain a list of all supported values.
|
||||
|
||||
### `GSK_CACHE_TIMEOUT`
|
||||
|
||||
Overrides the timeout for cache GC in the "ngl" and "vulkan" renderers.
|
||||
The value can be -1 to disable GC entirely, 0 to force GC to happen
|
||||
before every frame, or a positive number to do GC in a timeout every
|
||||
n seconds. The default timeout is 15 seconds.
|
||||
|
||||
### `GSK_MAX_TEXTURE_SIZE`
|
||||
|
||||
Limit texture size to the minimum of this value and the OpenGL limit
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.0" width="88.572334" height="96.050743" id="svg6843">
|
||||
<defs id="defs6845"/>
|
||||
<g transform="translate(-19.822308,-16.115941)" id="layer1">
|
||||
<path d="M 20.88413,30.82696 53.816977,55.527708 107.33282,39.060543 70.587303,17.177763 20.88413,30.82696 z" id="path6976" style="fill:#729fcf;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.12364459;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"/>
|
||||
<path d="m 22.94243,82.287118 -2.0583,-51.460158 32.932847,24.700748 0,55.577152 L 22.94243,82.287118 z" id="path6978" style="fill:#e40000;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.12364459;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"/>
|
||||
<path d="m 53.816977,111.10486 49.399213,-20.58416 4.11663,-51.460157 -53.515843,16.467165 0,55.577152 z" id="path6980" style="fill:#7fe719;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.12364459;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"/>
|
||||
<path d="M 23.216626,81.319479 70.48573,67.361442 103.38422,90.444516" id="path6982" style="fill:none;stroke:#ffffff;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
<path d="m 70.434539,17.875593 0,49.109284" id="path6984" style="fill:#babdb6;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -123,7 +123,7 @@ static const GdkDebugKey gdk_debug_keys[] = {
|
||||
{ "portals", GDK_DEBUG_PORTALS, "Force use of portals" },
|
||||
{ "no-portals", GDK_DEBUG_NO_PORTALS, "Disable use of portals" },
|
||||
{ "gl-disable", GDK_DEBUG_GL_DISABLE, "Disable OpenGL support" },
|
||||
{ "gl-no-fractional", GDK_DEBUG_GL_NO_FRACTIONAL, "Disable fractional scaling for OpenGL" },
|
||||
{ "gl-fractional", GDK_DEBUG_GL_FRACTIONAL, "Enable fractional scaling for OpenGL (experimental)" },
|
||||
{ "gl-debug", GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL" },
|
||||
{ "gl-disable-gl", GDK_DEBUG_GL_DISABLE_GL, "Only allow OpenGL GLES API" },
|
||||
{ "gl-disable-gles", GDK_DEBUG_GL_DISABLE_GLES, "Don't allow OpenGL GLES API" },
|
||||
@@ -222,6 +222,7 @@ gdk_parse_debug_var (const char *variable,
|
||||
}
|
||||
else
|
||||
{
|
||||
char *val = g_strndup (p, q - p);
|
||||
for (i = 0; i < nkeys; i++)
|
||||
{
|
||||
if (strlen (keys[i].key) == q - p &&
|
||||
@@ -232,7 +233,8 @@ gdk_parse_debug_var (const char *variable,
|
||||
}
|
||||
}
|
||||
if (i == nkeys)
|
||||
fprintf (stderr, "Unrecognized value \"%.*s\". Try %s=help\n", (int) (q - p), p, variable);
|
||||
fprintf (stderr, "Unrecognized value \"%s\". Try %s=help\n", val, variable);
|
||||
g_free (val);
|
||||
}
|
||||
|
||||
p = q;
|
||||
|
||||
@@ -43,7 +43,7 @@ typedef enum {
|
||||
GDK_DEBUG_PORTALS = 1 << 14,
|
||||
GDK_DEBUG_NO_PORTALS = 1 << 15,
|
||||
GDK_DEBUG_GL_DISABLE = 1 << 16,
|
||||
GDK_DEBUG_GL_NO_FRACTIONAL= 1 << 17,
|
||||
GDK_DEBUG_GL_FRACTIONAL = 1 << 17,
|
||||
|
||||
GDK_DEBUG_GL_DISABLE_GL = 1 << 19,
|
||||
GDK_DEBUG_GL_DISABLE_GLES = 1 << 20,
|
||||
|
||||
+6
-62
@@ -77,7 +77,6 @@ enum
|
||||
PROP_0,
|
||||
PROP_COMPOSITED,
|
||||
PROP_RGBA,
|
||||
PROP_SHADOW_WIDTH,
|
||||
PROP_INPUT_SHAPES,
|
||||
PROP_DMABUF_FORMATS,
|
||||
LAST_PROP
|
||||
@@ -112,7 +111,6 @@ struct _GdkDisplayPrivate {
|
||||
|
||||
guint rgba : 1;
|
||||
guint composited : 1;
|
||||
guint shadow_width: 1;
|
||||
guint input_shapes : 1;
|
||||
|
||||
GdkDebugFlags debug_flags;
|
||||
@@ -146,10 +144,6 @@ gdk_display_get_property (GObject *object,
|
||||
g_value_set_boolean (value, gdk_display_is_rgba (display));
|
||||
break;
|
||||
|
||||
case PROP_SHADOW_WIDTH:
|
||||
g_value_set_boolean (value, gdk_display_supports_shadow_width (display));
|
||||
break;
|
||||
|
||||
case PROP_INPUT_SHAPES:
|
||||
g_value_set_boolean (value, gdk_display_supports_input_shapes (display));
|
||||
break;
|
||||
@@ -249,18 +243,6 @@ gdk_display_class_init (GdkDisplayClass *class)
|
||||
TRUE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* GdkDisplay:shadow-width: (attributes org.gtk.Property.get=gdk_display_supports_shadow_width)
|
||||
*
|
||||
* %TRUE if the display supports extensible frames.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
props[PROP_SHADOW_WIDTH] =
|
||||
g_param_spec_boolean ("shadow-width", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* GdkDisplay:input-shapes: (attributes org.gtk.Property.get=gdk_display_supports_input_shapes)
|
||||
*
|
||||
@@ -409,7 +391,6 @@ gdk_display_init (GdkDisplay *display)
|
||||
|
||||
priv->composited = TRUE;
|
||||
priv->rgba = TRUE;
|
||||
priv->shadow_width = TRUE;
|
||||
priv->input_shapes = TRUE;
|
||||
}
|
||||
|
||||
@@ -1382,7 +1363,7 @@ gdk_display_init_gl (GdkDisplay *self)
|
||||
return;
|
||||
}
|
||||
|
||||
gdk_profiler_end_mark (before2, "Realize OpenGL context", NULL);
|
||||
gdk_profiler_end_mark (before2, "realize OpenGL context", NULL);
|
||||
|
||||
/* Only assign after realize, so GdkGLContext::realize() can use
|
||||
* gdk_display_get_gl_context() == NULL to differentiate between
|
||||
@@ -1392,7 +1373,7 @@ gdk_display_init_gl (GdkDisplay *self)
|
||||
|
||||
gdk_gl_backend_use (GDK_GL_CONTEXT_GET_CLASS (context)->backend_type);
|
||||
|
||||
gdk_profiler_end_mark (before, "Init OpenGL", NULL);
|
||||
gdk_profiler_end_mark (before, "initialize OpenGL", NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1787,6 +1768,7 @@ gdk_display_init_egl (GdkDisplay *self,
|
||||
{
|
||||
GdkDisplayPrivate *priv = gdk_display_get_instance_private (self);
|
||||
G_GNUC_UNUSED gint64 start_time = GDK_PROFILER_CURRENT_TIME;
|
||||
G_GNUC_UNUSED gint64 start_time2;
|
||||
int major, minor;
|
||||
|
||||
if (!gdk_gl_backend_can_be_used (GDK_GL_EGL, error))
|
||||
@@ -1813,6 +1795,7 @@ gdk_display_init_egl (GdkDisplay *self,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
start_time2 = GDK_PROFILER_CURRENT_TIME;
|
||||
if (!eglInitialize (priv->egl_display, &major, &minor))
|
||||
{
|
||||
priv->egl_display = NULL;
|
||||
@@ -1821,6 +1804,7 @@ gdk_display_init_egl (GdkDisplay *self,
|
||||
_("Could not initialize EGL display"));
|
||||
return FALSE;
|
||||
}
|
||||
gdk_profiler_end_mark (start_time2, "eglInitialize", NULL);
|
||||
|
||||
if (major < GDK_EGL_MIN_VERSION_MAJOR ||
|
||||
(major == GDK_EGL_MIN_VERSION_MAJOR && minor < GDK_EGL_MIN_VERSION_MINOR))
|
||||
@@ -1910,7 +1894,7 @@ gdk_display_init_egl (GdkDisplay *self,
|
||||
g_free (ext);
|
||||
}
|
||||
|
||||
gdk_profiler_end_mark (start_time, "Init EGL", NULL);
|
||||
gdk_profiler_end_mark (start_time, "init EGL", NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2141,46 +2125,6 @@ gdk_display_set_rgba (GdkDisplay *display,
|
||||
g_object_notify_by_pspec (G_OBJECT (display), props[PROP_RGBA]);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_display_supports_shadow_width: (attributes org.gtk.Method.get_property=shadow-width)
|
||||
* @display: a `GdkDisplay`
|
||||
*
|
||||
* Returns whether it's possible for a surface to draw outside of the window area.
|
||||
*
|
||||
* If %TRUE is returned the application decides if it wants to draw shadows.
|
||||
* If %FALSE is returned, the compositor decides if it wants to draw shadows.
|
||||
*
|
||||
* Returns: %TRUE if surfaces can draw shadows or
|
||||
* %FALSE if the display does not support this functionality.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
gboolean
|
||||
gdk_display_supports_shadow_width (GdkDisplay *display)
|
||||
{
|
||||
GdkDisplayPrivate *priv = gdk_display_get_instance_private (display);
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
|
||||
|
||||
return priv->shadow_width;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_display_set_shadow_width (GdkDisplay *display,
|
||||
gboolean shadow_width)
|
||||
{
|
||||
GdkDisplayPrivate *priv = gdk_display_get_instance_private (display);
|
||||
|
||||
g_return_if_fail (GDK_IS_DISPLAY (display));
|
||||
|
||||
if (priv->shadow_width == shadow_width)
|
||||
return;
|
||||
|
||||
priv->shadow_width = shadow_width;
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (display), props[PROP_SHADOW_WIDTH]);
|
||||
}
|
||||
|
||||
static void
|
||||
device_removed_cb (GdkSeat *seat,
|
||||
GdkDevice *device,
|
||||
|
||||
@@ -63,8 +63,6 @@ GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_display_is_composited (GdkDisplay *display);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_display_is_rgba (GdkDisplay *display);
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
gboolean gdk_display_supports_shadow_width (GdkDisplay *display);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_display_supports_input_shapes (GdkDisplay *display);
|
||||
|
||||
|
||||
@@ -257,8 +257,6 @@ void gdk_display_set_composited (GdkDisplay *display
|
||||
gboolean composited);
|
||||
void gdk_display_set_input_shapes (GdkDisplay *display,
|
||||
gboolean input_shapes);
|
||||
void gdk_display_set_shadow_width (GdkDisplay *display,
|
||||
gboolean shadow_width);
|
||||
|
||||
void gdk_display_add_seat (GdkDisplay *display,
|
||||
GdkSeat *seat);
|
||||
|
||||
+5
-5
@@ -687,7 +687,7 @@ _gdk_frame_clock_emit_update (GdkFrameClock *frame_clock)
|
||||
|
||||
g_signal_emit (frame_clock, signals[UPDATE], 0);
|
||||
|
||||
gdk_profiler_end_mark (before, "Frameclock update", NULL);
|
||||
gdk_profiler_end_mark (before, "frameclock update", NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -699,7 +699,7 @@ _gdk_frame_clock_emit_layout (GdkFrameClock *frame_clock)
|
||||
|
||||
g_signal_emit (frame_clock, signals[LAYOUT], 0);
|
||||
|
||||
gdk_profiler_end_mark (before, "Frameclock layout", NULL);
|
||||
gdk_profiler_end_mark (before, "frameclock layout", NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -711,7 +711,7 @@ _gdk_frame_clock_emit_paint (GdkFrameClock *frame_clock)
|
||||
|
||||
g_signal_emit (frame_clock, signals[PAINT], 0);
|
||||
|
||||
gdk_profiler_end_mark (before, "Frameclock paint", NULL);
|
||||
gdk_profiler_end_mark (before, "frameclock paint", NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -811,12 +811,12 @@ _gdk_frame_clock_add_timings_to_profiler (GdkFrameClock *clock,
|
||||
{
|
||||
if (timings->drawn_time != 0)
|
||||
{
|
||||
gdk_profiler_add_mark (1000 * timings->drawn_time, 0, "Drawn window", NULL);
|
||||
gdk_profiler_add_mark (1000 * timings->drawn_time, 0, "drawn window", NULL);
|
||||
}
|
||||
|
||||
if (timings->presentation_time != 0)
|
||||
{
|
||||
gdk_profiler_add_mark (1000 * timings->presentation_time, 0, "Presented window", NULL);
|
||||
gdk_profiler_add_mark (1000 * timings->presentation_time, 0, "presented window", NULL);
|
||||
}
|
||||
|
||||
gdk_profiler_set_counter (fps_counter, gdk_frame_clock_get_fps (clock));
|
||||
|
||||
@@ -694,7 +694,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
if (!gdk_frame_clock_idle_is_frozen (clock_idle))
|
||||
priv->sleep_serial = get_sleep_serial ();
|
||||
|
||||
gdk_profiler_end_mark (before, "Frameclock cycle", NULL);
|
||||
gdk_profiler_end_mark (before, "frameclock cycle", NULL);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+12
-3
@@ -386,7 +386,7 @@ gdk_gl_context_create_egl_context (GdkGLContext *context,
|
||||
else if (epoxy_has_egl_extension (egl_display, "EGL_EXT_swap_buffers_with_damage"))
|
||||
priv->eglSwapBuffersWithDamage = (gpointer) epoxy_eglGetProcAddress ("eglSwapBuffersWithDamageEXT");
|
||||
|
||||
gdk_profiler_end_mark (start_time, "Create EGL context", NULL);
|
||||
gdk_profiler_end_mark (start_time, "realize GdkWaylandGLContext", NULL);
|
||||
|
||||
return api;
|
||||
}
|
||||
@@ -593,7 +593,7 @@ gdk_gl_context_get_scale (GdkGLContext *self)
|
||||
scale = gdk_surface_get_scale (surface);
|
||||
|
||||
display = gdk_gl_context_get_display (self);
|
||||
if (gdk_display_get_debug_flags (display) & GDK_DEBUG_GL_NO_FRACTIONAL)
|
||||
if (!(gdk_display_get_debug_flags (display) & GDK_DEBUG_GL_FRACTIONAL))
|
||||
scale = ceil (scale);
|
||||
|
||||
return scale;
|
||||
@@ -669,7 +669,7 @@ gdk_gl_context_real_end_frame (GdkDrawContext *draw_context,
|
||||
|
||||
egl_surface = gdk_surface_get_egl_surface (surface);
|
||||
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "EGL swap buffers", NULL);
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "EGL", "swap buffers");
|
||||
|
||||
if (priv->eglSwapBuffersWithDamage)
|
||||
{
|
||||
@@ -2042,6 +2042,15 @@ gdk_gl_context_has_sync (GdkGLContext *self)
|
||||
return priv->has_sync;
|
||||
}
|
||||
|
||||
/* Return if GL_BGRA works with glTexImage2D */
|
||||
gboolean
|
||||
gdk_gl_context_has_bgra (GdkGLContext *self)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self);
|
||||
|
||||
return priv->has_bgra;
|
||||
}
|
||||
|
||||
/* Return if glGenVertexArrays, glBindVertexArray and glDeleteVertexArrays
|
||||
* can be used
|
||||
*/
|
||||
|
||||
@@ -171,6 +171,8 @@ gboolean gdk_gl_context_has_vertex_half_float (GdkGLContext
|
||||
|
||||
gboolean gdk_gl_context_has_sync (GdkGLContext *self) G_GNUC_PURE;
|
||||
|
||||
gboolean gdk_gl_context_has_bgra (GdkGLContext *self) G_GNUC_PURE;
|
||||
|
||||
gboolean gdk_gl_context_has_vertex_arrays (GdkGLContext *self) G_GNUC_PURE;
|
||||
|
||||
double gdk_gl_context_get_scale (GdkGLContext *self);
|
||||
|
||||
+6
-7
@@ -32,7 +32,6 @@
|
||||
#include "version/gdkversionmacros.h"
|
||||
#include "gdkframeclockprivate.h"
|
||||
|
||||
#define CATEGORY "GTK"
|
||||
|
||||
gboolean
|
||||
gdk_profiler_is_running (void)
|
||||
@@ -51,7 +50,7 @@ void
|
||||
const char *message)
|
||||
{
|
||||
#ifdef HAVE_SYSPROF
|
||||
sysprof_collector_mark (begin_time, duration, CATEGORY, name, message);
|
||||
sysprof_collector_mark (begin_time, duration, "gtk", name, message);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -61,7 +60,7 @@ void
|
||||
const char *message)
|
||||
{
|
||||
#ifdef HAVE_SYSPROF
|
||||
sysprof_collector_mark (begin_time, GDK_PROFILER_CURRENT_TIME - begin_time, CATEGORY, name, message);
|
||||
sysprof_collector_mark (begin_time, GDK_PROFILER_CURRENT_TIME - begin_time, "gtk", name, message);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -75,7 +74,7 @@ void
|
||||
#ifdef HAVE_SYSPROF
|
||||
va_list args;
|
||||
va_start (args, message_format);
|
||||
sysprof_collector_mark_vprintf (begin_time, duration, CATEGORY, name, message_format, args);
|
||||
sysprof_collector_mark_vprintf (begin_time, duration, "gtk", name, message_format, args);
|
||||
va_end (args);
|
||||
#endif /* HAVE_SYSPROF */
|
||||
}
|
||||
@@ -89,7 +88,7 @@ void
|
||||
#ifdef HAVE_SYSPROF
|
||||
va_list args;
|
||||
va_start (args, message_format);
|
||||
sysprof_collector_mark_vprintf (begin_time, GDK_PROFILER_CURRENT_TIME - begin_time, CATEGORY, name, message_format, args);
|
||||
sysprof_collector_mark_vprintf (begin_time, GDK_PROFILER_CURRENT_TIME - begin_time, "gtk", name, message_format, args);
|
||||
va_end (args);
|
||||
#endif /* HAVE_SYSPROF */
|
||||
}
|
||||
@@ -104,7 +103,7 @@ guint
|
||||
counter.id = sysprof_collector_request_counters (1);
|
||||
counter.type = SYSPROF_CAPTURE_COUNTER_DOUBLE;
|
||||
counter.value.vdbl = 0.0;
|
||||
g_strlcpy (counter.category, CATEGORY, sizeof counter.category);
|
||||
g_strlcpy (counter.category, "gtk", sizeof counter.category);
|
||||
g_strlcpy (counter.name, name, sizeof counter.name);
|
||||
g_strlcpy (counter.description, description, sizeof counter.name);
|
||||
|
||||
@@ -126,7 +125,7 @@ guint
|
||||
counter.id = sysprof_collector_request_counters (1);
|
||||
counter.type = SYSPROF_CAPTURE_COUNTER_INT64;
|
||||
counter.value.v64 = 0;
|
||||
g_strlcpy (counter.category, CATEGORY, sizeof counter.category);
|
||||
g_strlcpy (counter.category, "gtk", sizeof counter.category);
|
||||
g_strlcpy (counter.name, name, sizeof counter.name);
|
||||
g_strlcpy (counter.description, description, sizeof counter.name);
|
||||
|
||||
|
||||
+2
-2
@@ -2839,7 +2839,7 @@ add_event_mark (GdkEvent *event,
|
||||
class = g_type_class_ref (GDK_TYPE_EVENT_TYPE);
|
||||
value = g_enum_get_value (class, event_type);
|
||||
g_type_class_unref (class);
|
||||
kind = value ? value->value_nick : "Event";
|
||||
kind = value ? value->value_nick : "event";
|
||||
|
||||
switch ((int) event_type)
|
||||
{
|
||||
@@ -2909,7 +2909,7 @@ add_event_mark (GdkEvent *event,
|
||||
break;
|
||||
}
|
||||
|
||||
gdk_profiler_add_mark (time, end_time - time, "Event", message ? message : kind);
|
||||
gdk_profiler_add_mark (time, end_time - time, "event", message ? message : kind);
|
||||
|
||||
g_free (message);
|
||||
#endif
|
||||
|
||||
@@ -142,9 +142,6 @@ gdk_toplevel_size_set_min_size (GdkToplevelSize *size,
|
||||
* The shadow width corresponds to the part of the computed surface size
|
||||
* that would consist of the shadow margin surrounding the window, would
|
||||
* there be any.
|
||||
*
|
||||
* Shadow width should only be set if
|
||||
* [method@Gtk.Display.supports_shadow_width] is %TRUE.
|
||||
*/
|
||||
void
|
||||
gdk_toplevel_size_set_shadow_width (GdkToplevelSize *size,
|
||||
|
||||
@@ -237,7 +237,7 @@ gdk_load_jpeg (GBytes *input_bytes,
|
||||
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
gdk_profiler_end_mark (before, "Load jpeg", NULL);
|
||||
gdk_profiler_end_mark (before, "jpeg load", NULL);
|
||||
|
||||
return texture;
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ gdk_load_png (GBytes *bytes,
|
||||
{
|
||||
gint64 end = GDK_PROFILER_CURRENT_TIME;
|
||||
if (end - before > 500000)
|
||||
gdk_profiler_add_mark (before, end - before, "Load png", NULL);
|
||||
gdk_profiler_add_mark (before, end - before, "png load", NULL);
|
||||
}
|
||||
|
||||
return texture;
|
||||
|
||||
@@ -504,7 +504,7 @@ gdk_load_tiff (GBytes *input_bytes,
|
||||
{
|
||||
gint64 end = GDK_PROFILER_CURRENT_TIME;
|
||||
if (end - before > 500000)
|
||||
gdk_profiler_add_mark (before, end - before, "Load tiff", NULL);
|
||||
gdk_profiler_add_mark (before, end - before, "tiff load", NULL);
|
||||
}
|
||||
|
||||
return texture;
|
||||
|
||||
@@ -398,7 +398,8 @@ typedef NSString *CALayerContentsGravity;
|
||||
* in from a display-side change. We need to request a layout in
|
||||
* addition to the configure event.
|
||||
*/
|
||||
if (GDK_IS_MACOS_TOPLEVEL_SURFACE (gdk_surface))
|
||||
if (GDK_IS_MACOS_TOPLEVEL_SURFACE (gdk_surface) &&
|
||||
GDK_MACOS_TOPLEVEL_SURFACE (gdk_surface)->decorated)
|
||||
gdk_surface_request_layout (GDK_SURFACE (gdk_surface));
|
||||
}
|
||||
|
||||
@@ -874,21 +875,12 @@ typedef NSString *CALayerContentsGravity;
|
||||
{
|
||||
NSWindowStyleMask style_mask = [self styleMask];
|
||||
|
||||
if (decorated)
|
||||
{
|
||||
style_mask &= ~NSWindowStyleMaskFullSizeContentView;
|
||||
[self setTitleVisibility:NSWindowTitleVisible];
|
||||
}
|
||||
else
|
||||
{
|
||||
style_mask |= NSWindowStyleMaskFullSizeContentView;
|
||||
[self setTitleVisibility:NSWindowTitleHidden];
|
||||
}
|
||||
[self setHasShadow:decorated];
|
||||
|
||||
[self setTitlebarAppearsTransparent:!decorated];
|
||||
[[self standardWindowButton:NSWindowCloseButton] setHidden:!decorated];
|
||||
[[self standardWindowButton:NSWindowMiniaturizeButton] setHidden:!decorated];
|
||||
[[self standardWindowButton:NSWindowZoomButton] setHidden:!decorated];
|
||||
if (decorated)
|
||||
style_mask |= NSWindowStyleMaskTitled;
|
||||
else
|
||||
style_mask &= ~NSWindowStyleMaskTitled;
|
||||
|
||||
[self setStyleMask:style_mask];
|
||||
}
|
||||
|
||||
@@ -625,7 +625,6 @@ gdk_macos_display_init (GdkMacosDisplay *self)
|
||||
gdk_display_set_composited (GDK_DISPLAY (self), TRUE);
|
||||
gdk_display_set_input_shapes (GDK_DISPLAY (self), FALSE);
|
||||
gdk_display_set_rgba (GDK_DISPLAY (self), TRUE);
|
||||
gdk_display_set_shadow_width (GDK_DISPLAY (self), FALSE);
|
||||
}
|
||||
|
||||
GdkDisplay *
|
||||
|
||||
@@ -186,7 +186,7 @@ gdk_wayland_cairo_context_end_frame (GdkDrawContext *draw_context,
|
||||
gdk_wayland_surface_attach_image (surface, self->paint_surface, painted);
|
||||
gdk_wayland_surface_request_frame (surface);
|
||||
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "Wayland surface commit", NULL);
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "wayland", "surface commit");
|
||||
gdk_wayland_surface_commit (surface);
|
||||
gdk_wayland_surface_notify_committed (surface);
|
||||
|
||||
@@ -206,7 +206,7 @@ gdk_wayland_cairo_context_empty_frame (GdkDrawContext *draw_context)
|
||||
gdk_wayland_surface_sync (surface);
|
||||
gdk_wayland_surface_request_frame (surface);
|
||||
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "Wayland surface commit", NULL);
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "wayland", "surface commit");
|
||||
gdk_wayland_surface_commit (surface);
|
||||
gdk_wayland_surface_notify_committed (surface);
|
||||
}
|
||||
|
||||
@@ -1253,7 +1253,7 @@ _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland)
|
||||
gdk_wayland_display_set_cursor_theme (GDK_DISPLAY (display_wayland), name, size);
|
||||
g_value_unset (&v);
|
||||
|
||||
gdk_profiler_end_mark (before, "Wayland cursor theme load", NULL);
|
||||
gdk_profiler_end_mark (before, "wayland", "load cursor theme");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -87,8 +87,9 @@ static void
|
||||
gdk_wayland_gl_context_empty_frame (GdkDrawContext *draw_context)
|
||||
{
|
||||
GdkSurface *surface = gdk_draw_context_get_surface (draw_context);
|
||||
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
|
||||
|
||||
if (gdk_wayland_surface_needs_commit (surface))
|
||||
if (impl->has_pending_subsurface_commits)
|
||||
{
|
||||
gdk_wayland_surface_sync (surface);
|
||||
gdk_wayland_surface_request_frame (surface);
|
||||
|
||||
@@ -1012,7 +1012,7 @@ gdk_wayland_surface_create_xdg_popup (GdkWaylandPopup *wayland_popup,
|
||||
}
|
||||
}
|
||||
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "Wayland surface commit", NULL);
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "wayland", "surface commit");
|
||||
wl_surface_commit (impl->display_server.wl_surface);
|
||||
|
||||
if (GDK_IS_POPUP (surface))
|
||||
|
||||
@@ -129,7 +129,6 @@ guint _gdk_wayland_cursor_get_next_image_index (GdkWaylandDisplay *display,
|
||||
guint *next_image_delay);
|
||||
|
||||
void gdk_wayland_surface_sync (GdkSurface *surface);
|
||||
gboolean gdk_wayland_surface_needs_commit (GdkSurface *surface);
|
||||
void gdk_wayland_surface_commit (GdkSurface *surface);
|
||||
void gdk_wayland_surface_notify_committed (GdkSurface *surface);
|
||||
void gdk_wayland_surface_request_frame (GdkSurface *surface);
|
||||
|
||||
@@ -199,20 +199,20 @@ get_egl_window_size (GdkSurface *surface,
|
||||
GdkDisplay *display = gdk_surface_get_display (surface);
|
||||
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
|
||||
|
||||
if (GDK_DISPLAY_DEBUG_CHECK (display, GL_NO_FRACTIONAL))
|
||||
{
|
||||
GDK_DISPLAY_DEBUG (display, OPENGL, "Using integer scale %d for EGL window", gdk_fractional_scale_to_int (&impl->scale));
|
||||
|
||||
*width = surface->width * gdk_fractional_scale_to_int (&impl->scale);
|
||||
*height = surface->height * gdk_fractional_scale_to_int (&impl->scale);
|
||||
}
|
||||
else
|
||||
if (GDK_DISPLAY_DEBUG_CHECK (display, GL_FRACTIONAL))
|
||||
{
|
||||
GDK_DISPLAY_DEBUG (display, OPENGL, "Using fractional scale %g for EGL window", gdk_fractional_scale_to_double (&impl->scale));
|
||||
|
||||
*width = gdk_fractional_scale_scale (&impl->scale, surface->width),
|
||||
*height = gdk_fractional_scale_scale (&impl->scale, surface->height);
|
||||
}
|
||||
else
|
||||
{
|
||||
GDK_DISPLAY_DEBUG (display, OPENGL, "Using integer scale %d for EGL window", gdk_fractional_scale_to_int (&impl->scale));
|
||||
|
||||
*width = surface->width * gdk_fractional_scale_to_int (&impl->scale);
|
||||
*height = surface->height * gdk_fractional_scale_to_int (&impl->scale);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -274,7 +274,7 @@ gdk_wayland_surface_frame_callback (GdkSurface *surface,
|
||||
GdkFrameClock *clock = gdk_surface_get_frame_clock (surface);
|
||||
GdkFrameTimings *timings;
|
||||
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "Wayland frame event", NULL);
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "wayland", "frame event");
|
||||
GDK_DISPLAY_DEBUG (GDK_DISPLAY (display_wayland), EVENTS, "frame %p", surface);
|
||||
|
||||
g_clear_pointer (&impl->frame_callback, wl_callback_destroy);
|
||||
@@ -746,18 +746,6 @@ gdk_wayland_surface_sync (GdkSurface *surface)
|
||||
gdk_wayland_surface_sync_viewport (surface);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_wayland_surface_needs_commit (GdkSurface *surface)
|
||||
{
|
||||
GdkWaylandSurface *self = GDK_WAYLAND_SURFACE (surface);
|
||||
|
||||
return self->has_pending_subsurface_commits ||
|
||||
self->opaque_region_dirty ||
|
||||
self->input_region_dirty ||
|
||||
self->buffer_scale_dirty ||
|
||||
self->viewport_dirty;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_surface_fractional_scale_preferred_scale_cb (void *data,
|
||||
struct wp_fractional_scale_v1 *fractional_scale,
|
||||
|
||||
@@ -830,7 +830,7 @@ gdk_wayland_surface_create_xdg_toplevel (GdkWaylandToplevel *wayland_toplevel)
|
||||
maybe_set_gtk_surface_dbus_properties (wayland_toplevel);
|
||||
maybe_set_gtk_surface_modal (wayland_toplevel);
|
||||
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "Wayland surface commit", NULL);
|
||||
gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "wayland", "surface commit");
|
||||
wl_surface_commit (wayland_surface->display_server.wl_surface);
|
||||
}
|
||||
|
||||
|
||||
@@ -1064,7 +1064,6 @@ gdk_win32_display_check_composited (GdkWin32Display *display)
|
||||
}
|
||||
|
||||
gdk_display_set_composited (GDK_DISPLAY (display), composited);
|
||||
gdk_display_set_shadow_width (GDK_DISPLAY (display), composited);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -1429,7 +1429,6 @@ gdk_x11_display_open (const char *display_name)
|
||||
int ignore;
|
||||
int maj, min;
|
||||
char *cm_name;
|
||||
gboolean frame_extents;
|
||||
|
||||
XInitThreads ();
|
||||
|
||||
@@ -1644,10 +1643,6 @@ gdk_x11_display_open (const char *display_name)
|
||||
gdk_x11_get_xatom_by_name_for_display (display, cm_name)) != None);
|
||||
g_free (cm_name);
|
||||
|
||||
frame_extents = gdk_x11_screen_supports_net_wm_hint (gdk_x11_display_get_screen (display),
|
||||
g_intern_static_string ("_GTK_FRAME_EXTENTS"));
|
||||
gdk_display_set_shadow_width (display, frame_extents);
|
||||
|
||||
gdk_display_emit_opened (display);
|
||||
|
||||
return display;
|
||||
|
||||
@@ -1608,8 +1608,8 @@ gsk_gl_command_queue_do_upload_texture_chunk (GskGLCommandQueue *self,
|
||||
|
||||
if (gdk_profiler_is_running ())
|
||||
{
|
||||
gdk_profiler_end_markf (start_time,
|
||||
"Download texture chunk",
|
||||
gdk_profiler_add_markf (start_time, GDK_PROFILER_CURRENT_TIME-start_time,
|
||||
"Download Texture chunk",
|
||||
"Tile %dx%d Size %dx%d", x, y, width, height);
|
||||
start_time = GDK_PROFILER_CURRENT_TIME;
|
||||
}
|
||||
@@ -1654,8 +1654,8 @@ gsk_gl_command_queue_do_upload_texture_chunk (GskGLCommandQueue *self,
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
if (gdk_profiler_is_running ())
|
||||
gdk_profiler_end_markf (start_time,
|
||||
"Upload texture chunk",
|
||||
gdk_profiler_add_markf (start_time, GDK_PROFILER_CURRENT_TIME-start_time,
|
||||
"Upload Texture chunk",
|
||||
"Tile %dx%d Size %dx%d", x, y, width, height);
|
||||
}
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@ gsk_gl_driver_load_programs (GskGLDriver *self,
|
||||
failure:
|
||||
g_clear_object (&compiler);
|
||||
|
||||
gdk_profiler_end_mark (start_time, "Load GL programs", NULL);
|
||||
gdk_profiler_end_mark (start_time, "load programs", NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -477,7 +477,7 @@ gsk_gl_driver_new (GskGLCommandQueue *command_queue,
|
||||
self->icons_library = gsk_gl_icon_library_new (self);
|
||||
self->shadows_library = gsk_gl_shadow_library_new (self);
|
||||
|
||||
gdk_profiler_end_mark (before, "Create GL driver", NULL);
|
||||
gdk_profiler_end_mark (before, "create GskGLDriver", NULL);
|
||||
|
||||
return g_steal_pointer (&self);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,11 @@ gsk_gl_glyph_library_init_atlas (GskGLTextureLibrary *self,
|
||||
|
||||
memset (pixel_data, 255, sizeof pixel_data);
|
||||
|
||||
if (gdk_gl_context_get_use_es (gdk_gl_context_get_current ()))
|
||||
if (!gdk_gl_context_has_bgra (gdk_gl_context_get_current ())
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
|| gdk_gl_context_get_use_es (gdk_gl_context_get_current ())
|
||||
#endif
|
||||
)
|
||||
{
|
||||
gl_format = GL_RGBA;
|
||||
gl_type = GL_UNSIGNED_BYTE;
|
||||
@@ -376,7 +380,7 @@ gsk_gl_glyph_library_upload_glyph (GskGLGlyphLibrary *self,
|
||||
{
|
||||
char message[64];
|
||||
g_snprintf (message, sizeof message, "Size %dx%d", width, height);
|
||||
gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Upload glyph", message);
|
||||
gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Upload Glyph", message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -211,6 +211,6 @@ gsk_gl_icon_library_add (GskGLIconLibrary *self,
|
||||
{
|
||||
char message[64];
|
||||
g_snprintf (message, sizeof message, "Size %dx%d", width, height);
|
||||
gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Upload icon", message);
|
||||
gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Upload Icon", message);
|
||||
}
|
||||
}
|
||||
|
||||
+31
-31
@@ -830,8 +830,8 @@ rounded_rect_scale_corners (const GskRoundedRect *rect,
|
||||
{
|
||||
for (guint i = 0; i < G_N_ELEMENTS (out_rect->corner); i++)
|
||||
{
|
||||
out_rect->corner[i].width = rect->corner[i].width * fabsf (scale_x);
|
||||
out_rect->corner[i].height = rect->corner[i].height * fabsf (scale_y);
|
||||
out_rect->corner[i].width = rect->corner[i].width * fabs (scale_x);
|
||||
out_rect->corner[i].height = rect->corner[i].height * fabs (scale_y);
|
||||
}
|
||||
|
||||
if (scale_x < 0)
|
||||
@@ -1173,8 +1173,8 @@ gsk_gl_render_job_visit_as_fallback (GskGLRenderJob *job,
|
||||
{
|
||||
float scale_x = job->scale_x;
|
||||
float scale_y = job->scale_y;
|
||||
int surface_width = ceilf (node->bounds.size.width * fabsf (scale_x));
|
||||
int surface_height = ceilf (node->bounds.size.height * fabsf (scale_y));
|
||||
int surface_width = ceilf (node->bounds.size.width * fabs (scale_x));
|
||||
int surface_height = ceilf (node->bounds.size.height * fabs (scale_y));
|
||||
GdkTexture *texture;
|
||||
cairo_surface_t *surface;
|
||||
cairo_surface_t *rendered_surface;
|
||||
@@ -1203,7 +1203,7 @@ gsk_gl_render_job_visit_as_fallback (GskGLRenderJob *job,
|
||||
surface_width,
|
||||
surface_height);
|
||||
|
||||
cairo_surface_set_device_scale (rendered_surface, fabsf (scale_x), fabsf (scale_y));
|
||||
cairo_surface_set_device_scale (rendered_surface, fabs (scale_x), fabs (scale_y));
|
||||
cr = cairo_create (rendered_surface);
|
||||
|
||||
cairo_save (cr);
|
||||
@@ -1217,16 +1217,16 @@ gsk_gl_render_job_visit_as_fallback (GskGLRenderJob *job,
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
surface_width,
|
||||
surface_height);
|
||||
cairo_surface_set_device_scale (surface, fabsf (scale_x), fabsf (scale_y));
|
||||
cairo_surface_set_device_scale (surface, fabs (scale_x), fabs (scale_y));
|
||||
cr = cairo_create (surface);
|
||||
|
||||
/* We draw upside down here, so it matches what GL does. */
|
||||
cairo_save (cr);
|
||||
cairo_scale (cr, scale_x < 0 ? -1 : 1, scale_y < 0 ? 1 : -1);
|
||||
cairo_translate (cr, scale_x < 0 ? - surface_width / fabsf (scale_x) : 0,
|
||||
scale_y < 0 ? 0 : - surface_height / fabsf (scale_y));
|
||||
cairo_translate (cr, scale_x < 0 ? - surface_width / fabs (scale_x) : 0,
|
||||
scale_y < 0 ? 0 : - surface_height / fabs (scale_y));
|
||||
cairo_set_source_surface (cr, rendered_surface, 0, 0);
|
||||
cairo_rectangle (cr, 0, 0, surface_width / fabsf (scale_x), surface_height / fabsf (scale_y));
|
||||
cairo_rectangle (cr, 0, 0, surface_width / fabs (scale_x), surface_height / fabs (scale_y));
|
||||
cairo_fill (cr);
|
||||
cairo_restore (cr);
|
||||
cairo_destroy (cr);
|
||||
@@ -1432,10 +1432,10 @@ blur_node (GskGLRenderJob *job,
|
||||
|
||||
offscreen->texture_id = blur_offscreen (job,
|
||||
offscreen,
|
||||
texture_width * fabsf (scale_x),
|
||||
texture_height * fabsf (scale_y),
|
||||
blur_radius * fabsf (scale_x),
|
||||
blur_radius * fabsf (scale_y));
|
||||
texture_width * fabs (scale_x),
|
||||
texture_height * fabs (scale_y),
|
||||
blur_radius * fabs (scale_x),
|
||||
blur_radius * fabs (scale_y));
|
||||
init_full_texture_region (offscreen);
|
||||
}
|
||||
|
||||
@@ -2019,9 +2019,9 @@ result_is_axis_aligned (GskTransform *transform,
|
||||
for (guint i = 0; i < 4; i++)
|
||||
{
|
||||
p = graphene_quad_get_point (&q, i);
|
||||
if (fabsf (p->x - b1.x) > FLT_EPSILON && fabsf (p->x - b2.x) > FLT_EPSILON)
|
||||
if (fabs (p->x - b1.x) > FLT_EPSILON && fabs (p->x - b2.x) > FLT_EPSILON)
|
||||
return FALSE;
|
||||
if (fabsf (p->y - b1.y) > FLT_EPSILON && fabsf (p->y - b2.y) > FLT_EPSILON)
|
||||
if (fabs (p->y - b1.y) > FLT_EPSILON && fabs (p->y - b2.y) > FLT_EPSILON)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2304,8 +2304,8 @@ gsk_gl_render_job_visit_blurred_inset_shadow_node (GskGLRenderJob *job,
|
||||
&offscreen,
|
||||
texture_width,
|
||||
texture_height,
|
||||
blur_radius * fabsf (scale_x),
|
||||
blur_radius * fabsf (scale_y));
|
||||
blur_radius * fabs (scale_x),
|
||||
blur_radius * fabs (scale_y));
|
||||
|
||||
gsk_gl_driver_release_render_target (job->driver, render_target, TRUE);
|
||||
|
||||
@@ -2501,8 +2501,8 @@ gsk_gl_render_job_visit_blurred_outset_shadow_node (GskGLRenderJob *job,
|
||||
do_slicing = TRUE;
|
||||
}
|
||||
|
||||
texture_width = (int)ceilf ((scaled_outline.bounds.size.width + blur_extra) * scale_x);
|
||||
texture_height = (int)ceilf ((scaled_outline.bounds.size.height + blur_extra) * scale_y);
|
||||
texture_width = (int)ceil ((scaled_outline.bounds.size.width + blur_extra) * scale_x);
|
||||
texture_height = (int)ceil ((scaled_outline.bounds.size.height + blur_extra) * scale_y);
|
||||
|
||||
scaled_outline.bounds.origin.x = extra_blur_pixels_x;
|
||||
scaled_outline.bounds.origin.y = extra_blur_pixels_y;
|
||||
@@ -2577,8 +2577,8 @@ gsk_gl_render_job_visit_blurred_outset_shadow_node (GskGLRenderJob *job,
|
||||
&offscreen,
|
||||
texture_width,
|
||||
texture_height,
|
||||
blur_radius * fabsf (scale_x),
|
||||
blur_radius * fabsf (scale_y));
|
||||
blur_radius * fabs (scale_x),
|
||||
blur_radius * fabs (scale_y));
|
||||
|
||||
gsk_gl_shadow_library_insert (job->driver->shadows_library,
|
||||
&scaled_outline,
|
||||
@@ -2834,7 +2834,7 @@ gsk_gl_render_job_visit_cross_fade_node (GskGLRenderJob *job,
|
||||
offscreen_end.reset_clip = TRUE;
|
||||
offscreen_end.bounds = &node->bounds;
|
||||
|
||||
gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabsf (job->scale_x), fabsf (job->scale_y)));
|
||||
gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabs (job->scale_x), fabs (job->scale_y)));
|
||||
|
||||
if (!gsk_gl_render_job_visit_node_with_offscreen (job, start_node, &offscreen_start))
|
||||
{
|
||||
@@ -2964,7 +2964,7 @@ gsk_gl_render_job_visit_text_node (GskGLRenderJob *job,
|
||||
const PangoFont *font = gsk_text_node_get_font (node);
|
||||
const PangoGlyphInfo *glyphs = gsk_text_node_get_glyphs (node, NULL);
|
||||
const graphene_point_t *offset = gsk_text_node_get_offset (node);
|
||||
float text_scale = MAX (fabsf (job->scale_x), fabsf (job->scale_y)); /* TODO: Fix for uneven scales? */
|
||||
float text_scale = MAX (fabs (job->scale_x), fabs (job->scale_y)); /* TODO: Fix for uneven scales? */
|
||||
guint num_glyphs = gsk_text_node_get_num_glyphs (node);
|
||||
float x = offset->x + job->offset_x;
|
||||
float y = offset->y + job->offset_y;
|
||||
@@ -3263,7 +3263,7 @@ gsk_gl_render_job_visit_blend_node (GskGLRenderJob *job,
|
||||
bottom_offscreen.force_offscreen = TRUE;
|
||||
bottom_offscreen.reset_clip = TRUE;
|
||||
|
||||
gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabsf (job->scale_x), fabsf (job->scale_y)));
|
||||
gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabs (job->scale_x), fabs (job->scale_y)));
|
||||
|
||||
/* TODO: We create 2 textures here as big as the blend node, but both the
|
||||
* start and the end node might be a lot smaller than that. */
|
||||
@@ -3344,8 +3344,8 @@ gsk_gl_render_job_texture_mask_for_color (GskGLRenderJob *job,
|
||||
gboolean use_mipmap;
|
||||
guint16 cc[4];
|
||||
|
||||
use_mipmap = (scale_x * fabsf (job->scale_x)) < 0.5 ||
|
||||
(scale_y * fabsf (job->scale_y)) < 0.5;
|
||||
use_mipmap = (scale_x * fabs (job->scale_x)) < 0.5 ||
|
||||
(scale_y * fabs (job->scale_y)) < 0.5;
|
||||
|
||||
rgba_to_half (rgba, cc);
|
||||
gsk_gl_render_job_upload_texture (job, texture, use_mipmap, &offscreen);
|
||||
@@ -3396,7 +3396,7 @@ gsk_gl_render_job_visit_mask_node (GskGLRenderJob *job,
|
||||
mask_offscreen.reset_clip = TRUE;
|
||||
mask_offscreen.do_not_cache = TRUE;
|
||||
|
||||
gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabsf (job->scale_x), fabsf (job->scale_y)));
|
||||
gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabs (job->scale_x), fabs (job->scale_y)));
|
||||
|
||||
/* TODO: We create 2 textures here as big as the mask node, but both
|
||||
* nodes might be a lot smaller than that.
|
||||
@@ -3664,8 +3664,8 @@ gsk_gl_render_job_visit_texture (GskGLRenderJob *job,
|
||||
float scale_y = bounds->size.height / texture->height;
|
||||
gboolean use_mipmap;
|
||||
|
||||
use_mipmap = (scale_x * fabsf (job->scale_x)) < 0.5 ||
|
||||
(scale_y * fabsf (job->scale_y)) < 0.5;
|
||||
use_mipmap = (scale_x * fabs (job->scale_x)) < 0.5 ||
|
||||
(scale_y * fabs (job->scale_y)) < 0.5;
|
||||
|
||||
if G_LIKELY (texture->width <= max_texture_size &&
|
||||
texture->height <= max_texture_size)
|
||||
@@ -4544,7 +4544,7 @@ gsk_gl_render_job_render (GskGLRenderJob *job,
|
||||
gsk_gl_render_job_visit_node (job, root);
|
||||
gdk_gl_context_pop_debug_group (job->command_queue->context);
|
||||
|
||||
gdk_profiler_end_mark (start_time, "Build GL command queue", "");
|
||||
gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Build GL command queue", "");
|
||||
|
||||
#if 0
|
||||
/* At this point the atlases have uploaded content while we processed
|
||||
@@ -4562,7 +4562,7 @@ gsk_gl_render_job_render (GskGLRenderJob *job,
|
||||
gdk_gl_context_push_debug_group (job->command_queue->context, "Executing command queue");
|
||||
gsk_gl_command_queue_execute (job->command_queue, surface_height, scale, job->region, job->default_framebuffer);
|
||||
gdk_gl_context_pop_debug_group (job->command_queue->context);
|
||||
gdk_profiler_end_mark (start_time, "Execute GL command queue", "");
|
||||
gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Execute GL command queue", "");
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -117,8 +117,9 @@ gsk_gl_texture_library_real_compact (GskGLTextureLibrary *self,
|
||||
g_hash_table_iter_remove (&iter);
|
||||
dropped++;
|
||||
}
|
||||
else if (periodic_scan)
|
||||
entry->accessed = FALSE;
|
||||
|
||||
if (periodic_scan)
|
||||
entry->accessed = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -439,6 +440,7 @@ gsk_gl_texture_library_pack (GskGLTextureLibrary *self,
|
||||
|
||||
entry->texture = texture;
|
||||
entry->is_atlased = FALSE;
|
||||
entry->accessed = TRUE;
|
||||
entry->area.x = padding / (float) (padding + width + padding);
|
||||
entry->area.y = padding / (float) (padding + height + padding);
|
||||
entry->area.x2 = (padding + width) / (float) (padding + width + padding);
|
||||
|
||||
@@ -125,12 +125,6 @@ gsk_gl_device_create_atlas_image (GskGpuDevice *device,
|
||||
height);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gl_device_make_current (GskGpuDevice *device)
|
||||
{
|
||||
gdk_gl_context_make_current (gdk_display_get_gl_context (gsk_gpu_device_get_display (device)));
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gl_device_finalize (GObject *object)
|
||||
{
|
||||
@@ -157,7 +151,6 @@ gsk_gl_device_class_init (GskGLDeviceClass *klass)
|
||||
gpu_device_class->create_atlas_image = gsk_gl_device_create_atlas_image;
|
||||
gpu_device_class->create_upload_image = gsk_gl_device_create_upload_image;
|
||||
gpu_device_class->create_download_image = gsk_gl_device_create_download_image;
|
||||
gpu_device_class->make_current = gsk_gl_device_make_current;
|
||||
|
||||
object_class->finalize = gsk_gl_device_finalize;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ gsk_gl_image_finalize (GObject *object)
|
||||
{
|
||||
GskGLImage *self = GSK_GL_IMAGE (object);
|
||||
|
||||
if (self->texture_id && self->framebuffer_id)
|
||||
if (self->framebuffer_id)
|
||||
glDeleteFramebuffers (1, &self->framebuffer_id);
|
||||
|
||||
if (self->owns_texture)
|
||||
@@ -70,7 +70,6 @@ gsk_gl_image_init (GskGLImage *self)
|
||||
|
||||
GskGpuImage *
|
||||
gsk_gl_image_new_backbuffer (GskGLDevice *device,
|
||||
GdkGLContext *context,
|
||||
GdkMemoryFormat format,
|
||||
gsize width,
|
||||
gsize height)
|
||||
@@ -96,13 +95,6 @@ gsk_gl_image_new_backbuffer (GskGLDevice *device,
|
||||
|
||||
/* texture_id == 0 means backbuffer */
|
||||
|
||||
/* Check for non-standard framebuffer binding as we might not be using
|
||||
* the default framebuffer on systems like macOS where we've bound an
|
||||
* IOSurface to a GL_TEXTURE_RECTANGLE. Otherwise, no scissor clip will
|
||||
* be applied in the command queue causing overdrawing.
|
||||
*/
|
||||
self->framebuffer_id = GDK_GL_CONTEXT_GET_CLASS (context)->get_default_framebuffer (context);
|
||||
|
||||
return GSK_GPU_IMAGE (self);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ G_BEGIN_DECLS
|
||||
G_DECLARE_FINAL_TYPE (GskGLImage, gsk_gl_image, GSK, GL_IMAGE, GskGpuImage)
|
||||
|
||||
GskGpuImage * gsk_gl_image_new_backbuffer (GskGLDevice *device,
|
||||
GdkGLContext *context,
|
||||
GdkMemoryFormat format,
|
||||
gsize width,
|
||||
gsize height);
|
||||
|
||||
+197
-297
@@ -8,7 +8,6 @@
|
||||
|
||||
#include "gdk/gdkdisplayprivate.h"
|
||||
#include "gdk/gdktextureprivate.h"
|
||||
#include "gdk/gdkprofilerprivate.h"
|
||||
|
||||
#include "gsk/gskdebugprivate.h"
|
||||
|
||||
@@ -18,12 +17,13 @@
|
||||
|
||||
#define MAX_ATLAS_ITEM_SIZE 256
|
||||
|
||||
G_STATIC_ASSERT (MAX_ATLAS_ITEM_SIZE < ATLAS_SIZE);
|
||||
|
||||
#define MAX_DEAD_PIXELS (ATLAS_SIZE * ATLAS_SIZE / 2)
|
||||
|
||||
#define CACHE_TIMEOUT 15 /* seconds */
|
||||
#define CACHE_GC_TIMEOUT 1 /* seconds */
|
||||
|
||||
G_STATIC_ASSERT (MAX_ATLAS_ITEM_SIZE < ATLAS_SIZE);
|
||||
G_STATIC_ASSERT (MAX_DEAD_PIXELS < ATLAS_SIZE * ATLAS_SIZE);
|
||||
#define CACHE_MAX_AGE (G_TIME_SPAN_SECOND * 4) /* 4 seconds, in µs */
|
||||
|
||||
typedef struct _GskGpuCached GskGpuCached;
|
||||
typedef struct _GskGpuCachedClass GskGpuCachedClass;
|
||||
@@ -32,6 +32,15 @@ typedef struct _GskGpuCachedGlyph GskGpuCachedGlyph;
|
||||
typedef struct _GskGpuCachedTexture GskGpuCachedTexture;
|
||||
typedef struct _GskGpuDevicePrivate GskGpuDevicePrivate;
|
||||
|
||||
typedef struct _GlyphKey GlyphKey;
|
||||
struct _GlyphKey
|
||||
{
|
||||
PangoFont *font;
|
||||
PangoGlyph glyph;
|
||||
GskGpuGlyphLookupFlags flags;
|
||||
float scale;
|
||||
};
|
||||
|
||||
struct _GskGpuDevicePrivate
|
||||
{
|
||||
GdkDisplay *display;
|
||||
@@ -40,14 +49,16 @@ struct _GskGpuDevicePrivate
|
||||
GskGpuCached *first_cached;
|
||||
GskGpuCached *last_cached;
|
||||
guint cache_gc_source;
|
||||
int cache_timeout; /* in seconds, or -1 to disable gc */
|
||||
|
||||
GHashTable *texture_cache;
|
||||
GHashTable *glyph_cache;
|
||||
|
||||
GskGpuCachedAtlas *current_atlas;
|
||||
|
||||
/* atomic */ gsize dead_texture_pixels;
|
||||
struct {
|
||||
GlyphKey key;
|
||||
GskGpuCachedGlyph *value;
|
||||
} front[256];
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GskGpuDevice, gsk_gpu_device, G_TYPE_OBJECT)
|
||||
@@ -75,7 +86,7 @@ struct _GskGpuCached
|
||||
|
||||
gint64 timestamp;
|
||||
gboolean stale;
|
||||
guint pixels; /* For glyphs and textures, pixels. For atlases, dead pixels */
|
||||
guint pixels; /* For glyphs, pixels. For atlases, dead pixels */
|
||||
};
|
||||
|
||||
static inline void
|
||||
@@ -156,19 +167,6 @@ gsk_gpu_cached_use (GskGpuDevice *device,
|
||||
mark_as_stale (cached, FALSE);
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
gsk_gpu_cached_is_old (GskGpuDevice *device,
|
||||
GskGpuCached *cached,
|
||||
gint64 timestamp)
|
||||
{
|
||||
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (device);
|
||||
|
||||
if (priv->cache_timeout < 0)
|
||||
return FALSE;
|
||||
else
|
||||
return timestamp - cached->timestamp > priv->cache_timeout * G_TIME_SPAN_SECOND;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
/* {{{ CachedAtlas */
|
||||
|
||||
@@ -235,6 +233,91 @@ gsk_gpu_cached_atlas_new (GskGpuDevice *device)
|
||||
return self;
|
||||
}
|
||||
|
||||
/* This rounds up to the next number that has <= 2 bits set:
|
||||
* 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, ...
|
||||
* That is roughly sqrt(2), so it should limit waste
|
||||
*/
|
||||
static gsize
|
||||
round_up_atlas_size (gsize num)
|
||||
{
|
||||
gsize storage = g_bit_storage (num);
|
||||
|
||||
num = num + (((1 << storage) - 1) >> 2);
|
||||
num &= (((gsize) 7) << storage) >> 2;
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gsk_gpu_cached_atlas_allocate (GskGpuCachedAtlas *atlas,
|
||||
gsize width,
|
||||
gsize height,
|
||||
gsize *out_x,
|
||||
gsize *out_y)
|
||||
{
|
||||
gsize i;
|
||||
gsize waste, slice_waste;
|
||||
gsize best_slice;
|
||||
gsize y, best_y;
|
||||
gboolean can_add_slice;
|
||||
|
||||
best_y = 0;
|
||||
best_slice = G_MAXSIZE;
|
||||
can_add_slice = atlas->n_slices < MAX_SLICES_PER_ATLAS;
|
||||
if (can_add_slice)
|
||||
waste = height; /* Require less than 100% waste */
|
||||
else
|
||||
waste = G_MAXSIZE; /* Accept any slice, we can't make better ones */
|
||||
|
||||
for (i = 0, y = 0; i < atlas->n_slices; y += atlas->slices[i].height, i++)
|
||||
{
|
||||
if (atlas->slices[i].height < height || ATLAS_SIZE - atlas->slices[i].width < width)
|
||||
continue;
|
||||
|
||||
slice_waste = atlas->slices[i].height - height;
|
||||
if (slice_waste < waste)
|
||||
{
|
||||
waste = slice_waste;
|
||||
best_slice = i;
|
||||
best_y = y;
|
||||
if (waste == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (best_slice >= i && i == atlas->n_slices)
|
||||
{
|
||||
if (!can_add_slice)
|
||||
return FALSE;
|
||||
|
||||
if (y + height > ATLAS_SIZE)
|
||||
return FALSE;
|
||||
|
||||
atlas->n_slices++;
|
||||
if (atlas->n_slices == MAX_SLICES_PER_ATLAS)
|
||||
atlas->slices[i].height = ATLAS_SIZE - y;
|
||||
else
|
||||
atlas->slices[i].height = MIN (round_up_atlas_size (MAX (height, 4)), ATLAS_SIZE - y);
|
||||
|
||||
atlas->slices[i].width = 0;
|
||||
best_y = y;
|
||||
best_slice = i;
|
||||
}
|
||||
|
||||
g_assert (best_slice < MAX_SLICES_PER_ATLAS);
|
||||
|
||||
*out_x = atlas->slices[best_slice].width;
|
||||
*out_y = best_y;
|
||||
|
||||
atlas->slices[best_slice].width += width;
|
||||
|
||||
g_assert (atlas->slices[best_slice].height >= height);
|
||||
g_assert (atlas->slices[best_slice].width <= ATLAS_SIZE);
|
||||
g_assert (best_y + atlas->slices[best_slice].height <= ATLAS_SIZE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
/* {{{ CachedTexture */
|
||||
|
||||
@@ -242,14 +325,7 @@ struct _GskGpuCachedTexture
|
||||
{
|
||||
GskGpuCached parent;
|
||||
|
||||
/* atomic */ int use_count; /* We count the use by the device (via the linked
|
||||
* list) and by the texture (via render data or
|
||||
* weak ref.
|
||||
*/
|
||||
|
||||
gsize *dead_pixels_counter;
|
||||
|
||||
GdkTexture *texture;
|
||||
/* atomic */ GdkTexture *texture;
|
||||
GskGpuImage *image;
|
||||
};
|
||||
|
||||
@@ -257,37 +333,14 @@ static void
|
||||
gsk_gpu_cached_texture_free (GskGpuDevice *device,
|
||||
GskGpuCached *cached)
|
||||
{
|
||||
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (device);
|
||||
GskGpuCachedTexture *self = (GskGpuCachedTexture *) cached;
|
||||
gpointer key, value;
|
||||
gboolean texture_still_alive;
|
||||
|
||||
texture_still_alive = g_atomic_pointer_exchange (&self->texture, NULL) != NULL;
|
||||
g_clear_object (&self->image);
|
||||
|
||||
if (g_hash_table_steal_extended (priv->texture_cache, self->texture, &key, &value))
|
||||
{
|
||||
/* If the texture has been reused already, we put the entry back */
|
||||
if ((GskGpuCached *) value != cached)
|
||||
g_hash_table_insert (priv->texture_cache, key, value);
|
||||
}
|
||||
|
||||
/* If the cached item itself is still in use by the texture, we leave
|
||||
* it to the weak ref or render data to free it.
|
||||
*/
|
||||
if (g_atomic_int_dec_and_test (&self->use_count))
|
||||
{
|
||||
g_free (self);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
gsk_gpu_cached_texture_is_invalid (GskGpuCachedTexture *self)
|
||||
{
|
||||
/* If the use count is less than 2, the orignal texture has died,
|
||||
* and the memory may have been reused for a new texture, so we
|
||||
* can't hand out the image that is for the original texture.
|
||||
*/
|
||||
return g_atomic_int_get (&self->use_count) < 2;
|
||||
if (!texture_still_alive)
|
||||
g_free (self);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -295,10 +348,7 @@ gsk_gpu_cached_texture_should_collect (GskGpuDevice *device,
|
||||
GskGpuCached *cached,
|
||||
gint64 timestamp)
|
||||
{
|
||||
GskGpuCachedTexture *self = (GskGpuCachedTexture *) cached;
|
||||
|
||||
return gsk_gpu_cached_is_old (device, cached, timestamp) ||
|
||||
gsk_gpu_cached_texture_is_invalid (self);
|
||||
return timestamp - cached->timestamp > CACHE_MAX_AGE;
|
||||
}
|
||||
|
||||
static const GskGpuCachedClass GSK_GPU_CACHED_TEXTURE_CLASS =
|
||||
@@ -308,19 +358,16 @@ static const GskGpuCachedClass GSK_GPU_CACHED_TEXTURE_CLASS =
|
||||
gsk_gpu_cached_texture_should_collect
|
||||
};
|
||||
|
||||
/* Note: this function can run in an arbitrary thread, so it can
|
||||
* only access things atomically
|
||||
*/
|
||||
static void
|
||||
gsk_gpu_cached_texture_destroy_cb (gpointer data)
|
||||
{
|
||||
GskGpuCachedTexture *self = data;
|
||||
GskGpuCachedTexture *cache = data;
|
||||
gboolean cache_still_alive;
|
||||
|
||||
if (!gsk_gpu_cached_texture_is_invalid (self))
|
||||
g_atomic_pointer_add (self->dead_pixels_counter, ((GskGpuCached *) self)->pixels);
|
||||
cache_still_alive = g_atomic_pointer_exchange (&cache->texture, NULL) != NULL;
|
||||
|
||||
if (g_atomic_int_dec_and_test (&self->use_count))
|
||||
g_free (self);
|
||||
if (!cache_still_alive)
|
||||
g_free (cache);
|
||||
}
|
||||
|
||||
static GskGpuCachedTexture *
|
||||
@@ -334,19 +381,18 @@ gsk_gpu_cached_texture_new (GskGpuDevice *device,
|
||||
if (gdk_texture_get_render_data (texture, device))
|
||||
gdk_texture_clear_render_data (texture);
|
||||
else if ((self = g_hash_table_lookup (priv->texture_cache, texture)))
|
||||
g_hash_table_remove (priv->texture_cache, texture);
|
||||
{
|
||||
g_hash_table_remove (priv->texture_cache, texture);
|
||||
g_object_weak_unref (G_OBJECT (texture), (GWeakNotify) gsk_gpu_cached_texture_destroy_cb, self);
|
||||
}
|
||||
|
||||
self = gsk_gpu_cached_new (device, &GSK_GPU_CACHED_TEXTURE_CLASS, NULL);
|
||||
self->texture = texture;
|
||||
self->image = g_object_ref (image);
|
||||
((GskGpuCached *)self)->pixels = gsk_gpu_image_get_width (image) * gsk_gpu_image_get_height (image);
|
||||
self->dead_pixels_counter = &priv->dead_texture_pixels;
|
||||
self->use_count = 2;
|
||||
|
||||
if (!gdk_texture_set_render_data (texture, device, self, gsk_gpu_cached_texture_destroy_cb))
|
||||
{
|
||||
g_object_weak_ref (G_OBJECT (texture), (GWeakNotify) gsk_gpu_cached_texture_destroy_cb, self);
|
||||
|
||||
g_hash_table_insert (priv->texture_cache, texture, self);
|
||||
}
|
||||
|
||||
@@ -360,10 +406,7 @@ struct _GskGpuCachedGlyph
|
||||
{
|
||||
GskGpuCached parent;
|
||||
|
||||
PangoFont *font;
|
||||
PangoGlyph glyph;
|
||||
GskGpuGlyphLookupFlags flags;
|
||||
float scale;
|
||||
GlyphKey key;
|
||||
|
||||
GskGpuImage *image;
|
||||
graphene_rect_t bounds;
|
||||
@@ -379,7 +422,7 @@ gsk_gpu_cached_glyph_free (GskGpuDevice *device,
|
||||
|
||||
g_hash_table_remove (priv->glyph_cache, self);
|
||||
|
||||
g_object_unref (self->font);
|
||||
g_object_unref (self->key.font);
|
||||
g_object_unref (self->image);
|
||||
|
||||
g_free (self);
|
||||
@@ -390,13 +433,8 @@ gsk_gpu_cached_glyph_should_collect (GskGpuDevice *device,
|
||||
GskGpuCached *cached,
|
||||
gint64 timestamp)
|
||||
{
|
||||
if (gsk_gpu_cached_is_old (device, cached, timestamp))
|
||||
{
|
||||
if (cached->atlas)
|
||||
mark_as_stale (cached, TRUE);
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
if (timestamp - cached->timestamp > CACHE_MAX_AGE)
|
||||
mark_as_stale (cached, TRUE);
|
||||
|
||||
/* Glyphs are only collected when their atlas is freed */
|
||||
return FALSE;
|
||||
@@ -407,10 +445,10 @@ gsk_gpu_cached_glyph_hash (gconstpointer data)
|
||||
{
|
||||
const GskGpuCachedGlyph *glyph = data;
|
||||
|
||||
return GPOINTER_TO_UINT (glyph->font) ^
|
||||
glyph->glyph ^
|
||||
(glyph->flags << 24) ^
|
||||
((guint) glyph->scale * PANGO_SCALE);
|
||||
return GPOINTER_TO_UINT (glyph->key.font) ^
|
||||
glyph->key.glyph ^
|
||||
(glyph->key.flags << 24) ^
|
||||
((guint) glyph->key.scale * PANGO_SCALE);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -420,10 +458,10 @@ gsk_gpu_cached_glyph_equal (gconstpointer v1,
|
||||
const GskGpuCachedGlyph *glyph1 = v1;
|
||||
const GskGpuCachedGlyph *glyph2 = v2;
|
||||
|
||||
return glyph1->font == glyph2->font
|
||||
&& glyph1->glyph == glyph2->glyph
|
||||
&& glyph1->flags == glyph2->flags
|
||||
&& glyph1->scale == glyph2->scale;
|
||||
return glyph1->key.font == glyph2->key.font
|
||||
&& glyph1->key.glyph == glyph2->key.glyph
|
||||
&& glyph1->key.flags == glyph2->key.flags
|
||||
&& glyph1->key.scale == glyph2->key.scale;
|
||||
}
|
||||
|
||||
static const GskGpuCachedClass GSK_GPU_CACHED_GLYPH_CLASS =
|
||||
@@ -456,9 +494,7 @@ print_cache_stats (GskGpuDevice *self)
|
||||
stale_glyphs++;
|
||||
}
|
||||
else if (cached->class == &GSK_GPU_CACHED_TEXTURE_CLASS)
|
||||
{
|
||||
textures++;
|
||||
}
|
||||
textures++;
|
||||
else if (cached->class == &GSK_GPU_CACHED_ATLAS_CLASS)
|
||||
{
|
||||
double ratio;
|
||||
@@ -478,29 +514,24 @@ print_cache_stats (GskGpuDevice *self)
|
||||
if (ratios->len > 0)
|
||||
g_string_append (ratios, ")");
|
||||
|
||||
gdk_debug_message ("Cached items\n"
|
||||
gdk_debug_message ("cached items\n"
|
||||
" glyphs: %5u (%u stale)\n"
|
||||
" textures: %5u (%u in hash)\n"
|
||||
" textures: %5u\n"
|
||||
" atlases: %5u%s",
|
||||
glyphs, stale_glyphs,
|
||||
textures, g_hash_table_size (priv->texture_cache),
|
||||
atlases, ratios->str);
|
||||
glyphs, stale_glyphs, textures, atlases, ratios->str);
|
||||
|
||||
g_string_free (ratios, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
gsk_gpu_device_gc (GskGpuDevice *self,
|
||||
gint64 timestamp)
|
||||
{
|
||||
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (self);
|
||||
GskGpuCached *cached, *prev;
|
||||
gint64 before G_GNUC_UNUSED = GDK_PROFILER_CURRENT_TIME;
|
||||
|
||||
gsk_gpu_device_make_current (self);
|
||||
|
||||
/* We walk the cache from the end so we don't end up with prev
|
||||
* being a leftover glyph on the atlas we are freeing
|
||||
* begin a leftover glyph on the atlas we are freeing
|
||||
*/
|
||||
for (cached = priv->last_cached; cached != NULL; cached = prev)
|
||||
{
|
||||
@@ -509,54 +540,8 @@ gsk_gpu_device_gc (GskGpuDevice *self,
|
||||
gsk_gpu_cached_free (self, cached);
|
||||
}
|
||||
|
||||
g_atomic_pointer_set (&priv->dead_texture_pixels, 0);
|
||||
|
||||
if (GSK_DEBUG_CHECK (GLYPH_CACHE))
|
||||
print_cache_stats (self);
|
||||
|
||||
gdk_profiler_end_mark (before, "Glyph cache GC", NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
cache_gc_cb (gpointer data)
|
||||
{
|
||||
GskGpuDevice *self = data;
|
||||
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (self);
|
||||
|
||||
GSK_DEBUG (GLYPH_CACHE, "Periodic GC");
|
||||
|
||||
gsk_gpu_device_gc (self, g_get_monotonic_time ());
|
||||
|
||||
priv->cache_gc_source = 0;
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
void
|
||||
gsk_gpu_device_maybe_gc (GskGpuDevice *self)
|
||||
{
|
||||
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (self);
|
||||
gsize dead_texture_pixels;
|
||||
|
||||
if (priv->cache_timeout < 0)
|
||||
return;
|
||||
|
||||
dead_texture_pixels = GPOINTER_TO_SIZE (g_atomic_pointer_get (&priv->dead_texture_pixels));
|
||||
|
||||
if (priv->cache_timeout == 0 || dead_texture_pixels > 1000000)
|
||||
{
|
||||
GSK_DEBUG (GLYPH_CACHE, "Pre-frame GC (%lu dead pixels)", dead_texture_pixels);
|
||||
gsk_gpu_device_gc (self, g_get_monotonic_time ());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gsk_gpu_device_queue_gc (GskGpuDevice *self)
|
||||
{
|
||||
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (self);
|
||||
|
||||
if (priv->cache_timeout > 0 && !priv->cache_gc_source)
|
||||
priv->cache_gc_source = g_timeout_add_seconds (priv->cache_timeout, cache_gc_cb, self);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -628,44 +613,27 @@ gsk_gpu_device_init (GskGpuDevice *self)
|
||||
g_direct_equal);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
cache_gc_source_callback (gpointer data)
|
||||
{
|
||||
GskGpuDevice *self = data;
|
||||
|
||||
gsk_gpu_device_gc (self, g_get_monotonic_time ());
|
||||
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
void
|
||||
gsk_gpu_device_setup (GskGpuDevice *self,
|
||||
GdkDisplay *display,
|
||||
gsize max_image_size)
|
||||
{
|
||||
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (self);
|
||||
const char *str;
|
||||
|
||||
priv->display = g_object_ref (display);
|
||||
priv->max_image_size = max_image_size;
|
||||
priv->cache_timeout = CACHE_TIMEOUT;
|
||||
|
||||
str = g_getenv ("GSK_CACHE_TIMEOUT");
|
||||
if (str != NULL)
|
||||
{
|
||||
gint64 value;
|
||||
GError *error = NULL;
|
||||
|
||||
if (!g_ascii_string_to_signed (str, 10, -1, G_MAXINT, &value, &error))
|
||||
{
|
||||
g_warning ("Failed to parse GSK_CACHE_TIMEOUT: %s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->cache_timeout = (int) value;
|
||||
}
|
||||
}
|
||||
|
||||
if (GSK_DEBUG_CHECK (GLYPH_CACHE))
|
||||
{
|
||||
if (priv->cache_timeout < 0)
|
||||
gdk_debug_message ("Cache GC disabled");
|
||||
else if (priv->cache_timeout == 0)
|
||||
gdk_debug_message ("Cache GC before every frame");
|
||||
else
|
||||
gdk_debug_message ("Cache GC timeout: %d seconds", priv->cache_timeout);
|
||||
}
|
||||
priv->cache_gc_source = g_timeout_add_seconds (CACHE_GC_TIMEOUT, cache_gc_source_callback, self);
|
||||
}
|
||||
|
||||
GdkDisplay *
|
||||
@@ -704,12 +672,6 @@ gsk_gpu_device_create_upload_image (GskGpuDevice *self,
|
||||
return GSK_GPU_DEVICE_GET_CLASS (self)->create_upload_image (self, with_mipmap, format, width, height);
|
||||
}
|
||||
|
||||
void
|
||||
gsk_gpu_device_make_current (GskGpuDevice *self)
|
||||
{
|
||||
GSK_GPU_DEVICE_GET_CLASS (self)->make_current (self);
|
||||
}
|
||||
|
||||
GskGpuImage *
|
||||
gsk_gpu_device_create_download_image (GskGpuDevice *self,
|
||||
GdkMemoryDepth depth,
|
||||
@@ -719,91 +681,10 @@ gsk_gpu_device_create_download_image (GskGpuDevice *self,
|
||||
return GSK_GPU_DEVICE_GET_CLASS (self)->create_download_image (self, depth, width, height);
|
||||
}
|
||||
|
||||
/* This rounds up to the next number that has <= 2 bits set:
|
||||
* 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, ...
|
||||
* That is roughly sqrt(2), so it should limit waste
|
||||
*/
|
||||
static gsize
|
||||
round_up_atlas_size (gsize num)
|
||||
{
|
||||
gsize storage = g_bit_storage (num);
|
||||
|
||||
num = num + (((1 << storage) - 1) >> 2);
|
||||
num &= (((gsize) 7) << storage) >> 2;
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gsk_gpu_cached_atlas_allocate (GskGpuCachedAtlas *atlas,
|
||||
gsize width,
|
||||
gsize height,
|
||||
gsize *out_x,
|
||||
gsize *out_y)
|
||||
{
|
||||
gsize i;
|
||||
gsize waste, slice_waste;
|
||||
gsize best_slice;
|
||||
gsize y, best_y;
|
||||
gboolean can_add_slice;
|
||||
|
||||
best_y = 0;
|
||||
best_slice = G_MAXSIZE;
|
||||
can_add_slice = atlas->n_slices < MAX_SLICES_PER_ATLAS;
|
||||
if (can_add_slice)
|
||||
waste = height; /* Require less than 100% waste */
|
||||
else
|
||||
waste = G_MAXSIZE; /* Accept any slice, we can't make better ones */
|
||||
|
||||
for (i = 0, y = 0; i < atlas->n_slices; y += atlas->slices[i].height, i++)
|
||||
{
|
||||
if (atlas->slices[i].height < height || ATLAS_SIZE - atlas->slices[i].width < width)
|
||||
continue;
|
||||
|
||||
slice_waste = atlas->slices[i].height - height;
|
||||
if (slice_waste < waste)
|
||||
{
|
||||
waste = slice_waste;
|
||||
best_slice = i;
|
||||
best_y = y;
|
||||
if (waste == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (best_slice >= i && i == atlas->n_slices)
|
||||
{
|
||||
gsize slice_height;
|
||||
|
||||
if (!can_add_slice)
|
||||
return FALSE;
|
||||
|
||||
slice_height = round_up_atlas_size (MAX (height, 4));
|
||||
if (slice_height > ATLAS_SIZE - y)
|
||||
return FALSE;
|
||||
|
||||
atlas->n_slices++;
|
||||
if (atlas->n_slices == MAX_SLICES_PER_ATLAS)
|
||||
slice_height = ATLAS_SIZE - y;
|
||||
|
||||
atlas->slices[i].width = 0;
|
||||
atlas->slices[i].height = slice_height;
|
||||
best_y = y;
|
||||
best_slice = i;
|
||||
}
|
||||
|
||||
*out_x = atlas->slices[best_slice].width;
|
||||
*out_y = best_y;
|
||||
|
||||
atlas->slices[best_slice].width += width;
|
||||
g_assert (atlas->slices[best_slice].width <= ATLAS_SIZE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gpu_device_ensure_atlas (GskGpuDevice *self,
|
||||
gboolean recreate)
|
||||
gboolean recreate,
|
||||
gint64 timestamp)
|
||||
{
|
||||
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (self);
|
||||
|
||||
@@ -818,13 +699,14 @@ gsk_gpu_device_get_atlas_image (GskGpuDevice *self)
|
||||
{
|
||||
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (self);
|
||||
|
||||
gsk_gpu_device_ensure_atlas (self, FALSE);
|
||||
gsk_gpu_device_ensure_atlas (self, FALSE, g_get_monotonic_time ());
|
||||
|
||||
return priv->current_atlas->image;
|
||||
}
|
||||
|
||||
static GskGpuImage *
|
||||
gsk_gpu_device_add_atlas_image (GskGpuDevice *self,
|
||||
gint64 timestamp,
|
||||
gsize width,
|
||||
gsize height,
|
||||
gsize *out_x,
|
||||
@@ -835,12 +717,12 @@ gsk_gpu_device_add_atlas_image (GskGpuDevice *self,
|
||||
if (width > MAX_ATLAS_ITEM_SIZE || height > MAX_ATLAS_ITEM_SIZE)
|
||||
return NULL;
|
||||
|
||||
gsk_gpu_device_ensure_atlas (self, FALSE);
|
||||
gsk_gpu_device_ensure_atlas (self, FALSE, timestamp);
|
||||
|
||||
if (gsk_gpu_cached_atlas_allocate (priv->current_atlas, width, height, out_x, out_y))
|
||||
return priv->current_atlas->image;
|
||||
|
||||
gsk_gpu_device_ensure_atlas (self, TRUE);
|
||||
gsk_gpu_device_ensure_atlas (self, TRUE, timestamp);
|
||||
|
||||
if (gsk_gpu_cached_atlas_allocate (priv->current_atlas, width, height, out_x, out_y))
|
||||
return priv->current_atlas->image;
|
||||
@@ -860,12 +742,10 @@ gsk_gpu_device_lookup_texture_image (GskGpuDevice *self,
|
||||
if (cache == NULL)
|
||||
cache = g_hash_table_lookup (priv->texture_cache, texture);
|
||||
|
||||
if (!cache || !cache->image || gsk_gpu_cached_texture_is_invalid (cache))
|
||||
return NULL;
|
||||
if (cache && cache->image)
|
||||
return g_object_ref (cache->image);
|
||||
|
||||
gsk_gpu_cached_use (self, (GskGpuCached *) cache, timestamp);
|
||||
|
||||
return g_object_ref (cache->image);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -893,10 +773,10 @@ gsk_gpu_device_lookup_glyph_image (GskGpuDevice *self,
|
||||
{
|
||||
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (self);
|
||||
GskGpuCachedGlyph lookup = {
|
||||
.font = font,
|
||||
.glyph = glyph,
|
||||
.flags = flags,
|
||||
.scale = scale
|
||||
.key.font = font,
|
||||
.key.glyph = glyph,
|
||||
.key.flags = flags,
|
||||
.key.scale = scale
|
||||
};
|
||||
GskGpuCachedGlyph *cache;
|
||||
PangoRectangle ink_rect;
|
||||
@@ -904,28 +784,44 @@ gsk_gpu_device_lookup_glyph_image (GskGpuDevice *self,
|
||||
graphene_point_t origin;
|
||||
GskGpuImage *image;
|
||||
gsize atlas_x, atlas_y, padding;
|
||||
float subpixel_x, subpixel_y;
|
||||
guint64 timestamp = gsk_gpu_frame_get_timestamp (frame);
|
||||
guint front_index = glyph & 0xFF;
|
||||
|
||||
if (memcmp (&lookup.key, &priv->front[front_index], sizeof (GlyphKey)) == 0)
|
||||
{
|
||||
cache = priv->front[front_index].value;
|
||||
|
||||
gsk_gpu_cached_use (self, (GskGpuCached *) cache, timestamp);
|
||||
|
||||
*out_bounds = cache->bounds;
|
||||
*out_origin = cache->origin;
|
||||
|
||||
return cache->image;
|
||||
}
|
||||
|
||||
cache = g_hash_table_lookup (priv->glyph_cache, &lookup);
|
||||
if (cache)
|
||||
{
|
||||
gsk_gpu_cached_use (self, (GskGpuCached *) cache, gsk_gpu_frame_get_timestamp (frame));
|
||||
memcpy (&priv->front[front_index].key, &lookup.key, sizeof (GlyphKey));
|
||||
priv->front[front_index].value = cache;
|
||||
|
||||
gsk_gpu_cached_use (self, (GskGpuCached *) cache, timestamp);
|
||||
|
||||
*out_bounds = cache->bounds;
|
||||
*out_origin = cache->origin;
|
||||
|
||||
return cache->image;
|
||||
}
|
||||
|
||||
subpixel_x = (flags & 3) / 4.f;
|
||||
subpixel_y = ((flags >> 2) & 3) / 4.f;
|
||||
pango_font_get_glyph_extents (font, glyph, &ink_rect, NULL);
|
||||
origin.x = floor (ink_rect.x * scale / PANGO_SCALE + subpixel_x);
|
||||
origin.y = floor (ink_rect.y * scale / PANGO_SCALE + subpixel_y);
|
||||
rect.size.width = ceil ((ink_rect.x + ink_rect.width) * scale / PANGO_SCALE + subpixel_x) - origin.x;
|
||||
rect.size.height = ceil ((ink_rect.y + ink_rect.height) * scale / PANGO_SCALE + subpixel_y) - origin.y;
|
||||
origin.x = floor (ink_rect.x * scale / PANGO_SCALE);
|
||||
origin.y = floor (ink_rect.y * scale / PANGO_SCALE);
|
||||
rect.size.width = ceil ((ink_rect.x + ink_rect.width) * scale / PANGO_SCALE) - origin.x;
|
||||
rect.size.height = ceil ((ink_rect.y + ink_rect.height) * scale / PANGO_SCALE) - origin.y;
|
||||
padding = 1;
|
||||
|
||||
image = gsk_gpu_device_add_atlas_image (self,
|
||||
timestamp,
|
||||
rect.size.width + 2 * padding, rect.size.height + 2 * padding,
|
||||
&atlas_x, &atlas_y);
|
||||
if (image)
|
||||
@@ -944,15 +840,15 @@ gsk_gpu_device_lookup_glyph_image (GskGpuDevice *self,
|
||||
cache = gsk_gpu_cached_new (self, &GSK_GPU_CACHED_GLYPH_CLASS, NULL);
|
||||
}
|
||||
|
||||
cache->font = g_object_ref (font);
|
||||
cache->glyph = glyph;
|
||||
cache->flags = flags;
|
||||
cache->scale = scale;
|
||||
cache->bounds = rect;
|
||||
cache->image = image;
|
||||
cache->origin = GRAPHENE_POINT_INIT (- origin.x + subpixel_x,
|
||||
- origin.y + subpixel_y);
|
||||
cache->key.font = g_object_ref (font),
|
||||
cache->key.glyph = glyph,
|
||||
cache->key.flags = flags,
|
||||
cache->key.scale = scale,
|
||||
cache->bounds = rect,
|
||||
cache->image = image,
|
||||
((GskGpuCached *) cache)->pixels = (rect.size.width + 2 * padding) * (rect.size.height + 2 * padding);
|
||||
cache->origin = GRAPHENE_POINT_INIT (- origin.x + (flags & 3) / 4.f,
|
||||
- origin.y + ((flags >> 2) & 3) / 4.f);
|
||||
|
||||
gsk_gpu_upload_glyph_op (frame,
|
||||
cache->image,
|
||||
@@ -969,10 +865,14 @@ gsk_gpu_device_lookup_glyph_image (GskGpuDevice *self,
|
||||
cache->origin.y + padding));
|
||||
|
||||
g_hash_table_insert (priv->glyph_cache, cache, cache);
|
||||
gsk_gpu_cached_use (self, (GskGpuCached *) cache, gsk_gpu_frame_get_timestamp (frame));
|
||||
gsk_gpu_cached_use (self, (GskGpuCached *) cache, timestamp);
|
||||
|
||||
memcpy (&priv->front[front_index].key, &lookup.key, sizeof (GlyphKey));
|
||||
priv->front[front_index].value = cache;
|
||||
|
||||
*out_bounds = cache->bounds;
|
||||
*out_origin = cache->origin;
|
||||
|
||||
return cache->image;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,6 @@ struct _GskGpuDeviceClass
|
||||
GdkMemoryDepth depth,
|
||||
gsize width,
|
||||
gsize height);
|
||||
void (* make_current) (GskGpuDevice *self);
|
||||
|
||||
};
|
||||
|
||||
GType gsk_gpu_device_get_type (void) G_GNUC_CONST;
|
||||
@@ -50,8 +48,9 @@ GType gsk_gpu_device_get_type (void) G
|
||||
void gsk_gpu_device_setup (GskGpuDevice *self,
|
||||
GdkDisplay *display,
|
||||
gsize max_image_size);
|
||||
void gsk_gpu_device_maybe_gc (GskGpuDevice *self);
|
||||
void gsk_gpu_device_queue_gc (GskGpuDevice *self);
|
||||
void gsk_gpu_device_gc (GskGpuDevice *self,
|
||||
gint64 timestamp);
|
||||
|
||||
GdkDisplay * gsk_gpu_device_get_display (GskGpuDevice *self);
|
||||
gsize gsk_gpu_device_get_max_image_size (GskGpuDevice *self);
|
||||
GskGpuImage * gsk_gpu_device_get_atlas_image (GskGpuDevice *self);
|
||||
@@ -70,7 +69,7 @@ GskGpuImage * gsk_gpu_device_create_download_image (GskGpuD
|
||||
GdkMemoryDepth depth,
|
||||
gsize width,
|
||||
gsize height);
|
||||
void gsk_gpu_device_make_current (GskGpuDevice *self);
|
||||
|
||||
GskGpuImage * gsk_gpu_device_lookup_texture_image (GskGpuDevice *self,
|
||||
GdkTexture *texture,
|
||||
gint64 timestamp);
|
||||
|
||||
@@ -220,7 +220,7 @@ gsk_gpu_frame_seal_ops (GskGpuFrame *self)
|
||||
{
|
||||
GskGpuFramePrivate *priv = gsk_gpu_frame_get_instance_private (self);
|
||||
GskGpuOp *last, *op;
|
||||
gsize i;
|
||||
guint i;
|
||||
|
||||
priv->first_op = (GskGpuOp *) gsk_gpu_ops_index (&priv->ops, 0);
|
||||
|
||||
|
||||
@@ -322,8 +322,8 @@ rect_round_to_pixels (const graphene_rect_t *src,
|
||||
*dest = GRAPHENE_RECT_INIT (
|
||||
x * inv_xscale - pixel_offset->x,
|
||||
y * inv_yscale - pixel_offset->y,
|
||||
(ceilf ((src->origin.x + pixel_offset->x + src->size.width) * xscale) - x) * inv_xscale,
|
||||
(ceilf ((src->origin.y + pixel_offset->y + src->size.height) * yscale) - y) * inv_yscale);
|
||||
(ceil ((src->origin.x + pixel_offset->x + src->size.width) * xscale) - x) * inv_xscale,
|
||||
(ceil ((src->origin.y + pixel_offset->y + src->size.height) * yscale) - y) * inv_yscale);
|
||||
}
|
||||
|
||||
static GskGpuImage *
|
||||
@@ -338,8 +338,8 @@ gsk_gpu_node_processor_init_draw (GskGpuNodeProcessor *self,
|
||||
|
||||
area.x = 0;
|
||||
area.y = 0;
|
||||
area.width = ceilf (graphene_vec2_get_x (scale) * viewport->size.width);
|
||||
area.height = ceilf (graphene_vec2_get_y (scale) * viewport->size.height);
|
||||
area.width = ceil (graphene_vec2_get_x (scale) * viewport->size.width);
|
||||
area.height = ceil (graphene_vec2_get_y (scale) * viewport->size.height);
|
||||
|
||||
image = gsk_gpu_device_create_offscreen_image (gsk_gpu_frame_get_device (frame),
|
||||
FALSE,
|
||||
@@ -994,8 +994,8 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self,
|
||||
if (!gsk_rect_intersection (rect, &clip_rect, &intermediate_rect))
|
||||
return;
|
||||
|
||||
width = ceilf (graphene_vec2_get_x (&self->scale) * intermediate_rect.size.width);
|
||||
height = ceilf (graphene_vec2_get_y (&self->scale) * intermediate_rect.size.height);
|
||||
width = ceil (graphene_vec2_get_x (&self->scale) * intermediate_rect.size.width);
|
||||
height = ceil (graphene_vec2_get_y (&self->scale) * intermediate_rect.size.height);
|
||||
|
||||
intermediate = gsk_gpu_device_create_offscreen_image (gsk_gpu_frame_get_device (self->frame),
|
||||
FALSE,
|
||||
@@ -1814,10 +1814,10 @@ gsk_gpu_node_processor_add_color_node (GskGpuNodeProcessor *self,
|
||||
if (shader_clip != GSK_GPU_SHADER_CLIP_NONE)
|
||||
{
|
||||
gsk_rounded_rect_get_largest_cover (&self->clip.rect, &clipped, &cover);
|
||||
int_clipped.x = ceilf (cover.origin.x * scale_x);
|
||||
int_clipped.y = ceilf (cover.origin.y * scale_y);
|
||||
int_clipped.width = floorf ((cover.origin.x + cover.size.width) * scale_x) - int_clipped.x;
|
||||
int_clipped.height = floorf ((cover.origin.y + cover.size.height) * scale_y) - int_clipped.y;
|
||||
int_clipped.x = ceil (cover.origin.x * scale_x);
|
||||
int_clipped.y = ceil (cover.origin.y * scale_y);
|
||||
int_clipped.width = floor ((cover.origin.x + cover.size.width) * scale_x) - int_clipped.x;
|
||||
int_clipped.height = floor ((cover.origin.y + cover.size.height) * scale_y) - int_clipped.y;
|
||||
if (int_clipped.width == 0 || int_clipped.height == 0)
|
||||
{
|
||||
gsk_gpu_color_op (self->frame,
|
||||
@@ -2978,7 +2978,6 @@ gsk_gpu_node_processor_add_glyph_node (GskGpuNodeProcessor *self,
|
||||
guint i, num_glyphs;
|
||||
float scale, inv_scale;
|
||||
GdkRGBA color;
|
||||
gboolean glyph_align;
|
||||
|
||||
if (self->opacity < 1.0 &&
|
||||
gsk_text_node_has_color_glyphs (node))
|
||||
@@ -2987,8 +2986,6 @@ gsk_gpu_node_processor_add_glyph_node (GskGpuNodeProcessor *self,
|
||||
return;
|
||||
}
|
||||
|
||||
glyph_align = gsk_gpu_frame_should_optimize (self->frame, GSK_GPU_OPTIMIZE_GLYPH_ALIGN) &&
|
||||
gsk_transform_get_category (self->modelview) >= GSK_TRANSFORM_CATEGORY_2D;
|
||||
device = gsk_gpu_frame_get_device (self->frame);
|
||||
color = *gsk_text_node_get_color (node);
|
||||
color.alpha *= self->opacity;
|
||||
@@ -3006,39 +3003,22 @@ gsk_gpu_node_processor_add_glyph_node (GskGpuNodeProcessor *self,
|
||||
{
|
||||
GskGpuImage *image;
|
||||
graphene_rect_t glyph_bounds, glyph_tex_rect;
|
||||
graphene_point_t glyph_offset, glyph_origin;
|
||||
graphene_point_t glyph_offset;
|
||||
guint32 descriptor;
|
||||
GskGpuGlyphLookupFlags flags;
|
||||
|
||||
glyph_origin = GRAPHENE_POINT_INIT (offset.x + (float) glyphs[i].geometry.x_offset / PANGO_SCALE,
|
||||
offset.y + (float) glyphs[i].geometry.y_offset / PANGO_SCALE);
|
||||
if (glyph_align)
|
||||
{
|
||||
glyph_origin.x = roundf (glyph_origin.x * scale * 4);
|
||||
glyph_origin.y = roundf (glyph_origin.y * scale * 4);
|
||||
flags = ((int) glyph_origin.x & 3) |
|
||||
(((int) glyph_origin.y & 3) << 2);
|
||||
glyph_origin.x = 0.25 * inv_scale * glyph_origin.x;
|
||||
glyph_origin.y = 0.25 * inv_scale * glyph_origin.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
flags = 0;
|
||||
}
|
||||
|
||||
image = gsk_gpu_device_lookup_glyph_image (device,
|
||||
self->frame,
|
||||
font,
|
||||
glyphs[i].glyph,
|
||||
flags,
|
||||
0,
|
||||
scale,
|
||||
&glyph_bounds,
|
||||
&glyph_offset);
|
||||
|
||||
gsk_rect_scale (&GRAPHENE_RECT_INIT (-glyph_bounds.origin.x, -glyph_bounds.origin.y, gsk_gpu_image_get_width (image), gsk_gpu_image_get_height (image)), inv_scale, inv_scale, &glyph_tex_rect);
|
||||
gsk_rect_scale (&GRAPHENE_RECT_INIT(0, 0, glyph_bounds.size.width, glyph_bounds.size.height), inv_scale, inv_scale, &glyph_bounds);
|
||||
glyph_origin = GRAPHENE_POINT_INIT (glyph_origin.x - glyph_offset.x * inv_scale,
|
||||
glyph_origin.y - glyph_offset.y * inv_scale);
|
||||
graphene_rect_scale (&GRAPHENE_RECT_INIT (-glyph_bounds.origin.x, -glyph_bounds.origin.y, gsk_gpu_image_get_width (image), gsk_gpu_image_get_height (image)), inv_scale, inv_scale, &glyph_tex_rect);
|
||||
graphene_rect_scale (&GRAPHENE_RECT_INIT(0, 0, glyph_bounds.size.width, glyph_bounds.size.height), inv_scale, inv_scale, &glyph_bounds);
|
||||
glyph_offset = GRAPHENE_POINT_INIT (offset.x - glyph_offset.x * inv_scale + (float) glyphs[i].geometry.x_offset / PANGO_SCALE,
|
||||
offset.y - glyph_offset.y * inv_scale + (float) glyphs[i].geometry.y_offset / PANGO_SCALE);
|
||||
descriptor = gsk_gpu_node_processor_add_image (self, image, GSK_GPU_SAMPLER_DEFAULT);
|
||||
if (glyphs[i].attr.is_color)
|
||||
gsk_gpu_texture_op (self->frame,
|
||||
@@ -3046,7 +3026,7 @@ gsk_gpu_node_processor_add_glyph_node (GskGpuNodeProcessor *self,
|
||||
self->desc,
|
||||
descriptor,
|
||||
&glyph_bounds,
|
||||
&glyph_origin,
|
||||
&glyph_offset,
|
||||
&glyph_tex_rect);
|
||||
else
|
||||
gsk_gpu_colorize_op (self->frame,
|
||||
@@ -3054,7 +3034,7 @@ gsk_gpu_node_processor_add_glyph_node (GskGpuNodeProcessor *self,
|
||||
self->desc,
|
||||
descriptor,
|
||||
&glyph_bounds,
|
||||
&glyph_origin,
|
||||
&glyph_offset,
|
||||
&glyph_tex_rect,
|
||||
&color);
|
||||
|
||||
@@ -3267,8 +3247,8 @@ gsk_gpu_node_processor_repeat_tile (GskGpuNodeProcessor *self,
|
||||
rect,
|
||||
&self->offset,
|
||||
&GRAPHENE_RECT_INIT (
|
||||
clipped_child_bounds.origin.x + x * child_bounds->size.width,
|
||||
clipped_child_bounds.origin.y + y * child_bounds->size.height,
|
||||
clipped_child_bounds.origin.x - x * child_bounds->size.width,
|
||||
clipped_child_bounds.origin.y - y * child_bounds->size.height,
|
||||
clipped_child_bounds.size.width,
|
||||
clipped_child_bounds.size.height
|
||||
));
|
||||
@@ -3933,11 +3913,9 @@ gsk_gpu_node_processor_add_node (GskGpuNodeProcessor *self,
|
||||
GskRenderNodeType node_type;
|
||||
|
||||
/* This catches the corner cases of empty nodes, so after this check
|
||||
* there's quaranteed to be at least 1 pixel that needs to be drawn
|
||||
*/
|
||||
* there's quaranteed to be at least 1 pixel that needs to be drawn */
|
||||
if (node->bounds.size.width == 0 || node->bounds.size.height == 0)
|
||||
return;
|
||||
|
||||
if (!gsk_gpu_clip_may_intersect_rect (&self->clip, &self->offset, &node->bounds))
|
||||
return;
|
||||
|
||||
@@ -3982,12 +3960,6 @@ gsk_gpu_node_processor_create_node_pattern (GskGpuPatternWriter *self,
|
||||
if (!gsk_gpu_frame_should_optimize (self->frame, GSK_GPU_OPTIMIZE_UBER))
|
||||
return FALSE;
|
||||
|
||||
/* This catches the corner cases of empty nodes, so after this check
|
||||
* there's quaranteed to be at least 1 pixel that needs to be drawn
|
||||
*/
|
||||
if (node->bounds.size.width == 0 || node->bounds.size.height == 0)
|
||||
return TRUE;
|
||||
|
||||
node_type = gsk_render_node_get_node_type (node);
|
||||
if (node_type >= G_N_ELEMENTS (nodes_vtable))
|
||||
{
|
||||
|
||||
@@ -30,7 +30,6 @@ static const GdkDebugKey gsk_gpu_optimization_keys[] = {
|
||||
{ "blit", GSK_GPU_OPTIMIZE_BLIT, "Use shaders instead of vkCmdBlit()/glBlitFramebuffer()" },
|
||||
{ "gradients", GSK_GPU_OPTIMIZE_GRADIENTS, "Don't supersample gradients" },
|
||||
{ "mipmap", GSK_GPU_OPTIMIZE_MIPMAP, "Avoid creating mipmaps" },
|
||||
{ "glyph-align", GSK_GPU_OPTIMIZE_GLYPH_ALIGN, "Never align glyphs to the subpixel grid" },
|
||||
|
||||
{ "gl-baseinstance", GSK_GPU_OPTIMIZE_GL_BASE_INSTANCE, "Assume no ARB/EXT_base_instance support" },
|
||||
};
|
||||
@@ -119,7 +118,7 @@ gsk_gpu_renderer_dmabuf_downloader_download (GdkDmabufDownloader *downloader,
|
||||
frame = gsk_gpu_renderer_create_frame (self);
|
||||
|
||||
gsk_gpu_frame_download_texture (frame,
|
||||
g_get_monotonic_time (),
|
||||
g_get_monotonic_time(),
|
||||
GDK_TEXTURE (texture),
|
||||
format,
|
||||
data,
|
||||
@@ -301,7 +300,7 @@ gsk_gpu_renderer_fallback_render_texture (GskGpuRenderer *self,
|
||||
|
||||
frame = gsk_gpu_renderer_create_frame (self);
|
||||
gsk_gpu_frame_render (frame,
|
||||
g_get_monotonic_time (),
|
||||
g_get_monotonic_time(),
|
||||
image,
|
||||
NULL,
|
||||
root,
|
||||
@@ -343,8 +342,6 @@ gsk_gpu_renderer_render_texture (GskRenderer *renderer,
|
||||
GdkTexture *texture;
|
||||
graphene_rect_t rounded_viewport;
|
||||
|
||||
gsk_gpu_device_maybe_gc (priv->device);
|
||||
|
||||
gsk_gpu_renderer_make_current (self);
|
||||
|
||||
rounded_viewport = GRAPHENE_RECT_INIT (viewport->origin.x,
|
||||
@@ -355,7 +352,6 @@ gsk_gpu_renderer_render_texture (GskRenderer *renderer,
|
||||
gsk_render_node_get_preferred_depth (root),
|
||||
rounded_viewport.size.width,
|
||||
rounded_viewport.size.height);
|
||||
|
||||
if (image == NULL)
|
||||
return gsk_gpu_renderer_fallback_render_texture (self, root, &rounded_viewport);
|
||||
|
||||
@@ -363,7 +359,7 @@ gsk_gpu_renderer_render_texture (GskRenderer *renderer,
|
||||
|
||||
texture = NULL;
|
||||
gsk_gpu_frame_render (frame,
|
||||
g_get_monotonic_time (),
|
||||
g_get_monotonic_time(),
|
||||
image,
|
||||
NULL,
|
||||
root,
|
||||
@@ -373,8 +369,6 @@ gsk_gpu_renderer_render_texture (GskRenderer *renderer,
|
||||
g_object_unref (frame);
|
||||
g_object_unref (image);
|
||||
|
||||
gsk_gpu_device_queue_gc (priv->device);
|
||||
|
||||
/* check that callback setting texture was actually called, as its technically async */
|
||||
g_assert (texture);
|
||||
|
||||
@@ -403,8 +397,6 @@ gsk_gpu_renderer_render (GskRenderer *renderer,
|
||||
gsk_render_node_get_preferred_depth (root),
|
||||
region);
|
||||
|
||||
gsk_gpu_device_maybe_gc (priv->device);
|
||||
|
||||
gsk_gpu_renderer_make_current (self);
|
||||
|
||||
backbuffer = GSK_GPU_RENDERER_GET_CLASS (self)->get_backbuffer (self);
|
||||
@@ -414,7 +406,7 @@ gsk_gpu_renderer_render (GskRenderer *renderer,
|
||||
surface = gdk_draw_context_get_surface (priv->context);
|
||||
|
||||
gsk_gpu_frame_render (frame,
|
||||
g_get_monotonic_time (),
|
||||
g_get_monotonic_time(),
|
||||
backbuffer,
|
||||
render_region,
|
||||
root,
|
||||
@@ -425,8 +417,6 @@ gsk_gpu_renderer_render (GskRenderer *renderer,
|
||||
),
|
||||
NULL);
|
||||
|
||||
gsk_gpu_device_queue_gc (priv->device);
|
||||
|
||||
gdk_draw_context_end_frame (priv->context);
|
||||
|
||||
g_clear_pointer (&render_region, cairo_region_destroy);
|
||||
|
||||
@@ -117,8 +117,7 @@ typedef enum {
|
||||
GSK_GPU_OPTIMIZE_BLIT = 1 << 3,
|
||||
GSK_GPU_OPTIMIZE_GRADIENTS = 1 << 4,
|
||||
GSK_GPU_OPTIMIZE_MIPMAP = 1 << 5,
|
||||
GSK_GPU_OPTIMIZE_GLYPH_ALIGN = 1 << 6,
|
||||
/* These require hardware support */
|
||||
GSK_GPU_OPTIMIZE_GL_BASE_INSTANCE = 1 << 7,
|
||||
GSK_GPU_OPTIMIZE_GL_BASE_INSTANCE = 1 << 6,
|
||||
} GskGpuOptimizations;
|
||||
|
||||
|
||||
@@ -99,7 +99,6 @@ gsk_ngl_renderer_get_backbuffer (GskGpuRenderer *renderer)
|
||||
{
|
||||
gsk_ngl_renderer_free_backbuffer (self);
|
||||
self->backbuffer = gsk_gl_image_new_backbuffer (GSK_GL_DEVICE (gsk_gpu_renderer_get_device (renderer)),
|
||||
GDK_GL_CONTEXT (context),
|
||||
GDK_MEMORY_DEFAULT /* FIXME */,
|
||||
ceil (gdk_surface_get_width (surface) * scale),
|
||||
ceil (gdk_surface_get_height (surface) * scale));
|
||||
|
||||
@@ -425,11 +425,6 @@ gsk_vulkan_device_create_download_image (GskGpuDevice *device,
|
||||
return image;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_device_make_current (GskGpuDevice *device)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_device_finalize (GObject *object)
|
||||
{
|
||||
@@ -498,7 +493,6 @@ gsk_vulkan_device_class_init (GskVulkanDeviceClass *klass)
|
||||
gpu_device_class->create_atlas_image = gsk_vulkan_device_create_atlas_image;
|
||||
gpu_device_class->create_upload_image = gsk_vulkan_device_create_upload_image;
|
||||
gpu_device_class->create_download_image = gsk_vulkan_device_create_download_image;
|
||||
gpu_device_class->make_current = gsk_vulkan_device_make_current;
|
||||
|
||||
object_class->finalize = gsk_vulkan_device_finalize;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
precision highp float;
|
||||
|
||||
#if __VERSION__ < 420 || (defined(GSK_GLES) && __VERSION__ < 310)
|
||||
#if defined(GSK_GLES) && __VERSION__ < 310
|
||||
layout(std140)
|
||||
#else
|
||||
layout(std140, binding = 0)
|
||||
@@ -17,7 +17,7 @@ uniform PushConstants
|
||||
#define GSK_GLOBAL_CLIP_RECT push.clip[0]
|
||||
#define GSK_GLOBAL_SCALE push.scale
|
||||
|
||||
#if __VERSION__ < 420 || (defined(GSK_GLES) && __VERSION__ < 310)
|
||||
#if defined(GSK_GLES) && __VERSION__ < 310
|
||||
layout(std140)
|
||||
#else
|
||||
layout(std140, binding = 1)
|
||||
|
||||
@@ -18,68 +18,37 @@ vec4
|
||||
compute_color (void)
|
||||
{
|
||||
uint triangle_index = uint (GSK_VERTEX_INDEX) / 3u;
|
||||
uint index, fallback;
|
||||
uint index;
|
||||
|
||||
switch (triangle_index)
|
||||
{
|
||||
case 2u * SLICE_TOP_LEFT + 1u:
|
||||
index = TOP;
|
||||
fallback = LEFT;
|
||||
break;
|
||||
case 2u * SLICE_TOP:
|
||||
case 2u * SLICE_TOP + 1u:
|
||||
index = TOP;
|
||||
fallback = TOP;
|
||||
break;
|
||||
case 2u * SLICE_TOP_RIGHT:
|
||||
index = TOP;
|
||||
fallback = RIGHT;
|
||||
break;
|
||||
case 2u * SLICE_TOP_RIGHT + 1u:
|
||||
index = RIGHT;
|
||||
fallback = TOP;
|
||||
break;
|
||||
case 2u * SLICE_RIGHT:
|
||||
case 2u * SLICE_RIGHT + 1u:
|
||||
index = RIGHT;
|
||||
fallback = RIGHT;
|
||||
break;
|
||||
case 2u * SLICE_BOTTOM_RIGHT:
|
||||
index = RIGHT;
|
||||
fallback = BOTTOM;
|
||||
break;
|
||||
case 2u * SLICE_BOTTOM_RIGHT + 1u:
|
||||
index = BOTTOM;
|
||||
fallback = RIGHT;
|
||||
break;
|
||||
case 2u * SLICE_BOTTOM:
|
||||
case 2u * SLICE_BOTTOM + 1u:
|
||||
index = BOTTOM;
|
||||
fallback = BOTTOM;
|
||||
break;
|
||||
case 2u * SLICE_BOTTOM_LEFT:
|
||||
index = BOTTOM;
|
||||
fallback = LEFT;
|
||||
break;
|
||||
case 2u * SLICE_BOTTOM_LEFT + 1u:
|
||||
index = LEFT;
|
||||
fallback = BOTTOM;
|
||||
break;
|
||||
case 2u * SLICE_LEFT:
|
||||
case 2u * SLICE_LEFT + 1u:
|
||||
index = LEFT;
|
||||
fallback = LEFT;
|
||||
break;
|
||||
case 2u * SLICE_TOP_LEFT:
|
||||
index = LEFT;
|
||||
fallback = TOP;
|
||||
break;
|
||||
}
|
||||
|
||||
if (in_border_widths[index] > 0.0)
|
||||
return color_premultiply (in_border_colors[index]);
|
||||
else
|
||||
return color_premultiply (in_border_colors[fallback]);
|
||||
return color_premultiply (in_border_colors[index]);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -132,20 +132,3 @@ gsk_rect_round_larger (graphene_rect_t *rect)
|
||||
ceil (rect->origin.y + rect->size.height) - y);
|
||||
}
|
||||
|
||||
static inline void
|
||||
gsk_rect_scale (const graphene_rect_t *r,
|
||||
float sx,
|
||||
float sy,
|
||||
graphene_rect_t *res)
|
||||
{
|
||||
if (G_UNLIKELY (sx < 0 || sy < 0))
|
||||
{
|
||||
graphene_rect_scale (r, sx, sy, res);
|
||||
return;
|
||||
}
|
||||
|
||||
res->origin.x = r->origin.x * sx;
|
||||
res->origin.y = r->origin.y * sy;
|
||||
res->size.width = r->size.width * sx;
|
||||
res->size.height = r->size.height * sy;
|
||||
}
|
||||
|
||||
+1
-8
@@ -632,7 +632,7 @@ get_renderer_for_backend (GdkSurface *surface)
|
||||
static GType
|
||||
get_renderer_for_gl (GdkSurface *surface)
|
||||
{
|
||||
return gsk_ngl_renderer_get_type ();
|
||||
return GSK_TYPE_GL_RENDERER;
|
||||
}
|
||||
|
||||
static GType
|
||||
@@ -645,12 +645,6 @@ get_renderer_for_vulkan (GdkSurface *surface)
|
||||
#endif
|
||||
}
|
||||
|
||||
static GType
|
||||
get_renderer_for_gles2 (GdkSurface *surface)
|
||||
{
|
||||
return GSK_TYPE_GL_RENDERER;
|
||||
}
|
||||
|
||||
static GType
|
||||
get_renderer_fallback (GdkSurface *surface)
|
||||
{
|
||||
@@ -664,7 +658,6 @@ static struct {
|
||||
{ get_renderer_for_env_var },
|
||||
{ get_renderer_for_backend },
|
||||
{ get_renderer_for_gl },
|
||||
{ get_renderer_for_gles2 },
|
||||
{ get_renderer_for_vulkan },
|
||||
{ get_renderer_fallback },
|
||||
};
|
||||
|
||||
@@ -3335,7 +3335,6 @@ gsk_container_node_new (GskRenderNode **children,
|
||||
self->children = g_malloc_n (n_children, sizeof (GskRenderNode *));
|
||||
|
||||
self->children[0] = gsk_render_node_ref (children[0]);
|
||||
node->offscreen_for_opacity = children[0]->offscreen_for_opacity;
|
||||
gsk_rect_init_from_rect (&bounds, &(children[0]->bounds));
|
||||
node->preferred_depth = gdk_memory_depth_merge (node->preferred_depth,
|
||||
gsk_render_node_get_preferred_depth (children[0]));
|
||||
@@ -4092,7 +4091,6 @@ gsk_repeat_node_draw_tiled (cairo_t *cr,
|
||||
const graphene_rect_t *child_bounds)
|
||||
{
|
||||
cairo_pattern_t *pattern;
|
||||
cairo_matrix_t matrix;
|
||||
|
||||
cairo_save (cr);
|
||||
/* reset the clip so we get an unclipped pattern for repeating */
|
||||
@@ -4109,11 +4107,6 @@ gsk_repeat_node_draw_tiled (cairo_t *cr,
|
||||
cairo_restore (cr);
|
||||
|
||||
cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
|
||||
cairo_pattern_get_matrix (pattern, &matrix);
|
||||
cairo_matrix_translate (&matrix,
|
||||
- x * child_bounds->size.width,
|
||||
- y * child_bounds->size.height);
|
||||
cairo_pattern_set_matrix (pattern, &matrix);
|
||||
cairo_set_source (cr, pattern);
|
||||
cairo_pattern_destroy (pattern);
|
||||
|
||||
|
||||
+137
-332
@@ -46,9 +46,7 @@
|
||||
#include <cairo-script-interpreter.h>
|
||||
#endif
|
||||
|
||||
#include <cairo-gobject.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
#ifdef HAVE_PANGOFT
|
||||
#include <pango/pangofc-fontmap.h>
|
||||
#endif
|
||||
@@ -88,39 +86,6 @@ context_finish (Context *context)
|
||||
g_clear_object (&context->fontmap);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_enum (GtkCssParser *parser,
|
||||
GType type,
|
||||
gpointer out_value)
|
||||
{
|
||||
GEnumClass *class;
|
||||
GEnumValue *v;
|
||||
char *enum_name;
|
||||
|
||||
enum_name = gtk_css_parser_consume_ident (parser);
|
||||
if (enum_name == NULL)
|
||||
return FALSE;
|
||||
|
||||
class = g_type_class_ref (type);
|
||||
|
||||
v = g_enum_get_value_by_nick (class, enum_name);
|
||||
if (v == NULL)
|
||||
{
|
||||
gtk_css_parser_error_value (parser, "Unknown value \"%s\" for enum \"%s\"",
|
||||
enum_name, g_type_name (type));
|
||||
g_free (enum_name);
|
||||
g_type_class_unref (class);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*(int*)out_value = v->value;
|
||||
|
||||
g_free (enum_name);
|
||||
g_type_class_unref (class);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_rect (GtkCssParser *parser,
|
||||
Context *context,
|
||||
@@ -889,8 +854,7 @@ parse_mask_mode (GtkCssParser *parser,
|
||||
|
||||
static PangoFont *
|
||||
font_from_string (PangoFontMap *fontmap,
|
||||
const char *string,
|
||||
gboolean allow_fallback)
|
||||
const char *string)
|
||||
{
|
||||
PangoFontDescription *desc;
|
||||
PangoContext *ctx;
|
||||
@@ -901,7 +865,7 @@ font_from_string (PangoFontMap *fontmap,
|
||||
font = pango_font_map_load_font (fontmap, ctx, desc);
|
||||
g_object_unref (ctx);
|
||||
|
||||
if (font && !allow_fallback)
|
||||
if (font)
|
||||
{
|
||||
PangoFontDescription *desc2;
|
||||
const char *family, *family2;
|
||||
@@ -922,77 +886,6 @@ font_from_string (PangoFontMap *fontmap,
|
||||
return font;
|
||||
}
|
||||
|
||||
static double
|
||||
font_get_dpi (PangoFont *font)
|
||||
{
|
||||
#ifdef HAVE_PANGOFT
|
||||
if (PANGO_IS_FC_FONT (font))
|
||||
{
|
||||
FcPattern *pattern;
|
||||
double dpi;
|
||||
|
||||
pattern = pango_fc_font_get_pattern (PANGO_FC_FONT (font));
|
||||
if (FcPatternGetDouble (pattern, FC_DPI, 0, &dpi) == FcResultMatch)
|
||||
return dpi;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* FIXME, needs pango api */
|
||||
|
||||
return 96.0;
|
||||
}
|
||||
|
||||
static PangoFont *
|
||||
recreate_font_with_options (PangoFont *font,
|
||||
cairo_hint_metrics_t hint_metrics,
|
||||
cairo_hint_style_t hint_style,
|
||||
cairo_antialias_t antialias,
|
||||
double dpi)
|
||||
{
|
||||
PangoFontMap *fontmap;
|
||||
PangoFontDescription *desc;
|
||||
PangoContext *ctx;
|
||||
cairo_scaled_font_t *sf;
|
||||
cairo_font_options_t *options;
|
||||
PangoFont *new_font;
|
||||
|
||||
options = cairo_font_options_create ();
|
||||
|
||||
sf = pango_cairo_font_get_scaled_font (PANGO_CAIRO_FONT (font));
|
||||
cairo_scaled_font_get_font_options (sf, options);
|
||||
|
||||
if (cairo_font_options_get_hint_metrics (options) == hint_metrics &&
|
||||
cairo_font_options_get_hint_style (options) == hint_style &&
|
||||
cairo_font_options_get_antialias (options) == antialias &&
|
||||
font_get_dpi (font) == dpi)
|
||||
{
|
||||
cairo_font_options_destroy (options);
|
||||
|
||||
return font;
|
||||
}
|
||||
|
||||
cairo_font_options_set_hint_metrics (options, hint_metrics);
|
||||
cairo_font_options_set_hint_style (options, hint_style);
|
||||
cairo_font_options_set_antialias (options, antialias);
|
||||
|
||||
desc = pango_font_describe (font);
|
||||
fontmap = pango_font_get_font_map (font);
|
||||
|
||||
ctx = pango_font_map_create_context (fontmap);
|
||||
pango_cairo_context_set_font_options (ctx, options);
|
||||
pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (fontmap), dpi);
|
||||
|
||||
new_font = pango_font_map_load_font (fontmap, ctx, desc);
|
||||
|
||||
g_object_unref (ctx);
|
||||
pango_font_description_free (desc);
|
||||
cairo_font_options_destroy (options);
|
||||
|
||||
g_object_unref (font);
|
||||
|
||||
return new_font;
|
||||
}
|
||||
|
||||
#define MIN_ASCII_GLYPH 32
|
||||
#define MAX_ASCII_GLYPH 127 /* exclusive */
|
||||
#define N_ASCII_GLYPHS (MAX_ASCII_GLYPH - MIN_ASCII_GLYPH)
|
||||
@@ -1088,7 +981,7 @@ ensure_fontmap (Context *context)
|
||||
g_object_set_data_full (G_OBJECT (context->fontmap), "font-files", files, (GDestroyNotify) g_ptr_array_unref);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static void
|
||||
add_font_from_file (Context *context,
|
||||
const char *path,
|
||||
GError **error)
|
||||
@@ -1104,7 +997,7 @@ add_font_from_file (Context *context,
|
||||
GTK_CSS_PARSER_ERROR,
|
||||
GTK_CSS_PARSER_ERROR_FAILED,
|
||||
"Custom fonts are not implemented for %s", G_OBJECT_TYPE_NAME (context->fontmap));
|
||||
return FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
config = pango_fc_font_map_get_config (PANGO_FC_FONT_MAP (context->fontmap));
|
||||
@@ -1113,20 +1006,18 @@ add_font_from_file (Context *context,
|
||||
{
|
||||
g_set_error (error,
|
||||
GTK_CSS_PARSER_ERROR,
|
||||
GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
|
||||
"Failed to load font");
|
||||
return FALSE;
|
||||
GTK_CSS_PARSER_ERROR_FAILED,
|
||||
"Failed to add %s to FcConfig", path);
|
||||
return;
|
||||
}
|
||||
|
||||
files = (GPtrArray *) g_object_get_data (G_OBJECT (context->fontmap), "font-files");
|
||||
g_ptr_array_add (files, g_strdup (path));
|
||||
|
||||
pango_fc_font_map_config_changed (PANGO_FC_FONT_MAP (context->fontmap));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static void
|
||||
add_font_from_bytes (Context *context,
|
||||
GBytes *bytes,
|
||||
GError **error)
|
||||
@@ -1134,11 +1025,10 @@ add_font_from_bytes (Context *context,
|
||||
GFile *file;
|
||||
GIOStream *iostream;
|
||||
GOutputStream *ostream;
|
||||
gboolean result;
|
||||
|
||||
file = g_file_new_tmp ("gtk4-font-XXXXXX.ttf", (GFileIOStream **) &iostream, error);
|
||||
if (!file)
|
||||
return FALSE;
|
||||
return;
|
||||
|
||||
ostream = g_io_stream_get_output_stream (iostream);
|
||||
if (g_output_stream_write_bytes (ostream, bytes, NULL, error) == -1)
|
||||
@@ -1146,22 +1036,20 @@ add_font_from_bytes (Context *context,
|
||||
g_object_unref (file);
|
||||
g_object_unref (iostream);
|
||||
|
||||
return FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
g_io_stream_close (iostream, NULL, NULL);
|
||||
g_object_unref (iostream);
|
||||
|
||||
result = add_font_from_file (context, g_file_peek_path (file), error);
|
||||
add_font_from_file (context, g_file_peek_path (file), error);
|
||||
|
||||
g_object_unref (file);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#else /* !HAVE_PANGOFT */
|
||||
|
||||
static gboolean
|
||||
static void
|
||||
add_font_from_bytes (Context *context,
|
||||
GBytes *bytes,
|
||||
GError **error)
|
||||
@@ -1170,7 +1058,6 @@ add_font_from_bytes (Context *context,
|
||||
GTK_CSS_PARSER_ERROR,
|
||||
GTK_CSS_PARSER_ERROR_FAILED,
|
||||
"Not implemented");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1181,105 +1068,94 @@ parse_font (GtkCssParser *parser,
|
||||
gpointer out_font)
|
||||
{
|
||||
PangoFont *font = NULL;
|
||||
char *font_name;
|
||||
char *s;
|
||||
GtkCssLocation start_location;
|
||||
PangoFontMap *fontmap;
|
||||
|
||||
font_name = gtk_css_parser_consume_string (parser);
|
||||
if (font_name == NULL)
|
||||
fontmap = pango_cairo_font_map_get_default ();
|
||||
|
||||
s = gtk_css_parser_consume_string (parser);
|
||||
if (s == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (context->fontmap)
|
||||
font = font_from_string (context->fontmap, font_name, FALSE);
|
||||
start_location = *gtk_css_parser_get_start_location (parser);
|
||||
|
||||
if (gtk_css_parser_has_url (parser))
|
||||
if (gtk_css_parser_try_token (parser, GTK_CSS_TOKEN_URL) ||
|
||||
gtk_css_parser_has_function (parser, "url"))
|
||||
{
|
||||
char *url;
|
||||
char *scheme;
|
||||
GBytes *bytes = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
if (font != NULL)
|
||||
/* If we have a url, it is a bug if the font already exists in our custom fontmap */
|
||||
if (context->fontmap)
|
||||
{
|
||||
gtk_css_parser_error_value (parser, "A font with this name already exists.");
|
||||
/* consume the url to avoid more errors */
|
||||
url = gtk_css_parser_consume_url (parser);
|
||||
g_free (url);
|
||||
font = font_from_string (context->fontmap, s);
|
||||
if (font)
|
||||
{
|
||||
g_object_unref (font);
|
||||
gtk_css_parser_error_value (parser, "This font already exists.");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
url = gtk_css_parser_consume_url (parser);
|
||||
|
||||
scheme = g_uri_parse_scheme (url);
|
||||
if (scheme && g_ascii_strcasecmp (scheme, "data") == 0)
|
||||
{
|
||||
bytes = gtk_css_data_url_parse (url, NULL, &error);
|
||||
}
|
||||
else
|
||||
{
|
||||
char *scheme;
|
||||
GBytes *bytes;
|
||||
GError *error = NULL;
|
||||
GtkCssLocation start_location;
|
||||
gboolean success = FALSE;
|
||||
GFile *file;
|
||||
|
||||
start_location = *gtk_css_parser_get_start_location (parser);
|
||||
url = gtk_css_parser_consume_url (parser);
|
||||
file = g_file_new_for_uri (url);
|
||||
bytes = g_file_load_bytes (file, NULL, NULL, &error);
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
if (url != NULL)
|
||||
{
|
||||
scheme = g_uri_parse_scheme (url);
|
||||
if (scheme && g_ascii_strcasecmp (scheme, "data") == 0)
|
||||
{
|
||||
bytes = gtk_css_data_url_parse (url, NULL, &error);
|
||||
}
|
||||
else
|
||||
{
|
||||
GFile *file;
|
||||
g_free (scheme);
|
||||
g_free (url);
|
||||
|
||||
file = g_file_new_for_uri (url);
|
||||
bytes = g_file_load_bytes (file, NULL, NULL, &error);
|
||||
g_object_unref (file);
|
||||
}
|
||||
if (bytes)
|
||||
{
|
||||
add_font_from_bytes (context, bytes, &error);
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
g_free (scheme);
|
||||
g_free (url);
|
||||
if (bytes != NULL)
|
||||
{
|
||||
success = add_font_from_bytes (context, bytes, &error);
|
||||
g_bytes_unref (bytes);
|
||||
}
|
||||
fontmap = context->fontmap;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_assert (error != NULL);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
gtk_css_parser_emit_error (parser,
|
||||
&start_location,
|
||||
gtk_css_parser_get_end_location (parser),
|
||||
error);
|
||||
}
|
||||
}
|
||||
gtk_css_parser_emit_error (parser,
|
||||
&start_location,
|
||||
gtk_css_parser_get_end_location (parser),
|
||||
error);
|
||||
g_clear_error (&error);
|
||||
|
||||
if (success)
|
||||
{
|
||||
font = font_from_string (context->fontmap, font_name, FALSE);
|
||||
if (!font)
|
||||
{
|
||||
gtk_css_parser_error (parser,
|
||||
GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
|
||||
&start_location,
|
||||
gtk_css_parser_get_end_location (parser),
|
||||
"The given url does not define a font named \"%s\"",
|
||||
font_name);
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!font)
|
||||
font = font_from_string (pango_cairo_font_map_get_default (), font_name, TRUE);
|
||||
|
||||
if (!font)
|
||||
gtk_css_parser_error_value (parser, "The font \"%s\" does not exist", font_name);
|
||||
}
|
||||
font = font_from_string (fontmap, s);
|
||||
|
||||
g_free (font_name);
|
||||
if (!font && context->fontmap && fontmap != context->fontmap)
|
||||
font = font_from_string (context->fontmap, s);
|
||||
|
||||
if (font)
|
||||
{
|
||||
*((PangoFont**)out_font) = font;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
if (!font)
|
||||
{
|
||||
gtk_css_parser_error_value (parser, "This font does not exist.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*((PangoFont**)out_font) = font;
|
||||
|
||||
g_free (s);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2323,60 +2199,6 @@ unpack_glyphs (PangoFont *font,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_hint_metrics (GtkCssParser *parser,
|
||||
Context *context,
|
||||
gpointer out)
|
||||
{
|
||||
if (!parse_enum (parser, CAIRO_GOBJECT_TYPE_HINT_METRICS, out))
|
||||
return FALSE;
|
||||
|
||||
if (*(cairo_hint_metrics_t *) out == CAIRO_HINT_METRICS_DEFAULT)
|
||||
{
|
||||
gtk_css_parser_error_value (parser, "Unknown value \"default\" for enum \"%s\"",
|
||||
g_type_name (CAIRO_GOBJECT_TYPE_HINT_METRICS));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_hint_style (GtkCssParser *parser,
|
||||
Context *context,
|
||||
gpointer out)
|
||||
{
|
||||
if (!parse_enum (parser, CAIRO_GOBJECT_TYPE_HINT_STYLE, out))
|
||||
return FALSE;
|
||||
|
||||
if (*(cairo_hint_style_t *) out == CAIRO_HINT_STYLE_DEFAULT)
|
||||
{
|
||||
gtk_css_parser_error_value (parser, "Unknown value \"default\" for enum \"%s\"",
|
||||
g_type_name (CAIRO_GOBJECT_TYPE_HINT_STYLE));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_antialias (GtkCssParser *parser,
|
||||
Context *context,
|
||||
gpointer out)
|
||||
{
|
||||
if (!parse_enum (parser, CAIRO_GOBJECT_TYPE_ANTIALIAS, out))
|
||||
return FALSE;
|
||||
|
||||
if (*(cairo_antialias_t *) out == CAIRO_ANTIALIAS_DEFAULT)
|
||||
{
|
||||
gtk_css_parser_error_value (parser, "Unknown value \"default\" for enum \"%s\"",
|
||||
g_type_name (CAIRO_GOBJECT_TYPE_ANTIALIAS));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GskRenderNode *
|
||||
parse_text_node (GtkCssParser *parser,
|
||||
Context *context)
|
||||
@@ -2385,19 +2207,11 @@ parse_text_node (GtkCssParser *parser,
|
||||
graphene_point_t offset = GRAPHENE_POINT_INIT (0, 0);
|
||||
GdkRGBA color = GDK_RGBA("000000");
|
||||
PangoGlyphString *glyphs = NULL;
|
||||
cairo_hint_metrics_t hint_metrics = CAIRO_HINT_METRICS_OFF;
|
||||
cairo_hint_style_t hint_style = CAIRO_HINT_STYLE_SLIGHT;
|
||||
cairo_antialias_t antialias = CAIRO_ANTIALIAS_GRAY;
|
||||
double dpi = 96.0;
|
||||
const Declaration declarations[] = {
|
||||
{ "font", parse_font, clear_font, &font },
|
||||
{ "offset", parse_point, NULL, &offset },
|
||||
{ "color", parse_color, NULL, &color },
|
||||
{ "glyphs", parse_glyphs, clear_glyphs, &glyphs },
|
||||
{ "hint-metrics", parse_hint_metrics, NULL, &hint_metrics },
|
||||
{ "hint-style", parse_hint_style, NULL, &hint_style },
|
||||
{ "antialias", parse_antialias, NULL, &antialias },
|
||||
{ "dpi", parse_positive_double, NULL, &dpi },
|
||||
{ "glyphs", parse_glyphs, clear_glyphs, &glyphs }
|
||||
};
|
||||
GskRenderNode *result;
|
||||
|
||||
@@ -2405,12 +2219,10 @@ parse_text_node (GtkCssParser *parser,
|
||||
|
||||
if (font == NULL)
|
||||
{
|
||||
font = font_from_string (pango_cairo_font_map_get_default (), "Cantarell 11", TRUE);
|
||||
font = font_from_string (pango_cairo_font_map_get_default (), "Cantarell 11");
|
||||
g_assert (font);
|
||||
}
|
||||
|
||||
font = recreate_font_with_options (font, hint_metrics, hint_style, antialias, dpi);
|
||||
|
||||
if (!glyphs)
|
||||
{
|
||||
const char *text = "Hello";
|
||||
@@ -2599,6 +2411,39 @@ clear_dash (gpointer inout_array)
|
||||
g_clear_pointer ((GArray **) inout_array, g_array_unref);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_enum (GtkCssParser *parser,
|
||||
GType type,
|
||||
gpointer out_value)
|
||||
{
|
||||
GEnumClass *class;
|
||||
GEnumValue *v;
|
||||
char *enum_name;
|
||||
|
||||
enum_name = gtk_css_parser_consume_ident (parser);
|
||||
if (enum_name == NULL)
|
||||
return FALSE;
|
||||
|
||||
class = g_type_class_ref (type);
|
||||
|
||||
v = g_enum_get_value_by_nick (class, enum_name);
|
||||
if (v == NULL)
|
||||
{
|
||||
gtk_css_parser_error_value (parser, "Unknown value \"%s\" for enum \"%s\"",
|
||||
enum_name, g_type_name (type));
|
||||
g_free (enum_name);
|
||||
g_type_class_unref (class);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*(int*)out_value = v->value;
|
||||
|
||||
g_free (enum_name);
|
||||
g_type_class_unref (class);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_fill_rule (GtkCssParser *parser,
|
||||
Context *context,
|
||||
@@ -3385,33 +3230,6 @@ append_string_param (Printer *p,
|
||||
g_string_append_c (p->str, '\n');
|
||||
}
|
||||
|
||||
static const char *
|
||||
enum_to_nick (GType type,
|
||||
int value)
|
||||
{
|
||||
GEnumClass *class;
|
||||
GEnumValue *v;
|
||||
|
||||
class = g_type_class_ref (type);
|
||||
v = g_enum_get_value (class, value);
|
||||
g_type_class_unref (class);
|
||||
|
||||
return v->value_nick;
|
||||
}
|
||||
|
||||
static void
|
||||
append_enum_param (Printer *p,
|
||||
const char *param_name,
|
||||
GType type,
|
||||
int value)
|
||||
{
|
||||
_indent (p);
|
||||
g_string_append_printf (p->str, "%s: ", param_name);
|
||||
g_string_append (p->str, enum_to_nick (type, value));
|
||||
g_string_append_c (p->str, ';');
|
||||
g_string_append_c (p->str, '\n');
|
||||
}
|
||||
|
||||
static void
|
||||
append_vec4_param (Printer *p,
|
||||
const char *param_name,
|
||||
@@ -3679,43 +3497,6 @@ gsk_text_node_serialize_font (GskRenderNode *node,
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_text_node_serialize_font_options (GskRenderNode *node,
|
||||
Printer *p)
|
||||
{
|
||||
PangoFont *font = gsk_text_node_get_font (node);
|
||||
cairo_scaled_font_t *sf = pango_cairo_font_get_scaled_font (PANGO_CAIRO_FONT (font));
|
||||
cairo_font_options_t *options;
|
||||
cairo_hint_metrics_t hint_metrics;
|
||||
cairo_hint_style_t hint_style;
|
||||
cairo_antialias_t antialias;
|
||||
|
||||
options = cairo_font_options_create ();
|
||||
cairo_scaled_font_get_font_options (sf, options);
|
||||
hint_metrics = cairo_font_options_get_hint_metrics (options);
|
||||
hint_style = cairo_font_options_get_hint_style (options);
|
||||
antialias = cairo_font_options_get_antialias (options);
|
||||
cairo_font_options_destroy (options);
|
||||
|
||||
if (hint_metrics != CAIRO_HINT_METRICS_OFF && hint_metrics != CAIRO_HINT_METRICS_DEFAULT)
|
||||
append_enum_param (p, "hint-metrics", CAIRO_GOBJECT_TYPE_HINT_METRICS, hint_metrics);
|
||||
|
||||
if (hint_style != CAIRO_HINT_STYLE_SLIGHT && hint_style != CAIRO_HINT_STYLE_DEFAULT)
|
||||
append_enum_param (p, "hint-style", CAIRO_GOBJECT_TYPE_HINT_STYLE, hint_style);
|
||||
|
||||
if (antialias != CAIRO_ANTIALIAS_GRAY && antialias != CAIRO_ANTIALIAS_DEFAULT)
|
||||
append_enum_param (p, "antialias", CAIRO_GOBJECT_TYPE_ANTIALIAS, antialias);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_text_node_serialize_font_dpi (GskRenderNode *node,
|
||||
Printer *p)
|
||||
{
|
||||
PangoFont *font = gsk_text_node_get_font (node);
|
||||
|
||||
append_float_param (p, "dpi", font_get_dpi (font), 96.f);
|
||||
}
|
||||
|
||||
void
|
||||
gsk_text_node_serialize_glyphs (GskRenderNode *node,
|
||||
GString *p)
|
||||
@@ -3797,6 +3578,33 @@ gsk_text_node_serialize_glyphs (GskRenderNode *node,
|
||||
pango_glyph_string_free (ascii);
|
||||
}
|
||||
|
||||
static const char *
|
||||
enum_to_nick (GType type,
|
||||
int value)
|
||||
{
|
||||
GEnumClass *class;
|
||||
GEnumValue *v;
|
||||
|
||||
class = g_type_class_ref (type);
|
||||
v = g_enum_get_value (class, value);
|
||||
g_type_class_unref (class);
|
||||
|
||||
return v->value_nick;
|
||||
}
|
||||
|
||||
static void
|
||||
append_enum_param (Printer *p,
|
||||
const char *param_name,
|
||||
GType type,
|
||||
int value)
|
||||
{
|
||||
_indent (p);
|
||||
g_string_append_printf (p->str, "%s: ", param_name);
|
||||
g_string_append (p->str, enum_to_nick (type, value));
|
||||
g_string_append_c (p->str, ';');
|
||||
g_string_append_c (p->str, '\n');
|
||||
}
|
||||
|
||||
static void
|
||||
append_path_param (Printer *p,
|
||||
const char *param_name,
|
||||
@@ -4261,9 +4069,6 @@ render_node_print (Printer *p,
|
||||
if (!graphene_point_equal (offset, graphene_point_zero ()))
|
||||
append_point_param (p, "offset", offset);
|
||||
|
||||
gsk_text_node_serialize_font_options (node, p);
|
||||
gsk_text_node_serialize_font_dpi (node, p);
|
||||
|
||||
end_node (p);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -311,8 +311,8 @@ gsk_rounded_rect_scale_affine (GskRoundedRect *dest,
|
||||
graphene_rect_scale (&src->bounds, scale_x, scale_y, &dest->bounds);
|
||||
graphene_rect_offset (&dest->bounds, dx, dy);
|
||||
|
||||
scale_x = fabsf (scale_x);
|
||||
scale_y = fabsf (scale_y);
|
||||
scale_x = fabs (scale_x);
|
||||
scale_y = fabs (scale_y);
|
||||
|
||||
for (guint i = 0; i < 4; i++)
|
||||
{
|
||||
|
||||
@@ -1401,6 +1401,14 @@ gtk_at_spi_context_finalize (GObject *gobject)
|
||||
G_OBJECT_CLASS (gtk_at_spi_context_parent_class)->finalize (gobject);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_at_spi_context_constructed (GObject *gobject)
|
||||
{
|
||||
GtkAtSpiContext *self G_GNUC_UNUSED = GTK_AT_SPI_CONTEXT (gobject);
|
||||
|
||||
G_OBJECT_CLASS (gtk_at_spi_context_parent_class)->constructed (gobject);
|
||||
}
|
||||
|
||||
static const char *get_bus_address (GdkDisplay *display);
|
||||
|
||||
static void
|
||||
@@ -1508,6 +1516,7 @@ gtk_at_spi_context_class_init (GtkAtSpiContextClass *klass)
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GtkATContextClass *context_class = GTK_AT_CONTEXT_CLASS (klass);
|
||||
|
||||
gobject_class->constructed = gtk_at_spi_context_constructed;
|
||||
gobject_class->finalize = gtk_at_spi_context_finalize;
|
||||
|
||||
context_class->realize = gtk_at_spi_context_realize;
|
||||
|
||||
@@ -96,7 +96,7 @@ gtk_at_spi_root_finalize (GObject *gobject)
|
||||
g_free (self->desktop_name);
|
||||
g_free (self->desktop_path);
|
||||
|
||||
G_OBJECT_CLASS (gtk_at_spi_root_parent_class)->finalize (gobject);
|
||||
G_OBJECT_CLASS (gtk_at_spi_root_parent_class)->dispose (gobject);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -957,14 +957,6 @@ gtk_css_parser_parse_url_arg (GtkCssParser *parser,
|
||||
return 1;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_css_parser_has_url (GtkCssParser *self)
|
||||
{
|
||||
return gtk_css_parser_has_token (self, GTK_CSS_TOKEN_URL)
|
||||
|| gtk_css_parser_has_token (self, GTK_CSS_TOKEN_BAD_URL)
|
||||
|| gtk_css_parser_has_function (self, "url");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_css_parser_consume_url:
|
||||
* @self: a `GtkCssParser`
|
||||
|
||||
@@ -116,7 +116,6 @@ gboolean gtk_css_parser_has_token (GtkCssParser
|
||||
GtkCssTokenType token_type);
|
||||
gboolean gtk_css_parser_has_ident (GtkCssParser *self,
|
||||
const char *ident);
|
||||
gboolean gtk_css_parser_has_url (GtkCssParser *self);
|
||||
gboolean gtk_css_parser_has_number (GtkCssParser *self);
|
||||
gboolean gtk_css_parser_has_integer (GtkCssParser *self);
|
||||
gboolean gtk_css_parser_has_function (GtkCssParser *self,
|
||||
|
||||
@@ -403,7 +403,7 @@ gtk_file_chooser_set_current_folder (GtkFileChooser *chooser,
|
||||
GError **error)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_FILE_CHOOSER (chooser), FALSE);
|
||||
g_return_val_if_fail (file == NULL || G_IS_FILE (file), FALSE);
|
||||
g_return_val_if_fail (G_IS_FILE (file), FALSE);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
return GTK_FILE_CHOOSER_GET_IFACE (chooser)->set_current_folder (chooser, file, error);
|
||||
|
||||
@@ -1149,96 +1149,6 @@ gtk_accessible_get_bounds (GtkAccessible *self,
|
||||
return GTK_ACCESSIBLE_GET_IFACE (self)->get_bounds (self, x, y, width, height);
|
||||
}
|
||||
|
||||
struct _GtkAccessibleList
|
||||
{
|
||||
GList *objects;
|
||||
};
|
||||
|
||||
/**
|
||||
* gtk_accessible_list_new_from_list:
|
||||
* @list: (element-type GtkAccessible): a reference to a `GList` containing a list of accessible values
|
||||
*
|
||||
* Allocates a new `GtkAccessibleList`, doing a shallow copy of the
|
||||
* passed list of `GtkAccessible` instances.
|
||||
*
|
||||
* Returns: (transfer full): the list of accessible instances
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
GtkAccessibleList *
|
||||
gtk_accessible_list_new_from_list (GList *list)
|
||||
{
|
||||
GtkAccessibleList *accessible_list = g_new (GtkAccessibleList, 1);
|
||||
|
||||
accessible_list->objects = g_list_copy (list);
|
||||
|
||||
return accessible_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_accessible_list_new_from_array:
|
||||
* @accessibles: (array length=n_accessibles): array of GtkAccessible
|
||||
* @n_accessibles: length of @accessibles array
|
||||
*
|
||||
* Allocates a new list of accessible instances.
|
||||
*
|
||||
* Returns: (transfer full): the newly created list of accessible instances
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
GtkAccessibleList *
|
||||
gtk_accessible_list_new_from_array (GtkAccessible **accessibles,
|
||||
gsize n_accessibles)
|
||||
{
|
||||
GtkAccessibleList *accessible_list;
|
||||
GList *list = NULL;
|
||||
|
||||
g_return_val_if_fail (accessibles == NULL || n_accessibles == 0, NULL);
|
||||
|
||||
accessible_list = g_new (GtkAccessibleList, 1);
|
||||
|
||||
for (gsize i = 0; i < n_accessibles; i++)
|
||||
{
|
||||
list = g_list_prepend (list, accessibles[i]);
|
||||
}
|
||||
|
||||
accessible_list->objects = g_list_reverse (list);
|
||||
|
||||
return accessible_list;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_accessible_list_free (GtkAccessibleList *accessible_list)
|
||||
{
|
||||
g_free (accessible_list->objects);
|
||||
g_free (accessible_list);
|
||||
}
|
||||
|
||||
static GtkAccessibleList *
|
||||
gtk_accessible_list_copy (GtkAccessibleList *accessible_list)
|
||||
{
|
||||
return gtk_accessible_list_new_from_list (accessible_list->objects);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_accessible_list_get_objects:
|
||||
*
|
||||
* Gets the list of objects this boxed type holds
|
||||
*
|
||||
* Returns: (transfer container) (element-type GtkAccessible): a shallow copy of the objects
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
GList *
|
||||
gtk_accessible_list_get_objects (GtkAccessibleList *accessible_list)
|
||||
{
|
||||
return g_list_copy (accessible_list->objects);
|
||||
}
|
||||
|
||||
G_DEFINE_BOXED_TYPE (GtkAccessibleList, gtk_accessible_list,
|
||||
gtk_accessible_list_copy,
|
||||
gtk_accessible_list_free)
|
||||
|
||||
/*< private >
|
||||
* gtk_accessible_should_present:
|
||||
* @self: a `GtkAccessible`
|
||||
|
||||
@@ -154,15 +154,6 @@ struct _GtkAccessibleInterface
|
||||
int *height);
|
||||
};
|
||||
|
||||
/**
|
||||
* GtkAccessibleList:
|
||||
*
|
||||
* A boxed type which wraps a list of references to GtkAccessible objects.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
typedef struct _GtkAccessibleList GtkAccessibleList;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkATContext * gtk_accessible_get_at_context (GtkAccessible *self);
|
||||
|
||||
@@ -245,19 +236,4 @@ GDK_AVAILABLE_IN_ALL
|
||||
void gtk_accessible_relation_init_value (GtkAccessibleRelation relation,
|
||||
GValue *value);
|
||||
|
||||
#define GTK_ACCESSIBLE_LIST (gtk_accessible_list_get_type())
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
GType gtk_accessible_list_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
GList * gtk_accessible_list_get_objects (GtkAccessibleList *accessible_list);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
GtkAccessibleList * gtk_accessible_list_new_from_list (GList *list);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
GtkAccessibleList * gtk_accessible_list_new_from_array (GtkAccessible **accessibles,
|
||||
gsize n_accessibles);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -1332,18 +1332,7 @@ gtk_accessible_value_collect_value (const GtkAccessibleCollect *cstate,
|
||||
GtkAccessibleValueRefListCtor ctor =
|
||||
(GtkAccessibleValueRefListCtor) cstate->ctor;
|
||||
|
||||
GList *value;
|
||||
|
||||
if (g_type_is_a (G_VALUE_TYPE(value_), GTK_ACCESSIBLE_LIST))
|
||||
{
|
||||
GtkAccessibleList *boxed = g_value_get_boxed (value_);
|
||||
|
||||
value = gtk_accessible_list_get_objects (boxed);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = g_value_get_pointer (value_);
|
||||
}
|
||||
GList *value = g_value_get_pointer (value_);
|
||||
|
||||
if (ctor == NULL)
|
||||
{
|
||||
|
||||
@@ -257,14 +257,14 @@ gtk_application_startup (GApplication *g_application)
|
||||
|
||||
before2 = GDK_PROFILER_CURRENT_TIME;
|
||||
gtk_init ();
|
||||
gdk_profiler_end_mark (before2, "gtk_init", NULL);
|
||||
gdk_profiler_end_mark (before2, "gtk init", NULL);
|
||||
|
||||
priv->impl = gtk_application_impl_new (application, gdk_display_get_default ());
|
||||
gtk_application_impl_startup (priv->impl, priv->register_session);
|
||||
|
||||
gtk_application_load_resources (application);
|
||||
|
||||
gdk_profiler_end_mark (before, "Application startup", NULL);
|
||||
gdk_profiler_end_mark (before, "gtk application startup", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+11
-5
@@ -604,10 +604,14 @@ static const struct {
|
||||
GtkAccessible *accessible,
|
||||
GdkDisplay *display);
|
||||
} a11y_backends[] = {
|
||||
#if defined(GDK_WINDOWING_WAYLAND) || defined(GDK_WINDOWING_X11)
|
||||
{ "AT-SPI", "atspi", gtk_at_spi_create_context },
|
||||
#if defined(GDK_WINDOWING_WAYLAND)
|
||||
{ "AT-SPI (Wayland)", "atspi", gtk_at_spi_create_context },
|
||||
#endif
|
||||
#if defined(GDK_WINDOWING_X11)
|
||||
{ "AT-SPI (X11)", "atspi", gtk_at_spi_create_context },
|
||||
#endif
|
||||
{ "Test", "test", gtk_test_at_context_new },
|
||||
{ NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -630,7 +634,6 @@ gtk_at_context_create (GtkAccessibleRole accessible_role,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
static const char *gtk_a11y_env;
|
||||
GtkATContext *res = NULL;
|
||||
|
||||
if (gtk_a11y_env == NULL)
|
||||
{
|
||||
@@ -658,9 +661,12 @@ gtk_at_context_create (GtkAccessibleRole accessible_role,
|
||||
if (g_ascii_strcasecmp (gtk_a11y_env, "none") == 0)
|
||||
return NULL;
|
||||
|
||||
for (size_t i = 0; i < G_N_ELEMENTS (a11y_backends); i++)
|
||||
GtkATContext *res = NULL;
|
||||
|
||||
for (guint i = 0; i < G_N_ELEMENTS (a11y_backends); i++)
|
||||
{
|
||||
g_assert (a11y_backends[i].name != NULL);
|
||||
if (a11y_backends[i].name == NULL)
|
||||
break;
|
||||
|
||||
if (a11y_backends[i].create_context != NULL &&
|
||||
(*gtk_a11y_env == '0' || g_ascii_strcasecmp (a11y_backends[i].env_name, gtk_a11y_env) == 0))
|
||||
|
||||
@@ -2251,7 +2251,7 @@ _gtk_builder_parser_parse_buffer (GtkBuilder *builder,
|
||||
guint64 after = GDK_PROFILER_CURRENT_TIME;
|
||||
if (after - before > 500000) /* half a millisecond */
|
||||
{
|
||||
gdk_profiler_add_mark (before, after - before, "Builder load", filename);
|
||||
gdk_profiler_add_mark (before, after - before, "builder load", filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1363,7 +1363,7 @@ gtk_css_node_validate (GtkCssNode *cssnode)
|
||||
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
{
|
||||
gdk_profiler_end_mark (before, "Validate CSS", "");
|
||||
gdk_profiler_end_mark (before, "css validation", "");
|
||||
gdk_profiler_set_int_counter (invalidated_nodes_counter, invalidated_nodes);
|
||||
gdk_profiler_set_int_counter (created_styles_counter, created_styles);
|
||||
invalidated_nodes = 0;
|
||||
|
||||
@@ -1016,7 +1016,7 @@ gtk_css_provider_postprocess (GtkCssProvider *css_provider)
|
||||
}
|
||||
#endif
|
||||
|
||||
gdk_profiler_end_mark (before, "Create CSS selector tree", NULL);
|
||||
gdk_profiler_end_mark (before, "create selector tree", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1081,7 +1081,7 @@ gtk_css_provider_load_internal (GtkCssProvider *self,
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
{
|
||||
char *uri = g_file_get_uri (file);
|
||||
gdk_profiler_end_mark (before, "CSS theme load", uri);
|
||||
gdk_profiler_end_mark (before, "theme load", uri);
|
||||
g_free (uri);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -75,7 +75,7 @@
|
||||
*
|
||||
* // This widget accepts two types of drop types: GFile objects
|
||||
* // and GdkPixbuf objects
|
||||
* gtk_drop_target_set_gtypes (target, (GType [2]) {
|
||||
* gtk_drop_target_set_gtypes (target, (GTypes [2]) {
|
||||
* G_TYPE_FILE,
|
||||
* GDK_TYPE_PIXBUF,
|
||||
* }, 2);
|
||||
@@ -935,7 +935,7 @@ gtk_drop_target_get_formats (GtkDropTarget *self)
|
||||
* that can be dropped on the target
|
||||
* @n_types: number of @types
|
||||
*
|
||||
* Sets the supported `GType`s for this drop target.
|
||||
* Sets the supported `GTypes` for this drop target.
|
||||
*/
|
||||
void
|
||||
gtk_drop_target_set_gtypes (GtkDropTarget *self,
|
||||
|
||||
@@ -761,7 +761,7 @@ populate_emoji_chooser (gpointer data)
|
||||
now = g_get_monotonic_time ();
|
||||
if (now > start + 200) /* 2 ms */
|
||||
{
|
||||
gdk_profiler_add_mark (start * 1000, (now - start) * 1000, "Emojichooser populate", NULL);
|
||||
gdk_profiler_add_mark (start * 1000, (now - start) * 1000, "emojichooser", "populate");
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
}
|
||||
@@ -771,7 +771,7 @@ populate_emoji_chooser (gpointer data)
|
||||
chooser->box = NULL;
|
||||
chooser->populate_idle = 0;
|
||||
|
||||
gdk_profiler_end_mark (start, "Emojichooser populate (finish)", NULL);
|
||||
gdk_profiler_end_mark (start, "emojichooser", "populate (finish)");
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
@@ -44,15 +44,6 @@ void gtk_graphics_offload_set_child (GtkGraphicsOffload *
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
GtkWidget * gtk_graphics_offload_get_child (GtkGraphicsOffload *self);
|
||||
|
||||
/**
|
||||
* GtkGraphicsOffloadEnabled:
|
||||
* @GTK_GRAPHICS_OFFLOAD_ENABLED: Graphics offloading is enabled.
|
||||
* @GTK_GRAPHICS_OFFLOAD_DISABLED: Graphics offloading is disabled.
|
||||
*
|
||||
* Represents the state of graphics offlodading.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GTK_GRAPHICS_OFFLOAD_ENABLED,
|
||||
|
||||
+2
-2
@@ -2069,7 +2069,7 @@ ensure_valid_themes (GtkIconTheme *self,
|
||||
|
||||
load_themes (self);
|
||||
|
||||
gdk_profiler_end_mark (before, "Icon theme load", self->current_theme);
|
||||
gdk_profiler_end_mark (before, "icon theme load", self->current_theme);
|
||||
|
||||
if (was_valid)
|
||||
queue_theme_changed (self);
|
||||
@@ -3822,7 +3822,7 @@ icon_ensure_texture__locked (GtkIconPaintable *icon,
|
||||
/* Don't report quick (< 0.5 msec) parses */
|
||||
if (end - before > 500000 || !in_thread)
|
||||
{
|
||||
gdk_profiler_add_markf (before, (end - before), in_thread ? "Icon load (thread)" : "Icon load" ,
|
||||
gdk_profiler_add_markf (before, (end - before), in_thread ? "icon load (thread)" : "icon load" ,
|
||||
"%s size %d@%d", icon->filename, icon->desired_size, icon->desired_scale);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ init_compose_table_thread_cb (GTask *task,
|
||||
|
||||
g_task_return_boolean (task, TRUE);
|
||||
|
||||
gdk_profiler_end_mark (before, "Compose table load (thread)", NULL);
|
||||
gdk_profiler_end_mark (before, "im compose table load (thread)", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -117,6 +117,7 @@ gtk_list_item_change_release (GtkListItemChange *change,
|
||||
if (!g_hash_table_replace (change->deleted_items, gtk_list_item_base_get_item (GTK_LIST_ITEM_BASE (widget)), widget))
|
||||
{
|
||||
g_warning ("Duplicate item detected in list. Picking one randomly.");
|
||||
gtk_list_item_change_recycle (change, widget);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -967,26 +968,10 @@ gtk_list_item_manager_add_items (GtkListItemManager *self,
|
||||
|
||||
if (section != NULL && section->type == GTK_LIST_TILE_HEADER)
|
||||
{
|
||||
guint start, end;
|
||||
GtkListTile *footer = gtk_list_tile_get_footer (self, section);
|
||||
GtkListTile *previous_footer = gtk_list_tile_get_previous_skip (section);
|
||||
|
||||
gtk_section_model_get_section (GTK_SECTION_MODEL (self->model), position, &start, &end);
|
||||
|
||||
if (previous_footer != NULL && previous_footer->type == GTK_LIST_TILE_FOOTER &&
|
||||
position > start && position < end)
|
||||
{
|
||||
gtk_list_item_change_clear_header (change, §ion->widget);
|
||||
gtk_list_tile_set_type (section, GTK_LIST_TILE_REMOVED);
|
||||
gtk_list_tile_set_type (previous_footer, GTK_LIST_TILE_REMOVED);
|
||||
|
||||
section = gtk_list_tile_get_header (self, previous_footer);
|
||||
}
|
||||
|
||||
gtk_list_item_change_clear_header (change, §ion->widget);
|
||||
gtk_list_tile_set_type (section,
|
||||
GTK_LIST_TILE_UNMATCHED_HEADER);
|
||||
gtk_list_tile_set_type (footer,
|
||||
gtk_list_tile_set_type (gtk_list_tile_get_footer (self, section),
|
||||
GTK_LIST_TILE_UNMATCHED_FOOTER);
|
||||
}
|
||||
}
|
||||
@@ -1625,7 +1610,7 @@ gtk_list_item_manager_model_sections_changed_cb (GListModel *model,
|
||||
gtk_list_item_change_clear_header (&change, &header->widget);
|
||||
gtk_list_tile_set_type (header, GTK_LIST_TILE_UNMATCHED_HEADER);
|
||||
|
||||
n_items += offset;
|
||||
n_items -= MIN (n_items, position - offset);
|
||||
while (n_items > 0)
|
||||
{
|
||||
switch (tile->type)
|
||||
|
||||
+3
-3
@@ -549,7 +549,7 @@ do_post_parse_initialization (void)
|
||||
gsk_render_node_init_types ();
|
||||
_gtk_ensure_resources ();
|
||||
|
||||
gdk_profiler_end_mark (before, "Basic initialization", NULL);
|
||||
gdk_profiler_end_mark (before, "basic initialization", NULL);
|
||||
|
||||
gtk_initialized = TRUE;
|
||||
|
||||
@@ -559,13 +559,13 @@ do_post_parse_initialization (void)
|
||||
#endif
|
||||
gtk_im_modules_init ();
|
||||
gtk_media_file_extension_init ();
|
||||
gdk_profiler_end_mark (before, "Init modules", NULL);
|
||||
gdk_profiler_end_mark (before, "init modules", NULL);
|
||||
|
||||
before = GDK_PROFILER_CURRENT_TIME;
|
||||
display_manager = gdk_display_manager_get ();
|
||||
if (gdk_display_manager_get_default_display (display_manager) != NULL)
|
||||
default_display_notify_cb (display_manager);
|
||||
gdk_profiler_end_mark (before, "Create display", NULL);
|
||||
gdk_profiler_end_mark (before, "create display", NULL);
|
||||
|
||||
g_signal_connect (display_manager, "notify::default-display",
|
||||
G_CALLBACK (default_display_notify_cb),
|
||||
|
||||
+2
-2
@@ -11956,7 +11956,7 @@ gtk_widget_render (GtkWidget *widget,
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
{
|
||||
before_render = GDK_PROFILER_CURRENT_TIME;
|
||||
gdk_profiler_add_mark (before_snapshot, (before_render - before_snapshot), "Widget snapshot", "");
|
||||
gdk_profiler_add_mark (before_snapshot, (before_render - before_snapshot), "widget snapshot", "");
|
||||
}
|
||||
|
||||
if (root != NULL)
|
||||
@@ -11972,7 +11972,7 @@ gtk_widget_render (GtkWidget *widget,
|
||||
|
||||
gsk_render_node_unref (root);
|
||||
|
||||
gdk_profiler_end_mark (before_render, "Widget render", "");
|
||||
gdk_profiler_end_mark (before_render, "widget render", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+23
-27
@@ -2949,17 +2949,6 @@ unset_titlebar (GtkWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_window_is_composited (GtkWindow *window)
|
||||
{
|
||||
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
|
||||
GdkDisplay *display;
|
||||
|
||||
display = priv->display;
|
||||
|
||||
return gdk_display_is_rgba (display) && gdk_display_is_composited (display);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_window_supports_client_shadow (GtkWindow *window)
|
||||
{
|
||||
@@ -2968,7 +2957,22 @@ gtk_window_supports_client_shadow (GtkWindow *window)
|
||||
|
||||
display = priv->display;
|
||||
|
||||
return gdk_display_supports_shadow_width (display);
|
||||
if (!gdk_display_is_rgba (display))
|
||||
return FALSE;
|
||||
|
||||
if (!gdk_display_is_composited (display))
|
||||
return FALSE;
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (GDK_IS_X11_DISPLAY (display))
|
||||
{
|
||||
if (!gdk_x11_screen_supports_net_wm_hint (gdk_x11_display_get_screen (display),
|
||||
g_intern_static_string ("_GTK_FRAME_EXTENTS")))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2977,15 +2981,11 @@ gtk_window_enable_csd (GtkWindow *window)
|
||||
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
|
||||
GtkWidget *widget = GTK_WIDGET (window);
|
||||
|
||||
/* We need a visual with alpha for rounded corners */
|
||||
if (gtk_window_is_composited (window))
|
||||
{
|
||||
gtk_widget_add_css_class (widget, "csd");
|
||||
}
|
||||
/* We need a visual with alpha for client shadows */
|
||||
if (priv->use_client_shadow)
|
||||
gtk_widget_add_css_class (widget, "csd");
|
||||
else
|
||||
{
|
||||
gtk_widget_add_css_class (widget, "solid-csd");
|
||||
}
|
||||
gtk_widget_add_css_class (widget, "solid-csd");
|
||||
|
||||
priv->client_decorated = TRUE;
|
||||
}
|
||||
@@ -3044,8 +3044,8 @@ gtk_window_set_titlebar (GtkWindow *window,
|
||||
else
|
||||
{
|
||||
priv->use_client_shadow = gtk_window_supports_client_shadow (window);
|
||||
gtk_window_enable_csd (window);
|
||||
|
||||
gtk_window_enable_csd (window);
|
||||
priv->titlebar = titlebar;
|
||||
priv->title_box = titlebar;
|
||||
gtk_widget_insert_before (priv->title_box, widget, NULL);
|
||||
@@ -4298,9 +4298,9 @@ gtk_window_realize (GtkWidget *widget)
|
||||
/* Create default title bar */
|
||||
if (!priv->client_decorated && gtk_window_should_use_csd (window))
|
||||
{
|
||||
if (gtk_window_is_composited (window))
|
||||
priv->use_client_shadow = gtk_window_supports_client_shadow (window);
|
||||
if (priv->use_client_shadow)
|
||||
{
|
||||
priv->use_client_shadow = gtk_window_supports_client_shadow (window);
|
||||
gtk_window_enable_csd (window);
|
||||
|
||||
if (priv->title_box == NULL)
|
||||
@@ -4314,8 +4314,6 @@ gtk_window_realize (GtkWidget *widget)
|
||||
|
||||
update_window_actions (window);
|
||||
}
|
||||
else
|
||||
priv->use_client_shadow = FALSE;
|
||||
}
|
||||
|
||||
surface = gdk_surface_new_toplevel (gtk_widget_get_display (widget));
|
||||
@@ -4455,8 +4453,6 @@ gtk_window_unrealize (GtkWidget *widget)
|
||||
|
||||
gdk_surface_set_widget (surface, NULL);
|
||||
g_clear_pointer (&priv->surface, gdk_surface_destroy);
|
||||
|
||||
priv->use_client_shadow = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -447,9 +447,6 @@ drag_gesture_update_cb (GtkGestureDrag *gesture,
|
||||
p.x += native_x;
|
||||
p.y += native_y;
|
||||
|
||||
if (GTK_IS_WINDOW (native))
|
||||
gtk_window_unfullscreen (GTK_WINDOW (native));
|
||||
|
||||
surface = gtk_native_get_surface (native);
|
||||
if (GDK_IS_TOPLEVEL (surface))
|
||||
gdk_toplevel_begin_move (GDK_TOPLEVEL (surface),
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="verbose">
|
||||
<object class="GtkCheckButton" id="verboe">
|
||||
<property name="label">Verbose</property>
|
||||
<signal name="toggled" handler="flag_toggled"/>
|
||||
</object>
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#! /bin/sh
|
||||
|
||||
export LIBGL_ALWAYS_SOFTWARE=1
|
||||
export GDK_VULKAN_DEVICE=1
|
||||
|
||||
version=$(head -5 meson.build | grep version | sed -e "s/[^']*'//" -e "s/'.*$//")
|
||||
release_build_dir="release_build"
|
||||
branch=$(git branch --show-current)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
project('gtk', 'c',
|
||||
version: '4.13.7',
|
||||
version: '4.13.6',
|
||||
default_options: [
|
||||
'buildtype=debugoptimized',
|
||||
'warning_level=1',
|
||||
|
||||
@@ -115,15 +115,12 @@ gtk_gst_paintable_video_renderer_create_video_sink (GstPlayerVideoRenderer *rend
|
||||
GstPlayer *player)
|
||||
{
|
||||
GtkGstPaintable *self = GTK_GST_PAINTABLE (renderer);
|
||||
GdkDmabufFormats *dmabuf_formats;
|
||||
GstElement *sink;
|
||||
GdkGLContext *ctx;
|
||||
|
||||
dmabuf_formats = gdk_display_get_dmabuf_formats (gdk_display_get_default ());
|
||||
sink = g_object_new (GTK_TYPE_GST_SINK,
|
||||
"paintable", self,
|
||||
"gl-context", self->context,
|
||||
"dmabuf-formats", dmabuf_formats,
|
||||
NULL);
|
||||
|
||||
if (self->context != NULL)
|
||||
|
||||
+3
-160
@@ -52,16 +52,10 @@
|
||||
|
||||
#include <gst/gl/gstglfuncs.h>
|
||||
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
#include <drm_fourcc.h>
|
||||
#include <gst/allocators/gstdmabuf.h>
|
||||
#endif
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_PAINTABLE,
|
||||
PROP_GL_CONTEXT,
|
||||
PROP_DMABUF_FORMATS,
|
||||
|
||||
N_PROPS,
|
||||
};
|
||||
@@ -77,11 +71,7 @@ static GstStaticPadTemplate gtk_gst_sink_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
GST_VIDEO_DMA_DRM_CAPS_MAKE "; "
|
||||
#endif
|
||||
"video/x-raw(" GST_CAPS_FEATURE_MEMORY_GL_MEMORY "), "
|
||||
GST_STATIC_CAPS ("video/x-raw(" GST_CAPS_FEATURE_MEMORY_GL_MEMORY "), "
|
||||
"format = (string) RGBA, "
|
||||
"width = " GST_VIDEO_SIZE_RANGE ", "
|
||||
"height = " GST_VIDEO_SIZE_RANGE ", "
|
||||
@@ -126,42 +116,6 @@ gtk_gst_sink_get_times (GstBaseSink *bsink,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
static void
|
||||
add_drm_formats_and_modifiers (GstCaps *caps,
|
||||
GdkDmabufFormats *dmabuf_formats)
|
||||
{
|
||||
GValue dmabuf_list = G_VALUE_INIT;
|
||||
size_t i;
|
||||
|
||||
g_value_init (&dmabuf_list, GST_TYPE_LIST);
|
||||
|
||||
for (i = 0; i < gdk_dmabuf_formats_get_n_formats (dmabuf_formats); i++)
|
||||
{
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *drm_format_string;
|
||||
guint32 fmt;
|
||||
guint64 mod;
|
||||
|
||||
gdk_dmabuf_formats_get_format (dmabuf_formats, i, &fmt, &mod);
|
||||
|
||||
if (mod == DRM_FORMAT_MOD_INVALID)
|
||||
continue;
|
||||
|
||||
drm_format_string = gst_video_dma_drm_fourcc_to_string (fmt, mod);
|
||||
if (!drm_format_string)
|
||||
continue;
|
||||
|
||||
g_value_init (&value, G_TYPE_STRING);
|
||||
g_value_take_string (&value, drm_format_string);
|
||||
gst_value_list_append_and_take_value (&dmabuf_list, &value);
|
||||
}
|
||||
|
||||
gst_structure_take_value (gst_caps_get_structure (caps, 0), "drm-format",
|
||||
&dmabuf_list);
|
||||
}
|
||||
#endif
|
||||
|
||||
static GstCaps *
|
||||
gtk_gst_sink_get_caps (GstBaseSink *bsink,
|
||||
GstCaps *filter)
|
||||
@@ -173,13 +127,6 @@ gtk_gst_sink_get_caps (GstBaseSink *bsink,
|
||||
if (self->gst_context)
|
||||
{
|
||||
tmp = gst_pad_get_pad_template_caps (GST_BASE_SINK_PAD (bsink));
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
if (self->dmabuf_formats)
|
||||
{
|
||||
tmp = gst_caps_make_writable (tmp);
|
||||
add_drm_formats_and_modifiers (tmp, self->dmabuf_formats);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -212,24 +159,8 @@ gtk_gst_sink_set_caps (GstBaseSink *bsink,
|
||||
|
||||
GST_DEBUG_OBJECT (self, "set caps with %" GST_PTR_FORMAT, caps);
|
||||
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
if (gst_video_is_dma_drm_caps (caps)) {
|
||||
if (!gst_video_info_dma_drm_from_caps (&self->drm_info, caps))
|
||||
return FALSE;
|
||||
|
||||
if (!gst_video_info_dma_drm_to_video_info (&self->drm_info, &self->v_info))
|
||||
return FALSE;
|
||||
|
||||
GST_INFO_OBJECT (self, "using DMABuf, passthrough possible");
|
||||
} else {
|
||||
gst_video_info_dma_drm_init (&self->drm_info);
|
||||
#endif
|
||||
|
||||
if (!gst_video_info_from_caps (&self->v_info, caps))
|
||||
return FALSE;
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
}
|
||||
#endif
|
||||
if (!gst_video_info_from_caps (&self->v_info, caps))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -271,14 +202,6 @@ gtk_gst_sink_propose_allocation (GstBaseSink *bsink,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
if (gst_caps_features_contains (gst_caps_get_features (caps, 0), GST_CAPS_FEATURE_MEMORY_DMABUF))
|
||||
{
|
||||
gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!gst_caps_features_contains (gst_caps_get_features (caps, 0), GST_CAPS_FEATURE_MEMORY_GL_MEMORY))
|
||||
return FALSE;
|
||||
|
||||
@@ -364,66 +287,6 @@ gtk_gst_sink_texture_from_buffer (GtkGstSink *self,
|
||||
GstVideoFrame *frame = g_new (GstVideoFrame, 1);
|
||||
GdkTexture *texture;
|
||||
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
if (gst_is_dmabuf_memory (gst_buffer_peek_memory (buffer, 0)))
|
||||
{
|
||||
g_autoptr (GdkDmabufTextureBuilder) builder = NULL;
|
||||
const GstVideoMeta *vmeta = gst_buffer_get_video_meta (buffer);
|
||||
GError *error = NULL;
|
||||
int i;
|
||||
|
||||
/* We don't map dmabufs */
|
||||
g_clear_pointer (&frame, g_free);
|
||||
|
||||
g_return_val_if_fail (vmeta, NULL);
|
||||
g_return_val_if_fail (self->gdk_context, NULL);
|
||||
g_return_val_if_fail (self->drm_info.drm_fourcc != DRM_FORMAT_INVALID, NULL);
|
||||
|
||||
builder = gdk_dmabuf_texture_builder_new ();
|
||||
gdk_dmabuf_texture_builder_set_display (builder, gdk_gl_context_get_display (self->gdk_context));
|
||||
gdk_dmabuf_texture_builder_set_fourcc (builder, self->drm_info.drm_fourcc);
|
||||
gdk_dmabuf_texture_builder_set_modifier (builder, self->drm_info.drm_modifier);
|
||||
// Padded width/height is set into the vmeta, perhaps we should import using these ?
|
||||
gdk_dmabuf_texture_builder_set_width (builder, GST_VIDEO_INFO_WIDTH (&self->v_info));
|
||||
gdk_dmabuf_texture_builder_set_height (builder, GST_VIDEO_INFO_HEIGHT (&self->v_info));
|
||||
gdk_dmabuf_texture_builder_set_n_planes (builder, vmeta->n_planes);
|
||||
|
||||
for (i = 0; i < vmeta->n_planes; i++)
|
||||
{
|
||||
GstMemory *mem;
|
||||
guint mem_idx, length;
|
||||
gsize skip;
|
||||
|
||||
if (!gst_buffer_find_memory (buffer,
|
||||
vmeta->offset[i],
|
||||
1,
|
||||
&mem_idx,
|
||||
&length,
|
||||
&skip))
|
||||
{
|
||||
GST_ERROR_OBJECT (self, "Buffer data is bogus");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
mem = gst_buffer_peek_memory (buffer, mem_idx);
|
||||
|
||||
gdk_dmabuf_texture_builder_set_fd (builder, i, gst_dmabuf_memory_get_fd (mem));
|
||||
gdk_dmabuf_texture_builder_set_offset (builder, i, mem->offset + skip);
|
||||
gdk_dmabuf_texture_builder_set_stride (builder, i, vmeta->stride[i]);
|
||||
}
|
||||
|
||||
texture = gdk_dmabuf_texture_builder_build (builder,
|
||||
(GDestroyNotify) gst_buffer_unref,
|
||||
gst_buffer_ref (buffer),
|
||||
&error);
|
||||
if (!texture)
|
||||
GST_ERROR_OBJECT (self, "Failed to create dmabuf texture: %s", error->message);
|
||||
|
||||
*pixel_aspect_ratio = ((double) GST_VIDEO_INFO_PAR_N (&self->v_info) /
|
||||
(double) GST_VIDEO_INFO_PAR_D (&self->v_info));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (self->gdk_context &&
|
||||
gst_video_frame_map (frame, &self->v_info, buffer, GST_MAP_READ | GST_MAP_GL))
|
||||
{
|
||||
@@ -730,10 +593,6 @@ gtk_gst_sink_set_property (GObject *object,
|
||||
g_clear_object (&self->gdk_context);
|
||||
break;
|
||||
|
||||
case PROP_DMABUF_FORMATS:
|
||||
self->dmabuf_formats = g_value_get_boxed (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@@ -756,9 +615,6 @@ gtk_gst_sink_get_property (GObject *object,
|
||||
case PROP_GL_CONTEXT:
|
||||
g_value_set_object (value, self->gdk_context);
|
||||
break;
|
||||
case PROP_DMABUF_FORMATS:
|
||||
g_value_set_boxed (value, self->dmabuf_formats);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
@@ -819,19 +675,6 @@ gtk_gst_sink_class_init (GtkGstSinkClass * klass)
|
||||
GDK_TYPE_GL_CONTEXT,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* GtkGstSink:dmabuf-formats:
|
||||
*
|
||||
* The #GdkDmabufFormats that are supported by the #GdkDisplay and can be used
|
||||
* with #GdkDmabufTextureBuilder.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
properties[PROP_DMABUF_FORMATS] =
|
||||
g_param_spec_boxed ("dmabuf-formats", NULL, NULL,
|
||||
GDK_TYPE_DMABUF_FORMATS,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_properties (gobject_class, N_PROPS, properties);
|
||||
|
||||
gst_element_class_set_metadata (gstelement_class,
|
||||
|
||||
@@ -47,16 +47,11 @@ struct _GtkGstSink
|
||||
GstVideoSink parent;
|
||||
|
||||
GstVideoInfo v_info;
|
||||
#ifdef HAVE_GSTREAMER_DRM
|
||||
GstVideoInfoDmaDrm drm_info;
|
||||
#endif
|
||||
|
||||
GtkGstPaintable * paintable;
|
||||
GdkGLContext * gdk_context;
|
||||
GstGLDisplay * gst_display;
|
||||
GstGLContext * gst_gdk_context;
|
||||
GstGLContext * gst_context;
|
||||
GdkDmabufFormats * dmabuf_formats;
|
||||
};
|
||||
|
||||
struct _GtkGstSinkClass
|
||||
|
||||
@@ -43,8 +43,6 @@ gstplayer_dep = dependency('gstreamer-player-1.0', version: '>= 1.12.3',
|
||||
required: get_option('media-gstreamer'))
|
||||
gstgl_dep = dependency('gstreamer-gl-1.0', version: '>= 1.12.3',
|
||||
required: get_option('media-gstreamer'))
|
||||
gstdrm_dep = dependency('gstreamer-allocators-1.0', version: '>= 1.23',
|
||||
required: false)
|
||||
|
||||
if gstplayer_dep.found() and gstgl_dep.found()
|
||||
extra_win_cflags = []
|
||||
@@ -56,13 +54,6 @@ if gstplayer_dep.found() and gstgl_dep.found()
|
||||
|
||||
media_backends += 'gstreamer'
|
||||
cdata.set('HAVE_GSTREAMER', 1)
|
||||
media_gst_deps = [ libm, libgtk_dep, gstplayer_dep, gstgl_dep ]
|
||||
|
||||
if dmabuf_dep.found() and gstdrm_dep.found()
|
||||
cdata.set('HAVE_GSTREAMER_DRM', 1)
|
||||
media_gst_deps += [ gstdrm_dep ]
|
||||
endif
|
||||
|
||||
shared_module('media-gstreamer',
|
||||
sources: [
|
||||
'gtkgstmediafile.c',
|
||||
@@ -70,7 +61,7 @@ if gstplayer_dep.found() and gstgl_dep.found()
|
||||
'gtkgstsink.c',
|
||||
],
|
||||
c_args: extra_c_args + extra_win_cflags,
|
||||
dependencies: media_gst_deps,
|
||||
dependencies: [ libm, libgtk_dep, gstplayer_dep, gstgl_dep ],
|
||||
name_suffix: module_suffix,
|
||||
install_dir: media_install_dir,
|
||||
install: true,
|
||||
|
||||
@@ -22,9 +22,9 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2023-11-18 03:13+0000\n"
|
||||
"POT-Creation-Date: 2023-09-19 01:36+0000\n"
|
||||
"PO-Revision-Date: 2023-09-19 18:38+0200\n"
|
||||
"Last-Translator: AesirIvy <aesir.ivy@gmx.com>\n"
|
||||
"Last-Translator: Guillaume Bernard <associations@guillaume-bernard.fr>\n"
|
||||
"Language-Team: GNOME French Team <gnomefr@traduc.org>\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -61,59 +61,59 @@ msgstr "Impossible de fournir le contenu comme « %s »"
|
||||
msgid "Cannot provide contents as %s"
|
||||
msgstr "Impossible de fournir le contenu comme %s"
|
||||
|
||||
#: gdk/gdkdisplay.c:156 gdk/gdkglcontext.c:443
|
||||
#: gdk/gdkdisplay.c:156 gdk/gdkglcontext.c:442
|
||||
msgid "The current backend does not support OpenGL"
|
||||
msgstr "Le moteur actuel ne gère pas OpenGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1244 gdk/gdksurface.c:1252
|
||||
#: gdk/gdkdisplay.c:1245 gdk/gdksurface.c:1252
|
||||
msgid "Vulkan support disabled via GDK_DEBUG"
|
||||
msgstr "Prise en charge de Vulkan désactivée via GDK_DEBUG"
|
||||
|
||||
#: gdk/gdkdisplay.c:1276
|
||||
#: gdk/gdkdisplay.c:1277
|
||||
msgid "GL support disabled via GDK_DEBUG"
|
||||
msgstr "Prise en charge de GL désactivée via GDK_DEBUG"
|
||||
|
||||
#: gdk/gdkdisplay.c:1574
|
||||
#: gdk/gdkdisplay.c:1575
|
||||
msgid "No EGL configuration available"
|
||||
msgstr "Aucune configuration EGL disponible"
|
||||
|
||||
#: gdk/gdkdisplay.c:1582
|
||||
#: gdk/gdkdisplay.c:1583
|
||||
msgid "Failed to get EGL configurations"
|
||||
msgstr "Impossible d’obtenir les configurations EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1612
|
||||
#: gdk/gdkdisplay.c:1613
|
||||
msgid "No EGL configuration with required features found"
|
||||
msgstr ""
|
||||
"Aucune configuration EGL avec les fonctionnalités requises n’a été trouvée"
|
||||
|
||||
#: gdk/gdkdisplay.c:1619
|
||||
#: gdk/gdkdisplay.c:1620
|
||||
msgid "No perfect EGL configuration found"
|
||||
msgstr "Aucune configuration EGL idéale trouvée"
|
||||
|
||||
#: gdk/gdkdisplay.c:1661
|
||||
#: gdk/gdkdisplay.c:1662
|
||||
#, c-format
|
||||
msgid "EGL implementation is missing extension %s"
|
||||
msgid_plural "EGL implementation is missing %2$d extensions: %1$s"
|
||||
msgstr[0] "L’extension %s manque dans l’implémentation EGL"
|
||||
msgstr[1] "%2$d extensions manquent dans l’implémentation EGL : %1$s"
|
||||
|
||||
#: gdk/gdkdisplay.c:1694
|
||||
#: gdk/gdkdisplay.c:1695
|
||||
msgid "libEGL not available in this sandbox"
|
||||
msgstr "libEGL n’est pas disponible dans ce bac à sable"
|
||||
|
||||
#: gdk/gdkdisplay.c:1695
|
||||
#: gdk/gdkdisplay.c:1696
|
||||
msgid "libEGL not available"
|
||||
msgstr "libEGL non disponible"
|
||||
|
||||
#: gdk/gdkdisplay.c:1705
|
||||
#: gdk/gdkdisplay.c:1706
|
||||
msgid "Failed to create EGL display"
|
||||
msgstr "Impossible de créer l’affichage EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1715
|
||||
#: gdk/gdkdisplay.c:1716
|
||||
msgid "Could not initialize EGL display"
|
||||
msgstr "Impossible d’initialiser l’affichage EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1726
|
||||
#: gdk/gdkdisplay.c:1727
|
||||
#, c-format
|
||||
msgid "EGL version %d.%d is too old. GTK requires %d.%d"
|
||||
msgstr "La version %d.%d d’EGL est trop ancienne. GTK requiert %d.%d"
|
||||
@@ -127,33 +127,33 @@ msgstr ""
|
||||
msgid "No compatible formats to transfer contents."
|
||||
msgstr "Aucun format compatible pour le transfert du contenu."
|
||||
|
||||
#: gdk/gdkglcontext.c:402 gdk/x11/gdkglcontext-glx.c:642
|
||||
#: gdk/gdkglcontext.c:401 gdk/x11/gdkglcontext-glx.c:642
|
||||
msgid "No GL API allowed."
|
||||
msgstr "Aucune API GL autorisée."
|
||||
|
||||
#: gdk/gdkglcontext.c:426 gdk/win32/gdkglcontext-win32-wgl.c:387
|
||||
#: gdk/gdkglcontext.c:425 gdk/win32/gdkglcontext-win32-wgl.c:387
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:530
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:574 gdk/x11/gdkglcontext-glx.c:691
|
||||
msgid "Unable to create a GL context"
|
||||
msgstr "Impossible de créer un contexte GL"
|
||||
|
||||
#: gdk/gdkglcontext.c:1281
|
||||
#: gdk/gdkglcontext.c:1280
|
||||
msgid "Anything but OpenGL ES disabled via GDK_DEBUG"
|
||||
msgstr "Tout sauf OpenGL ES est désactivé via GTK_DEBUG"
|
||||
|
||||
#: gdk/gdkglcontext.c:1290
|
||||
#: gdk/gdkglcontext.c:1289
|
||||
#, c-format
|
||||
msgid "Application does not support %s API"
|
||||
msgstr "L’application ne prend pas en charge l’API %s"
|
||||
|
||||
#. translators: This is about OpenGL backend names, like
|
||||
#. * "Trying to use X11 GLX, but EGL is already in use"
|
||||
#: gdk/gdkglcontext.c:1899
|
||||
#: gdk/gdkglcontext.c:1864
|
||||
#, c-format
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "Tentative d’utilisation de %s, mais %s est déjà utilisé"
|
||||
|
||||
#: gdk/gdktexture.c:530
|
||||
#: gdk/gdktexture.c:528
|
||||
msgid "Unknown image format."
|
||||
msgstr "Format d’image inconnu."
|
||||
|
||||
@@ -752,7 +752,8 @@ msgstr "Aucune implémentation GL disponible"
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:396
|
||||
#, c-format
|
||||
msgid "WGL version %d.%d is too low, need at least %d.%d"
|
||||
msgstr "La version %d.%d d’EGL est trop basse, elle doit être au moins à %d.%d"
|
||||
msgstr ""
|
||||
"La version %d.%d d’EGL est trop basse, elle doit être au moins à %d.%d"
|
||||
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:414
|
||||
#, c-format
|
||||
@@ -1083,18 +1084,18 @@ msgctxt "progress bar label"
|
||||
msgid "%d %%"
|
||||
msgstr "%d %%"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:183 gtk/deprecated/gtkcolorbutton.c:314
|
||||
#: gtk/deprecated/gtkcolorbutton.c:183 gtk/deprecated/gtkcolorbutton.c:311
|
||||
#: gtk/gtkcolordialog.c:411
|
||||
msgid "Pick a Color"
|
||||
msgstr "Choisissez une couleur"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:505 gtk/gtkcolorchooserwidget.c:313
|
||||
#: gtk/deprecated/gtkcolorbutton.c:502 gtk/gtkcolorchooserwidget.c:313
|
||||
#: gtk/gtkcolordialogbutton.c:335
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%, Alpha %d%%"
|
||||
msgstr "Rouge %d%%, Vert %d%%, Bleu %d%%, Alpha %d%%"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:511 gtk/gtkcolorchooserwidget.c:319
|
||||
#: gtk/deprecated/gtkcolorbutton.c:508 gtk/gtkcolorchooserwidget.c:319
|
||||
#: gtk/gtkcolordialogbutton.c:341
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%"
|
||||
@@ -1104,17 +1105,17 @@ msgstr "Rouge %d%%, Vert %d%%, Bleu %d%%"
|
||||
msgid "Sans 12"
|
||||
msgstr "Sans 12"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:507 gtk/deprecated/gtkfontbutton.c:624
|
||||
#: gtk/deprecated/gtkfontbutton.c:507 gtk/deprecated/gtkfontbutton.c:621
|
||||
#: gtk/gtkfontdialog.c:596
|
||||
msgid "Pick a Font"
|
||||
msgstr "Choisissez une police"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:600 gtk/gtkfilechooserwidget.c:3871
|
||||
#: gtk/deprecated/gtkfontbutton.c:597 gtk/gtkfilechooserwidget.c:3871
|
||||
#: gtk/gtkfontdialogbutton.c:126 gtk/inspector/visual.ui:169
|
||||
msgid "Font"
|
||||
msgstr "Police"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:1155 gtk/gtkfontdialogbutton.c:652
|
||||
#: gtk/deprecated/gtkfontbutton.c:1152 gtk/gtkfontdialogbutton.c:652
|
||||
msgctxt "font"
|
||||
msgid "None"
|
||||
msgstr "Aucune"
|
||||
@@ -2178,7 +2179,7 @@ msgstr "_Droite :"
|
||||
msgid "Paper Margins"
|
||||
msgstr "Marges du papier"
|
||||
|
||||
#: gtk/gtkentry.c:3685
|
||||
#: gtk/gtkentry.c:3673
|
||||
msgid "Insert Emoji"
|
||||
msgstr "Insérer un émoji"
|
||||
|
||||
@@ -2248,7 +2249,7 @@ msgstr "Un fichier avec ce nom existe déjà"
|
||||
#: gtk/gtkmessagedialog.c:179 gtk/gtkmountoperation.c:608
|
||||
#: gtk/print/gtkpagesetupunixdialog.c:282 gtk/print/gtkprintbackend.c:638
|
||||
#: gtk/print/gtkprintunixdialog.c:682 gtk/print/gtkprintunixdialog.c:839
|
||||
#: gtk/gtkwindow.c:6233 gtk/ui/gtkappchooserdialog.ui:48
|
||||
#: gtk/gtkwindow.c:6242 gtk/ui/gtkappchooserdialog.ui:48
|
||||
#: gtk/ui/gtkassistant.ui:52 gtk/ui/gtkcolorchooserdialog.ui:36
|
||||
#: gtk/ui/gtkfontchooserdialog.ui:27
|
||||
msgid "_Cancel"
|
||||
@@ -2338,7 +2339,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "Si vous supprimez un élément, il sera définitivement perdu."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1185 gtk/gtkfilechooserwidget.c:1815
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6147 gtk/gtktextview.c:9018
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6145 gtk/gtktextview.c:9018
|
||||
msgid "_Delete"
|
||||
msgstr "_Supprimer"
|
||||
|
||||
@@ -2464,7 +2465,6 @@ msgid "Yesterday"
|
||||
msgstr "Hier"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3823
|
||||
#, c-format
|
||||
msgid "%-e %b"
|
||||
msgstr "%-e %b"
|
||||
|
||||
@@ -2677,19 +2677,19 @@ msgstr "Fermer"
|
||||
msgid "Close the infobar"
|
||||
msgstr "Fermer la barre d’information"
|
||||
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6135 gtk/gtktextview.c:9006
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6133 gtk/gtktextview.c:9006
|
||||
msgid "Cu_t"
|
||||
msgstr "Co_uper"
|
||||
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6139 gtk/gtktextview.c:9010
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6137 gtk/gtktextview.c:9010
|
||||
msgid "_Copy"
|
||||
msgstr "_Copier"
|
||||
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6143 gtk/gtktextview.c:9014
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6141 gtk/gtktextview.c:9014
|
||||
msgid "_Paste"
|
||||
msgstr "C_oller"
|
||||
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6156 gtk/gtktextview.c:9039
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6154 gtk/gtktextview.c:9039
|
||||
msgid "Select _All"
|
||||
msgstr "_Tout sélectionner"
|
||||
|
||||
@@ -2772,7 +2772,7 @@ msgid "Play"
|
||||
msgstr "Lecture"
|
||||
|
||||
#: gtk/gtkmessagedialog.c:162 gtk/gtkmessagedialog.c:180
|
||||
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6234
|
||||
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6243
|
||||
msgid "_OK"
|
||||
msgstr "_Valider"
|
||||
|
||||
@@ -3377,8 +3377,8 @@ msgstr ""
|
||||
|
||||
#. window
|
||||
#: gtk/print/gtkprintoperation-portal.c:264
|
||||
#: gtk/print/gtkprintoperation-portal.c:594
|
||||
#: gtk/print/gtkprintoperation-portal.c:663 gtk/print/gtkprintunixdialog.c:3008
|
||||
#: gtk/print/gtkprintoperation-portal.c:584
|
||||
#: gtk/print/gtkprintoperation-portal.c:653 gtk/print/gtkprintunixdialog.c:3008
|
||||
msgid "Print"
|
||||
msgstr "Imprimer"
|
||||
|
||||
@@ -3553,7 +3553,7 @@ msgstr ""
|
||||
"Impossible de trouver une application enregistrée sous le nom « %s » pour "
|
||||
"l’élément dont l’URI est « %s »"
|
||||
|
||||
#: gtk/gtksearchentry.c:767
|
||||
#: gtk/gtksearchentry.c:758
|
||||
msgid "Clear Entry"
|
||||
msgstr "Efface la saisie"
|
||||
|
||||
@@ -3644,7 +3644,7 @@ msgctxt "accessibility"
|
||||
msgid "Sidebar"
|
||||
msgstr "Panneau latéral"
|
||||
|
||||
#: gtk/gtktext.c:6161 gtk/gtktextview.c:9044
|
||||
#: gtk/gtktext.c:6159 gtk/gtktextview.c:9044
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "Insérer un _émoji"
|
||||
|
||||
@@ -3656,12 +3656,12 @@ msgstr "Ann_uler"
|
||||
msgid "_Redo"
|
||||
msgstr "_Rétablir"
|
||||
|
||||
#: gtk/gtkwindow.c:6222
|
||||
#: gtk/gtkwindow.c:6231
|
||||
#, c-format
|
||||
msgid "Do you want to use GTK Inspector?"
|
||||
msgstr "Voulez-vous utiliser l’Inspecteur GTK ?"
|
||||
|
||||
#: gtk/gtkwindow.c:6224
|
||||
#: gtk/gtkwindow.c:6233
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK Inspector is an interactive debugger that lets you explore and modify "
|
||||
@@ -3672,7 +3672,7 @@ msgstr ""
|
||||
"modifier les éléments internes de toute application GTK. Son utilisation "
|
||||
"peut causer une interruption ou un plantage de l’application."
|
||||
|
||||
#: gtk/gtkwindow.c:6229
|
||||
#: gtk/gtkwindow.c:6238
|
||||
msgid "Don’t show this message again"
|
||||
msgstr "Ne plus afficher ce message"
|
||||
|
||||
@@ -4024,8 +4024,8 @@ msgid "Surface"
|
||||
msgstr "Surface"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:365 gtk/inspector/misc-info.ui:400
|
||||
#: gtk/inspector/misc-info.ui:435 gtk/inspector/prop-editor.c:1153
|
||||
#: gtk/inspector/prop-editor.c:1536 gtk/inspector/window.ui:396
|
||||
#: gtk/inspector/misc-info.ui:435 gtk/inspector/prop-editor.c:1150
|
||||
#: gtk/inspector/prop-editor.c:1533 gtk/inspector/window.ui:396
|
||||
msgid "Properties"
|
||||
msgstr "Propriétés"
|
||||
|
||||
@@ -4077,7 +4077,7 @@ msgstr "Pointeur : %p"
|
||||
#. Translators: %s is a type name, for example
|
||||
#. * GtkPropertyExpression with value \"2.5\"
|
||||
#.
|
||||
#: gtk/inspector/prop-editor.c:827
|
||||
#: gtk/inspector/prop-editor.c:824
|
||||
#, c-format
|
||||
msgid "%s with value \"%s\""
|
||||
msgstr "%s avec valeur « %s »"
|
||||
@@ -4085,7 +4085,7 @@ msgstr "%s avec valeur « %s »"
|
||||
#. Translators: Both %s are type names, for example
|
||||
#. * GtkPropertyExpression with type GObject
|
||||
#.
|
||||
#: gtk/inspector/prop-editor.c:838
|
||||
#: gtk/inspector/prop-editor.c:835
|
||||
#, c-format
|
||||
msgid "%s with type %s"
|
||||
msgstr "%s de type %s"
|
||||
@@ -4093,7 +4093,7 @@ msgstr "%s de type %s"
|
||||
#. Translators: Both %s are type names, for example
|
||||
#. * GtkObjectExpression for GtkStringObject 0x23456789
|
||||
#.
|
||||
#: gtk/inspector/prop-editor.c:851
|
||||
#: gtk/inspector/prop-editor.c:848
|
||||
#, c-format
|
||||
msgid "%s for %s %p"
|
||||
msgstr "%s pour %s %p"
|
||||
@@ -4101,71 +4101,71 @@ msgstr "%s pour %s %p"
|
||||
#. Translators: Both %s are type names, for example
|
||||
#. * GtkPropertyExpression with value type: gchararray
|
||||
#.
|
||||
#: gtk/inspector/prop-editor.c:881
|
||||
#: gtk/inspector/prop-editor.c:878
|
||||
#, c-format
|
||||
msgid "%s with value type %s"
|
||||
msgstr "%s avec type de valeur %s"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1230
|
||||
#: gtk/inspector/prop-editor.c:1227
|
||||
#, c-format
|
||||
msgid "Uneditable property type: %s"
|
||||
msgstr "Type de propriété non éditable : %s"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1388
|
||||
#: gtk/inspector/prop-editor.c:1385
|
||||
msgctxt "column number"
|
||||
msgid "None"
|
||||
msgstr "Aucun"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1425
|
||||
#: gtk/inspector/prop-editor.c:1422
|
||||
msgid "Attribute:"
|
||||
msgstr "Attribut :"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1428
|
||||
#: gtk/inspector/prop-editor.c:1425
|
||||
msgid "Model"
|
||||
msgstr "Modèle"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1433
|
||||
#: gtk/inspector/prop-editor.c:1430
|
||||
msgid "Column:"
|
||||
msgstr "Colonne :"
|
||||
|
||||
#. Translators: %s is a type name, for example
|
||||
#. * Action from 0x2345678 (GtkApplicationWindow)
|
||||
#.
|
||||
#: gtk/inspector/prop-editor.c:1532
|
||||
#: gtk/inspector/prop-editor.c:1529
|
||||
#, c-format
|
||||
msgid "Action from: %p (%s)"
|
||||
msgstr "Action de : %p (%s)"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1587
|
||||
#: gtk/inspector/prop-editor.c:1584
|
||||
msgid "Reset"
|
||||
msgstr "Réinitialiser"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1595
|
||||
#: gtk/inspector/prop-editor.c:1592
|
||||
msgctxt "GtkSettings source"
|
||||
msgid "Default"
|
||||
msgstr "Par défaut"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1598
|
||||
#: gtk/inspector/prop-editor.c:1595
|
||||
msgctxt "GtkSettings source"
|
||||
msgid "Theme"
|
||||
msgstr "Thème"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1601
|
||||
#: gtk/inspector/prop-editor.c:1598
|
||||
msgctxt "GtkSettings source"
|
||||
msgid "XSettings"
|
||||
msgstr "Paramètres X"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1605
|
||||
#: gtk/inspector/prop-editor.c:1602
|
||||
msgctxt "GtkSettings source"
|
||||
msgid "Application"
|
||||
msgstr "Application"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1608
|
||||
#: gtk/inspector/prop-editor.c:1605
|
||||
msgctxt "GtkSettings source"
|
||||
msgid "Unknown"
|
||||
msgstr "Inconnue"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1611
|
||||
#: gtk/inspector/prop-editor.c:1608
|
||||
msgid "Source:"
|
||||
msgstr "Source :"
|
||||
|
||||
@@ -7228,7 +7228,7 @@ msgstr ""
|
||||
#: tools/gtk-builder-tool-enumerate.c:56 tools/gtk-builder-tool-preview.c:179
|
||||
#: tools/gtk-builder-tool-preview.c:180 tools/gtk-builder-tool-screenshot.c:360
|
||||
#: tools/gtk-builder-tool-simplify.c:2529 tools/gtk-builder-tool-validate.c:261
|
||||
#: tools/gtk-rendernode-tool-info.c:202 tools/gtk-rendernode-tool-show.c:106
|
||||
#: tools/gtk-rendernode-tool-info.c:200 tools/gtk-rendernode-tool-show.c:102
|
||||
msgid "FILE"
|
||||
msgstr "FICHIER"
|
||||
|
||||
@@ -7260,7 +7260,7 @@ msgid "Use style from CSS file"
|
||||
msgstr "Utiliser le style d’un fichier CSS"
|
||||
|
||||
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-show.c:113
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-show.c:109
|
||||
#: tools/gtk-rendernode-tool-render.c:204
|
||||
#, c-format
|
||||
msgid "Could not initialize windowing system\n"
|
||||
@@ -7515,50 +7515,47 @@ msgstr ""
|
||||
" render Prendre une capture d’écran du nœud\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:179
|
||||
#: tools/gtk-rendernode-tool-info.c:177
|
||||
#, c-format
|
||||
msgid "Number of nodes: %u\n"
|
||||
msgstr "Nombre de nœuds : %u\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:186
|
||||
#: tools/gtk-rendernode-tool-info.c:184
|
||||
#, c-format
|
||||
msgid "Depth: %u\n"
|
||||
msgstr "Profondeur : %u\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:189
|
||||
#: tools/gtk-rendernode-tool-info.c:187
|
||||
#, c-format
|
||||
msgid "Bounds: %g x %g\n"
|
||||
msgstr "Limites : %g × %g\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:190
|
||||
#: tools/gtk-rendernode-tool-info.c:188
|
||||
#, c-format
|
||||
msgid "Origin: %g %g\n"
|
||||
msgstr "Origine : %g %g\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:211
|
||||
#: tools/gtk-rendernode-tool-info.c:209
|
||||
msgid "Provide information about the render node."
|
||||
msgstr "Fournir des informations sur le nœud de rendu."
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:224 tools/gtk-rendernode-tool-show.c:134
|
||||
#: tools/gtk-rendernode-tool-info.c:222 tools/gtk-rendernode-tool-show.c:130
|
||||
#: tools/gtk-rendernode-tool-render.c:225
|
||||
#, c-format
|
||||
msgid "No .node file specified\n"
|
||||
msgstr "Aucun fichier .node indiqué\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:230
|
||||
#: tools/gtk-rendernode-tool-info.c:228
|
||||
#, c-format
|
||||
msgid "Can only accept a single .node file\n"
|
||||
msgstr "N’accepte qu’un unique fichier .node\n"
|
||||
msgstr ""
|
||||
"N’accepte qu’un unique fichier .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:105
|
||||
msgid "Don't add a titlebar"
|
||||
msgstr "Ne pas ajouter de barre de titre"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:121
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "Afficher le nœud de rendu."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:140
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "Ne peut afficher l’aperçu que d’un unique fichier .node\n"
|
||||
@@ -7593,19 +7590,14 @@ msgstr "Réaliser le rendu du fichier .node vers une image."
|
||||
#, c-format
|
||||
msgid "Can only render a single .node file to a single output file\n"
|
||||
msgstr ""
|
||||
"Ne peut effectuer le rendu que d’un unique fichier .node vers un seul "
|
||||
"fichier de sortie\n"
|
||||
"Ne peut effectuer le rendu que d’un unique fichier .node vers un seul fichier "
|
||||
"de sortie\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:51
|
||||
#, c-format
|
||||
msgid "Error at %s: %s\n"
|
||||
msgstr "Erreur à %s : %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:69
|
||||
#, c-format
|
||||
msgid "Failed to load node file: %s\n"
|
||||
msgstr "Impossible de charger le fichier de nœud : %s\n"
|
||||
|
||||
#: tools/updateiconcache.c:1391
|
||||
#, c-format
|
||||
msgid "Failed to write header\n"
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
# Gil Osher <dolfin@rpg.org.il>, 2004.
|
||||
# Yair Hershkovitz <yairhr@gmail.com>, 2006.
|
||||
# Yaron Shahrabani <sh.yaron@gmail.com>, 2011, 2012.
|
||||
# Yosef Or Boczko <yoseforb@gmail.com>, 2013-2024.
|
||||
# Yosef Or Boczko <yoseforb@gmail.com>, 2013-2023.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk+.HEAD.he\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2024-01-22 13:47+0000\n"
|
||||
"PO-Revision-Date: 2024-01-25 13:34+0200\n"
|
||||
"Last-Translator: Yosef Or Boczko <yoseforb@gmail.com>\n"
|
||||
"Language-Team: Hebrew\n"
|
||||
"POT-Creation-Date: 2023-12-27 22:15+0000\n"
|
||||
"PO-Revision-Date: 2023-12-28 13:40+0200\n"
|
||||
"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
|
||||
"Language-Team: Hebrew <yoseforb@gmail.com>\n"
|
||||
"Language: he\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n==2 ? 1 : n>10 && n%10==0 ? "
|
||||
"2 : 3)\n"
|
||||
"X-Generator: Gtranslator 45.3\n"
|
||||
"2 : 3);\n"
|
||||
"X-Generator: Poedit 3.4.1\n"
|
||||
"X-Project-Style: default\n"
|
||||
|
||||
#: gdk/broadway/gdkbroadway-server.c:135
|
||||
@@ -34,11 +34,11 @@ msgstr "סוג תצוגת ה־broadway אינה נתמכת: %s"
|
||||
msgid "This clipboard cannot store data."
|
||||
msgstr "לוח גזירים זה לא יכול לאחסן נתונים."
|
||||
|
||||
#: gdk/gdkclipboard.c:287 gdk/gdkclipboard.c:786 gdk/gdkclipboard.c:1086
|
||||
#: gdk/gdkclipboard.c:287 gdk/gdkclipboard.c:785 gdk/gdkclipboard.c:1085
|
||||
msgid "Cannot read from empty clipboard."
|
||||
msgstr "אי אפשר לקרוא מלוח גזירים ריק."
|
||||
|
||||
#: gdk/gdkclipboard.c:318 gdk/gdkclipboard.c:1136 gdk/gdkdrag.c:618
|
||||
#: gdk/gdkclipboard.c:318 gdk/gdkclipboard.c:1135 gdk/gdkdrag.c:618
|
||||
msgid "No compatible formats to transfer clipboard contents."
|
||||
msgstr "אין תצורות תואמות להעברת תכני לוח גזירים."
|
||||
|
||||
@@ -57,31 +57,31 @@ msgstr "לא ניתן לספק תוכן בתור %s"
|
||||
msgid "The current backend does not support OpenGL"
|
||||
msgstr "המנשק הנוכחי אינו תומך ב־OpenGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1296 gdk/gdkvulkancontext.c:1581
|
||||
#: gdk/gdkdisplay.c:1278 gdk/gdksurface.c:1268 gdk/gdkvulkancontext.c:1479
|
||||
msgid "Vulkan support disabled via GDK_DEBUG"
|
||||
msgstr "התמיכה ב־Vulkan מושבתת דרך GDK_DEBUG"
|
||||
|
||||
#: gdk/gdkdisplay.c:1350
|
||||
#: gdk/gdkdisplay.c:1310
|
||||
msgid "GL support disabled via GDK_DEBUG"
|
||||
msgstr "התמיכה ב־GL הושבתה דרך GDK_DEBUG"
|
||||
|
||||
#: gdk/gdkdisplay.c:1646
|
||||
#: gdk/gdkdisplay.c:1606
|
||||
msgid "No EGL configuration available"
|
||||
msgstr "אין תצורת EGL זמינה"
|
||||
|
||||
#: gdk/gdkdisplay.c:1654
|
||||
#: gdk/gdkdisplay.c:1614
|
||||
msgid "Failed to get EGL configurations"
|
||||
msgstr "קבלת תצורות EGL נכשלה"
|
||||
|
||||
#: gdk/gdkdisplay.c:1684
|
||||
#: gdk/gdkdisplay.c:1644
|
||||
msgid "No EGL configuration with required features found"
|
||||
msgstr "לא נמצאה תצורת EGL עם היכולות הנדרשות"
|
||||
|
||||
#: gdk/gdkdisplay.c:1691
|
||||
#: gdk/gdkdisplay.c:1651
|
||||
msgid "No perfect EGL configuration found"
|
||||
msgstr "לא נמצאה תצורת EGL מושלמת"
|
||||
|
||||
#: gdk/gdkdisplay.c:1733
|
||||
#: gdk/gdkdisplay.c:1693
|
||||
#, c-format
|
||||
msgid "EGL implementation is missing extension %s"
|
||||
msgid_plural "EGL implementation is missing %2$d extensions: %1$s"
|
||||
@@ -90,23 +90,23 @@ msgstr[1] "למימוש ה־EGL חסרות שתי הרחבות: %1$s"
|
||||
msgstr[2] "למימוש ה־EGL חסרות %2$d הרחבות: %1$s"
|
||||
msgstr[3] "למימוש ה־EGL חסרות %2$d הרחבות: %1$s"
|
||||
|
||||
#: gdk/gdkdisplay.c:1782
|
||||
#: gdk/gdkdisplay.c:1743
|
||||
msgid "libEGL not available in this sandbox"
|
||||
msgstr "libEGL אינו זמין בארגז חול זה"
|
||||
|
||||
#: gdk/gdkdisplay.c:1783
|
||||
#: gdk/gdkdisplay.c:1744
|
||||
msgid "libEGL not available"
|
||||
msgstr "libEGL לא זמין"
|
||||
|
||||
#: gdk/gdkdisplay.c:1793
|
||||
#: gdk/gdkdisplay.c:1754
|
||||
msgid "Failed to create EGL display"
|
||||
msgstr "יצירת תצוגת EGL נכשלה"
|
||||
|
||||
#: gdk/gdkdisplay.c:1802
|
||||
#: gdk/gdkdisplay.c:1764
|
||||
msgid "Could not initialize EGL display"
|
||||
msgstr "לא ניתן להפעיל תצוגת EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1812
|
||||
#: gdk/gdkdisplay.c:1775
|
||||
#, c-format
|
||||
msgid "EGL version %d.%d is too old. GTK requires %d.%d"
|
||||
msgstr "גרסת ה־EGL %d.%d ישנה מדי. GTK דורש %d.%d"
|
||||
@@ -144,7 +144,7 @@ msgstr "היישום אינו תומך ב־API %s"
|
||||
|
||||
#. translators: This is about OpenGL backend names, like
|
||||
#. * "Trying to use X11 GLX, but EGL is already in use"
|
||||
#: gdk/gdkglcontext.c:2115
|
||||
#: gdk/gdkglcontext.c:2123
|
||||
#, c-format
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "מתבצע ניסיון להשתמש ב־%s אך %s כבר בשימוש"
|
||||
@@ -542,7 +542,7 @@ msgstr "שגיאה בפענוח קובץ תמונת JPEG (%s)"
|
||||
msgid "Unsupported JPEG colorspace (%d)"
|
||||
msgstr "מרחב הצבעים של ה־JPEG אינו נתמך (%d)"
|
||||
|
||||
#: gdk/loaders/gdkjpeg.c:203 gdk/loaders/gdkpng.c:286 gdk/loaders/gdktiff.c:472
|
||||
#: gdk/loaders/gdkjpeg.c:203 gdk/loaders/gdkpng.c:280 gdk/loaders/gdktiff.c:472
|
||||
#, c-format
|
||||
msgid "Not enough memory for image size %ux%u"
|
||||
msgstr "אין מספיק זיכרון לתמונה בגודל %u×%u"
|
||||
@@ -552,22 +552,16 @@ msgstr "אין מספיק זיכרון לתמונה בגודל %u×%u"
|
||||
msgid "Error reading png (%s)"
|
||||
msgstr "שגיאה בקריאת png (%s)"
|
||||
|
||||
#: gdk/loaders/gdkpng.c:212
|
||||
#: gdk/loaders/gdkpng.c:211
|
||||
#, c-format
|
||||
msgid "Unsupported depth %u in png image"
|
||||
msgstr "העומק %u אינו נתמך בתמונות png"
|
||||
|
||||
#: gdk/loaders/gdkpng.c:262
|
||||
#: gdk/loaders/gdkpng.c:261
|
||||
#, c-format
|
||||
msgid "Unsupported color type %u in png image"
|
||||
msgstr "סוג הצבע %u אינו נתמך בתמונות png"
|
||||
|
||||
#: gdk/loaders/gdkpng.c:272
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Not enough memory for image size %ux%u"
|
||||
msgid "Image stride too large for image size %ux%u"
|
||||
msgstr "אין מספיק זיכרון לתמונה בגודל %u×%u"
|
||||
|
||||
#: gdk/loaders/gdktiff.c:358
|
||||
msgid "Failed to load RGB data from TIFF file"
|
||||
msgstr "טעינת נתוני RGB מקובץ TIFF נכשלה"
|
||||
@@ -832,16 +826,11 @@ msgstr "תצורות שגויות בהמרת טקסט מרוכב."
|
||||
msgid "Unsupported encoding “%s”"
|
||||
msgstr "הקידוד „%s” אינו נתמך"
|
||||
|
||||
#: gsk/gl/gskglrenderer.c:204
|
||||
#: gsk/gl/gskglrenderer.c:210
|
||||
#, c-format
|
||||
msgid "This GLES %d.%d implementation does not support half-float vertex data"
|
||||
msgstr "מימוש זה של GLES %d.%d לא תומך בנתוני קודקודים עם נקודה חצי צפה"
|
||||
|
||||
#: gsk/gpu/gskgldevice.c:238
|
||||
#, c-format
|
||||
msgid "OpenGL ES 2.0 is not supported by this renderer."
|
||||
msgstr ""
|
||||
|
||||
#: gtk/a11y/gtkatspiaction.c:239
|
||||
msgctxt "accessibility"
|
||||
msgid "Click"
|
||||
@@ -1039,7 +1028,7 @@ msgid "Invalid"
|
||||
msgstr "בלתי תקני"
|
||||
|
||||
#. This label is displayed in a treeview cell displaying an accelerator
|
||||
#. * when the cell is clicked to change the accelerator.
|
||||
#. * when the cell is clicked to change the acelerator.
|
||||
#.
|
||||
#: gtk/deprecated/gtkcellrendereraccel.c:436
|
||||
#: gtk/deprecated/gtkcellrendereraccel.c:729
|
||||
@@ -2385,7 +2374,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "אם פריט ימחק, הוא יאבד לצמיתות."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1183 gtk/gtkfilechooserwidget.c:1781
|
||||
#: gtk/gtklabel.c:5702 gtk/gtktext.c:6147 gtk/gtktextview.c:9018
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6147 gtk/gtktextview.c:9018
|
||||
msgid "_Delete"
|
||||
msgstr "מ_חיקה"
|
||||
|
||||
@@ -2714,7 +2703,7 @@ msgstr "מאפייני סגנון"
|
||||
msgid "Character Variations"
|
||||
msgstr "הגווני תו"
|
||||
|
||||
#: gtk/gtkglarea.c:309
|
||||
#: gtk/gtkglarea.c:305
|
||||
msgid "OpenGL context creation failed"
|
||||
msgstr "יצירת הקשר OpenGL נכשלה"
|
||||
|
||||
@@ -2727,32 +2716,32 @@ msgstr "סגירה"
|
||||
msgid "Close the infobar"
|
||||
msgstr "סגירת פס המידע"
|
||||
|
||||
#: gtk/gtklabel.c:5699 gtk/gtktext.c:6135 gtk/gtktextview.c:9006
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6135 gtk/gtktextview.c:9006
|
||||
msgid "Cu_t"
|
||||
msgstr "_גזירה"
|
||||
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6139 gtk/gtktextview.c:9010
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6139 gtk/gtktextview.c:9010
|
||||
msgid "_Copy"
|
||||
msgstr "ה_עתקה"
|
||||
|
||||
#: gtk/gtklabel.c:5701 gtk/gtktext.c:6143 gtk/gtktextview.c:9014
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6143 gtk/gtktextview.c:9014
|
||||
msgid "_Paste"
|
||||
msgstr "ה_דבקה"
|
||||
|
||||
#: gtk/gtklabel.c:5707 gtk/gtktext.c:6156 gtk/gtktextview.c:9039
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6156 gtk/gtktextview.c:9039
|
||||
msgid "Select _All"
|
||||
msgstr "בחירה בה_כול"
|
||||
|
||||
#: gtk/gtklabel.c:5712
|
||||
#: gtk/gtklabel.c:5705
|
||||
msgid "_Open Link"
|
||||
msgstr "_פתיחת קישור"
|
||||
|
||||
#: gtk/gtklabel.c:5716
|
||||
#: gtk/gtklabel.c:5709
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "העתקת כתובת ה_קישור"
|
||||
|
||||
# msgctxt "OpenType layout"
|
||||
#: gtk/gtklabel.c:5760 gtk/gtktext.c:2716 gtk/gtktextview.c:9088
|
||||
#: gtk/gtklabel.c:5753 gtk/gtktext.c:2716 gtk/gtktextview.c:9088
|
||||
msgid "Context menu"
|
||||
msgstr "תפריט הקשר"
|
||||
|
||||
@@ -3662,7 +3651,7 @@ msgstr "החלקה ימינה"
|
||||
|
||||
#. Translators: This is placeholder text for the search entry in the shortcuts window
|
||||
#: gtk/gtkshortcutswindow.c:879 gtk/gtkshortcutswindow.c:946
|
||||
#: gtk/gtkshortcutswindow.c:952
|
||||
#: gtk/gtkshortcutswindow.c:951
|
||||
msgid "Search Shortcuts"
|
||||
msgstr "חיפוש קיצורי מקשים"
|
||||
|
||||
@@ -3676,12 +3665,12 @@ msgstr "צירופי מקשים"
|
||||
msgid "Search Results"
|
||||
msgstr "תוצאות חיפוש"
|
||||
|
||||
#: gtk/gtkshortcutswindow.c:1014 gtk/ui/gtkemojichooser.ui:349
|
||||
#: gtk/gtkshortcutswindow.c:1013 gtk/ui/gtkemojichooser.ui:349
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:239
|
||||
msgid "No Results Found"
|
||||
msgstr "לא נמצאו תוצאות"
|
||||
|
||||
#: gtk/gtkshortcutswindow.c:1025 gtk/ui/gtkemojichooser.ui:362
|
||||
#: gtk/gtkshortcutswindow.c:1024 gtk/ui/gtkemojichooser.ui:362
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:252 gtk/ui/gtkplacesview.ui:218
|
||||
msgid "Try a different search"
|
||||
msgstr "יש לנסות חיפוש שונה"
|
||||
@@ -3895,37 +3884,37 @@ msgstr "מחלקות סגנון"
|
||||
msgid "CSS Property"
|
||||
msgstr "מאפיין CSS"
|
||||
|
||||
#: gtk/inspector/general.c:363
|
||||
#: gtk/inspector/general.c:349
|
||||
msgctxt "GL version"
|
||||
msgid "None"
|
||||
msgstr "ללא"
|
||||
|
||||
#: gtk/inspector/general.c:441
|
||||
#: gtk/inspector/general.c:426
|
||||
msgctxt "GL version"
|
||||
msgid "Unknown"
|
||||
msgstr "לא ידוע"
|
||||
|
||||
#: gtk/inspector/general.c:503
|
||||
#: gtk/inspector/general.c:491
|
||||
msgctxt "Vulkan device"
|
||||
msgid "Disabled"
|
||||
msgstr "מושבת"
|
||||
|
||||
#: gtk/inspector/general.c:504 gtk/inspector/general.c:505
|
||||
#: gtk/inspector/general.c:492 gtk/inspector/general.c:493
|
||||
msgctxt "Vulkan version"
|
||||
msgid "Disabled"
|
||||
msgstr "מושבת"
|
||||
|
||||
#: gtk/inspector/general.c:555
|
||||
#: gtk/inspector/general.c:549
|
||||
msgctxt "Vulkan device"
|
||||
msgid "None"
|
||||
msgstr "ללא"
|
||||
|
||||
#: gtk/inspector/general.c:556 gtk/inspector/general.c:557
|
||||
#: gtk/inspector/general.c:550 gtk/inspector/general.c:551
|
||||
msgctxt "Vulkan version"
|
||||
msgid "None"
|
||||
msgstr "ללא"
|
||||
|
||||
#: gtk/inspector/general.c:895
|
||||
#: gtk/inspector/general.c:882
|
||||
msgid "IM Context is hardcoded by GTK_IM_MODULE"
|
||||
msgstr "IM Context קשיחה בקוד על ידי GTK_IM_MODULE"
|
||||
|
||||
@@ -3977,51 +3966,43 @@ msgstr "RGBA חזותי"
|
||||
msgid "Composited"
|
||||
msgstr "מורכב"
|
||||
|
||||
#: gtk/inspector/general.ui:538
|
||||
msgid "Protocols"
|
||||
msgstr "פרוטוקולים"
|
||||
|
||||
#: gtk/inspector/general.ui:594
|
||||
#: gtk/inspector/general.ui:559
|
||||
msgid "GL Version"
|
||||
msgstr "גרסת GL"
|
||||
|
||||
#: gtk/inspector/general.ui:621
|
||||
#: gtk/inspector/general.ui:586
|
||||
msgid "GL Backend Version"
|
||||
msgstr "גרסת מנגנון GL"
|
||||
|
||||
#: gtk/inspector/general.ui:671
|
||||
#: gtk/inspector/general.ui:636
|
||||
msgid "GL Backend Vendor"
|
||||
msgstr "ספק מנגנון GL"
|
||||
|
||||
#: gtk/inspector/general.ui:698
|
||||
#: gtk/inspector/general.ui:663
|
||||
msgid "GL_VENDOR"
|
||||
msgstr "GL_VENDOR"
|
||||
|
||||
#: gtk/inspector/general.ui:727
|
||||
#: gtk/inspector/general.ui:692
|
||||
msgid "GL_RENDERER"
|
||||
msgstr "GL_RENDERER"
|
||||
|
||||
#: gtk/inspector/general.ui:756
|
||||
#: gtk/inspector/general.ui:721
|
||||
msgid "GL_VERSION"
|
||||
msgstr "GL_VERSION"
|
||||
|
||||
#: gtk/inspector/general.ui:785
|
||||
#: gtk/inspector/general.ui:750
|
||||
msgid "GL_SHADING_LANGUAGE_VERSION"
|
||||
msgstr "GL_SHADING_LANGUAGE_VERSION"
|
||||
|
||||
#: gtk/inspector/general.ui:813 gtk/inspector/general.ui:929
|
||||
msgid "Extensions"
|
||||
msgstr "הרחבות"
|
||||
|
||||
#: gtk/inspector/general.ui:849
|
||||
#: gtk/inspector/general.ui:789
|
||||
msgid "Vulkan Device"
|
||||
msgstr "התקן Vulkan"
|
||||
|
||||
#: gtk/inspector/general.ui:876
|
||||
#: gtk/inspector/general.ui:816
|
||||
msgid "Vulkan API version"
|
||||
msgstr "גרסת API של Vulkan"
|
||||
|
||||
#: gtk/inspector/general.ui:903
|
||||
#: gtk/inspector/general.ui:843
|
||||
msgid "Vulkan driver version"
|
||||
msgstr "גרסת מנהל התקן של Vulkan"
|
||||
|
||||
@@ -7329,7 +7310,7 @@ msgid "Use style from CSS file"
|
||||
msgstr "להשתמש בסגנון מקובץ CSS"
|
||||
|
||||
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:203
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-rendernode-tool-show.c:113
|
||||
#, c-format
|
||||
msgid "Could not initialize windowing system\n"
|
||||
@@ -7375,13 +7356,13 @@ msgstr ""
|
||||
"Use --force to overwrite.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:332
|
||||
#: tools/gtk-rendernode-tool-render.c:171
|
||||
#: tools/gtk-rendernode-tool-render.c:172
|
||||
#, c-format
|
||||
msgid "Output written to %s.\n"
|
||||
msgstr "Output written to %s.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:336
|
||||
#: tools/gtk-rendernode-tool-render.c:175
|
||||
#: tools/gtk-rendernode-tool-render.c:176
|
||||
#, c-format
|
||||
msgid "Failed to save %s: %s\n"
|
||||
msgstr "Failed to save %s: %s\n"
|
||||
@@ -7399,7 +7380,7 @@ msgid "Overwrite existing file"
|
||||
msgstr "שכתוב קובץ קיים"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:363
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
#: tools/gtk-rendernode-tool-render.c:197
|
||||
msgid "FILE…"
|
||||
msgstr "FILE…"
|
||||
|
||||
@@ -7876,7 +7857,6 @@ msgid ""
|
||||
"Perform various tasks on GTK render nodes.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" benchmark Benchmark rendering of a node\n"
|
||||
" info Provide information about the node\n"
|
||||
" show Show the node\n"
|
||||
" render Take a screenshot of the node\n"
|
||||
@@ -7888,7 +7868,6 @@ msgstr ""
|
||||
"Perform various tasks on GTK render nodes.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" benchmark Benchmark rendering of a node\n"
|
||||
" info Provide information about the node\n"
|
||||
" show Show the node\n"
|
||||
" render Take a screenshot of the node\n"
|
||||
@@ -7918,7 +7897,7 @@ msgstr "מקור: %g %g\n"
|
||||
msgid "Provide information about the render node."
|
||||
msgstr "אספקת מידע על נקודת העיבוד החזותי."
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:224
|
||||
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-show.c:134
|
||||
#, c-format
|
||||
msgid "No .node file specified\n"
|
||||
@@ -7943,25 +7922,19 @@ msgstr ""
|
||||
msgid "Failed to generate SVG: %s\n"
|
||||
msgstr "יצירת SVG נכשלה: %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:150
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Failed to rewrite header\n"
|
||||
msgid "Failed to create renderer: %s\n"
|
||||
msgstr "Failed to rewrite header\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:195
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
msgid "Renderer to use"
|
||||
msgstr "עיבוד לשימוש"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:195
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
msgid "RENDERER"
|
||||
msgstr "מעבד תצוגה"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:211
|
||||
#: tools/gtk-rendernode-tool-render.c:212
|
||||
msgid "Render a .node file to an image."
|
||||
msgstr "עיבוד קובץ .node לתמונה."
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:230
|
||||
#: tools/gtk-rendernode-tool-render.c:231
|
||||
#, c-format
|
||||
msgid "Can only render a single .node file to a single output file\n"
|
||||
msgstr "יכול לעבד קובץ ,node יחיד בלבד לקובץ פלט יחיד\n"
|
||||
@@ -7979,12 +7952,12 @@ msgstr "הצגת צומת מעבד התצוגה."
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "יכול להציג תצוגה מקדימה של קובץ .node יחיד בלבד\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:54
|
||||
#: tools/gtk-rendernode-tool-utils.c:51
|
||||
#, c-format
|
||||
msgid "Error at %s: %s\n"
|
||||
msgstr "שגיאה ב־%s: %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:72
|
||||
#: tools/gtk-rendernode-tool-utils.c:69
|
||||
#, c-format
|
||||
msgid "Failed to load node file: %s\n"
|
||||
msgstr "טעינת קובץ המצב נכשלה: %s\n"
|
||||
@@ -8155,8 +8128,8 @@ msgstr ""
|
||||
#~ msgid "Switch to list view"
|
||||
#~ msgstr "החלפה לתצוגת רשימה"
|
||||
|
||||
#~ msgid "default:LTR"
|
||||
#~ msgstr "default:RTL"
|
||||
msgid "default:LTR"
|
||||
msgstr "default:RTL"
|
||||
|
||||
#~ msgid "Other application…"
|
||||
#~ msgstr "יישום אחר…"
|
||||
|
||||
@@ -11,8 +11,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2024-01-25 11:35+0000\n"
|
||||
"PO-Revision-Date: 2024-01-27 18:13+0100\n"
|
||||
"POT-Creation-Date: 2024-01-07 07:44+0000\n"
|
||||
"PO-Revision-Date: 2024-01-08 05:11+0100\n"
|
||||
"Last-Translator: Ekaterine Papava <papava.e@gtu.ge>\n"
|
||||
"Language-Team: Georgian <http://mail.gnome.org/mailman/listinfo/gnome-ge-"
|
||||
"list>\n"
|
||||
@@ -55,53 +55,53 @@ msgstr "შემცველობის %s-ად გამოტანა შ
|
||||
msgid "The current backend does not support OpenGL"
|
||||
msgstr "მიმდინარე უკანაბოლოს OpenGL-ის მხარდაჭერა არ გააჩნია"
|
||||
|
||||
#: gdk/gdkdisplay.c:1296 gdk/gdkvulkancontext.c:1581
|
||||
#: gdk/gdkdisplay.c:1292 gdk/gdksurface.c:1268 gdk/gdkvulkancontext.c:1581
|
||||
msgid "Vulkan support disabled via GDK_DEBUG"
|
||||
msgstr "Vulkan-ის მხარდაჭერა გამორთულია GDK_DEBUG-ით"
|
||||
|
||||
#: gdk/gdkdisplay.c:1350
|
||||
#: gdk/gdkdisplay.c:1335
|
||||
msgid "GL support disabled via GDK_DEBUG"
|
||||
msgstr "GL-ის მხარდაჭერა გათიშულია GDK_DEBUG-ის მიერ"
|
||||
|
||||
#: gdk/gdkdisplay.c:1646
|
||||
#: gdk/gdkdisplay.c:1631
|
||||
msgid "No EGL configuration available"
|
||||
msgstr "EGL-ის კონფიგურაცია მიუწვდომელია"
|
||||
|
||||
#: gdk/gdkdisplay.c:1654
|
||||
#: gdk/gdkdisplay.c:1639
|
||||
msgid "Failed to get EGL configurations"
|
||||
msgstr "EGL-ის კონფიგურაციის მიღების შეცდოა"
|
||||
|
||||
#: gdk/gdkdisplay.c:1684
|
||||
#: gdk/gdkdisplay.c:1669
|
||||
msgid "No EGL configuration with required features found"
|
||||
msgstr "მოთხოვნილი ფუნქციების მქონე EGL-ის კონფიგურაცია ნაპოვნი არაა"
|
||||
|
||||
#: gdk/gdkdisplay.c:1691
|
||||
#: gdk/gdkdisplay.c:1676
|
||||
msgid "No perfect EGL configuration found"
|
||||
msgstr "EGL-ის მისაღები კონფიგურაცია ნაპოვნი არაა"
|
||||
|
||||
#: gdk/gdkdisplay.c:1733
|
||||
#: gdk/gdkdisplay.c:1718
|
||||
#, c-format
|
||||
msgid "EGL implementation is missing extension %s"
|
||||
msgid_plural "EGL implementation is missing %2$d extensions: %1$s"
|
||||
msgstr[0] "EGL-ის განხორციელებას %2$d გაფართოება აკლია: %1$s"
|
||||
|
||||
#: gdk/gdkdisplay.c:1782
|
||||
#: gdk/gdkdisplay.c:1768
|
||||
msgid "libEGL not available in this sandbox"
|
||||
msgstr "ამ იზოლირებულ გარემოში libEGL მიუწვდომელია"
|
||||
|
||||
#: gdk/gdkdisplay.c:1783
|
||||
#: gdk/gdkdisplay.c:1769
|
||||
msgid "libEGL not available"
|
||||
msgstr "libEGL მიუწვდომელია"
|
||||
|
||||
#: gdk/gdkdisplay.c:1793
|
||||
#: gdk/gdkdisplay.c:1779
|
||||
msgid "Failed to create EGL display"
|
||||
msgstr "EGL ეკრანის შექმნის შეცდომა"
|
||||
|
||||
#: gdk/gdkdisplay.c:1802
|
||||
#: gdk/gdkdisplay.c:1789
|
||||
msgid "Could not initialize EGL display"
|
||||
msgstr "EGL ეკრანის ინიციალიზაციის შეცდომა"
|
||||
|
||||
#: gdk/gdkdisplay.c:1812
|
||||
#: gdk/gdkdisplay.c:1800
|
||||
#, c-format
|
||||
msgid "EGL version %d.%d is too old. GTK requires %d.%d"
|
||||
msgstr "EGL-ის ვერსია %d.%d ძალიან ძველია. GTK-ს ესაჭიროება %d.%d"
|
||||
@@ -139,7 +139,7 @@ msgstr "აპლიკაციას %s-ის API-ის მხარდა
|
||||
|
||||
#. translators: This is about OpenGL backend names, like
|
||||
#. * "Trying to use X11 GLX, but EGL is already in use"
|
||||
#: gdk/gdkglcontext.c:2115
|
||||
#: gdk/gdkglcontext.c:2124
|
||||
#, c-format
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "%s გამოყენების მცდელობა, მაგრამ %s უკვე გამოიყენება"
|
||||
@@ -852,18 +852,13 @@ msgstr "არასწორი ფორმატები შედგენ
|
||||
msgid "Unsupported encoding “%s”"
|
||||
msgstr "კოდირება \"%s\" მხარდაუჭერელია"
|
||||
|
||||
#: gsk/gl/gskglrenderer.c:204
|
||||
#: gsk/gl/gskglrenderer.c:210
|
||||
#, c-format
|
||||
msgid "This GLES %d.%d implementation does not support half-float vertex data"
|
||||
msgstr ""
|
||||
"GLES %d.%d-ის ამ განხორციელებას ნახევრად-მცურავმძიმიანი წვეროების "
|
||||
"მონაცემების მხარდაჭერა არ გააჩნია"
|
||||
|
||||
#: gsk/gpu/gskgldevice.c:238
|
||||
#, c-format
|
||||
msgid "OpenGL ES 2.0 is not supported by this renderer."
|
||||
msgstr "OpenGL ES 2.0 ამ რენდერერის მიერ მხარდაჭერილი არაა."
|
||||
|
||||
#: gtk/a11y/gtkatspiaction.c:239
|
||||
msgctxt "accessibility"
|
||||
msgid "Click"
|
||||
@@ -1061,7 +1056,7 @@ msgid "Invalid"
|
||||
msgstr "არასწორი"
|
||||
|
||||
#. This label is displayed in a treeview cell displaying an accelerator
|
||||
#. * when the cell is clicked to change the accelerator.
|
||||
#. * when the cell is clicked to change the acelerator.
|
||||
#.
|
||||
#: gtk/deprecated/gtkcellrendereraccel.c:436
|
||||
#: gtk/deprecated/gtkcellrendereraccel.c:729
|
||||
@@ -1240,6 +1235,7 @@ msgid "Mozilla Public License 2.0"
|
||||
msgstr "Mozilla Public License 2.0"
|
||||
|
||||
#: gtk/gtkaboutdialog.c:137
|
||||
#| msgid "BSD 2-Clause License"
|
||||
msgid "BSD Zero-Clause License"
|
||||
msgstr "BSD Zero-Clause License"
|
||||
|
||||
@@ -2353,7 +2349,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "თუ წაშლით ელემენტს, ის სამუდამოდ დაიკარგება."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1183 gtk/gtkfilechooserwidget.c:1781
|
||||
#: gtk/gtklabel.c:5702 gtk/gtktext.c:6147 gtk/gtktextview.c:9018
|
||||
#: gtk/gtklabel.c:5697 gtk/gtktext.c:6147 gtk/gtktextview.c:9018
|
||||
msgid "_Delete"
|
||||
msgstr "წაშლა"
|
||||
|
||||
@@ -2679,7 +2675,7 @@ msgstr "სტილის ვარიაციები"
|
||||
msgid "Character Variations"
|
||||
msgstr "სიმბოლოების ვარიანტები"
|
||||
|
||||
#: gtk/gtkglarea.c:309
|
||||
#: gtk/gtkglarea.c:305
|
||||
msgid "OpenGL context creation failed"
|
||||
msgstr "OpenGL-ის კონტექსტის შექმნის შეცდომა"
|
||||
|
||||
@@ -2692,31 +2688,31 @@ msgstr "დახურვა"
|
||||
msgid "Close the infobar"
|
||||
msgstr "საინფორმაციო ზოლის დახურვა"
|
||||
|
||||
#: gtk/gtklabel.c:5699 gtk/gtktext.c:6135 gtk/gtktextview.c:9006
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6135 gtk/gtktextview.c:9006
|
||||
msgid "Cu_t"
|
||||
msgstr "ამოჭრა"
|
||||
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6139 gtk/gtktextview.c:9010
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6139 gtk/gtktextview.c:9010
|
||||
msgid "_Copy"
|
||||
msgstr "ასლი"
|
||||
|
||||
#: gtk/gtklabel.c:5701 gtk/gtktext.c:6143 gtk/gtktextview.c:9014
|
||||
#: gtk/gtklabel.c:5696 gtk/gtktext.c:6143 gtk/gtktextview.c:9014
|
||||
msgid "_Paste"
|
||||
msgstr "ჩასმა"
|
||||
|
||||
#: gtk/gtklabel.c:5707 gtk/gtktext.c:6156 gtk/gtktextview.c:9039
|
||||
#: gtk/gtklabel.c:5702 gtk/gtktext.c:6156 gtk/gtktextview.c:9039
|
||||
msgid "Select _All"
|
||||
msgstr "ყველაფრის _მონიშვნა"
|
||||
|
||||
#: gtk/gtklabel.c:5712
|
||||
#: gtk/gtklabel.c:5707
|
||||
msgid "_Open Link"
|
||||
msgstr "_ბმულის გახსნა"
|
||||
|
||||
#: gtk/gtklabel.c:5716
|
||||
#: gtk/gtklabel.c:5711
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "დაა_კოპირე ბმულის მისამართი"
|
||||
|
||||
#: gtk/gtklabel.c:5760 gtk/gtktext.c:2716 gtk/gtktextview.c:9088
|
||||
#: gtk/gtklabel.c:5755 gtk/gtktext.c:2716 gtk/gtktextview.c:9088
|
||||
msgid "Context menu"
|
||||
msgstr "კონტექსტური მენიუ"
|
||||
|
||||
@@ -3857,37 +3853,37 @@ msgstr "სტილის კლასები"
|
||||
msgid "CSS Property"
|
||||
msgstr "CSS-ის თვისება"
|
||||
|
||||
#: gtk/inspector/general.c:363
|
||||
#: gtk/inspector/general.c:352
|
||||
msgctxt "GL version"
|
||||
msgid "None"
|
||||
msgstr "არცერთი"
|
||||
|
||||
#: gtk/inspector/general.c:441
|
||||
#: gtk/inspector/general.c:430
|
||||
msgctxt "GL version"
|
||||
msgid "Unknown"
|
||||
msgstr "უცნობი"
|
||||
|
||||
#: gtk/inspector/general.c:503
|
||||
#: gtk/inspector/general.c:495
|
||||
msgctxt "Vulkan device"
|
||||
msgid "Disabled"
|
||||
msgstr "გამორთულია"
|
||||
|
||||
#: gtk/inspector/general.c:504 gtk/inspector/general.c:505
|
||||
#: gtk/inspector/general.c:496 gtk/inspector/general.c:497
|
||||
msgctxt "Vulkan version"
|
||||
msgid "Disabled"
|
||||
msgstr "გამორთულია"
|
||||
|
||||
#: gtk/inspector/general.c:555
|
||||
#: gtk/inspector/general.c:553
|
||||
msgctxt "Vulkan device"
|
||||
msgid "None"
|
||||
msgstr "არცერთი"
|
||||
|
||||
#: gtk/inspector/general.c:556 gtk/inspector/general.c:557
|
||||
#: gtk/inspector/general.c:554 gtk/inspector/general.c:555
|
||||
msgctxt "Vulkan version"
|
||||
msgid "None"
|
||||
msgstr "არცერთი"
|
||||
|
||||
#: gtk/inspector/general.c:895
|
||||
#: gtk/inspector/general.c:893
|
||||
msgid "IM Context is hardcoded by GTK_IM_MODULE"
|
||||
msgstr "IM-ის კონტექსტი GTK_IM_MODULE-ში ხელითაა ჩაწერილი"
|
||||
|
||||
@@ -7285,7 +7281,7 @@ msgid "Use style from CSS file"
|
||||
msgstr "სტილის CSS ფაილიდან გამოყენება"
|
||||
|
||||
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:203
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-rendernode-tool-show.c:113
|
||||
#, c-format
|
||||
msgid "Could not initialize windowing system\n"
|
||||
@@ -7331,13 +7327,13 @@ msgstr ""
|
||||
"თავზე გადასაწერად გამოიყენეთ --force.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:332
|
||||
#: tools/gtk-rendernode-tool-render.c:171
|
||||
#: tools/gtk-rendernode-tool-render.c:172
|
||||
#, c-format
|
||||
msgid "Output written to %s.\n"
|
||||
msgstr "გამოტანილი ინფორმაცია ჩაწერილია %s-ში.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:336
|
||||
#: tools/gtk-rendernode-tool-render.c:175
|
||||
#: tools/gtk-rendernode-tool-render.c:176
|
||||
#, c-format
|
||||
msgid "Failed to save %s: %s\n"
|
||||
msgstr "\"%s'-ის შენახვის შეცდომა: %s\n"
|
||||
@@ -7355,7 +7351,7 @@ msgid "Overwrite existing file"
|
||||
msgstr "არსებულ ფაილზე გადაწერა"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:363
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
#: tools/gtk-rendernode-tool-render.c:197
|
||||
msgid "FILE…"
|
||||
msgstr "FILE…"
|
||||
|
||||
@@ -7825,7 +7821,6 @@ msgid ""
|
||||
"Perform various tasks on GTK render nodes.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" benchmark Benchmark rendering of a node\n"
|
||||
" info Provide information about the node\n"
|
||||
" show Show the node\n"
|
||||
" render Take a screenshot of the node\n"
|
||||
@@ -7837,7 +7832,6 @@ msgstr ""
|
||||
"სხვადასხვა დავალებების შესრულება Gtk-ის რენდერის კვანძებზე.\n"
|
||||
"\n"
|
||||
"ბრძანებები:\n"
|
||||
" benchmark კვანძის რენდერის წარმადობის გაზომვა\n"
|
||||
" info ამ კვანძის შესახებ ინფორმაციის გამოტანა\n"
|
||||
" show ამ კვანძის ჩვენება\n"
|
||||
" render კვანძის ეკრანის ანაბეჭდის აღება\n"
|
||||
@@ -7867,7 +7861,7 @@ msgstr "საწყისი: %g %g\n"
|
||||
msgid "Provide information about the render node."
|
||||
msgstr "შეიყვანეთ ინფორმაცია რენდერის კვანძის შესახებ."
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:224
|
||||
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-show.c:134
|
||||
#, c-format
|
||||
msgid "No .node file specified\n"
|
||||
@@ -7893,24 +7887,19 @@ msgstr ""
|
||||
msgid "Failed to generate SVG: %s\n"
|
||||
msgstr "შეცდომა SVG-ის გენერაციისას: %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:150
|
||||
#, c-format
|
||||
msgid "Failed to create renderer: %s\n"
|
||||
msgstr "რენდერერის შექმნა ჩავარდა: %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:195
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
msgid "Renderer to use"
|
||||
msgstr "გამოყენებული რენდერერი"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:195
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
msgid "RENDERER"
|
||||
msgstr "რენდერერი"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:211
|
||||
#: tools/gtk-rendernode-tool-render.c:212
|
||||
msgid "Render a .node file to an image."
|
||||
msgstr ".ui ფაილის რენდერი გამოსახულებაში."
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:230
|
||||
#: tools/gtk-rendernode-tool-render.c:231
|
||||
#, c-format
|
||||
msgid "Can only render a single .node file to a single output file\n"
|
||||
msgstr "ერთი .node ფაილის მხოლოდ ერთ გამოტანის ფაილში რენდერი შეგიძლიათ\n"
|
||||
@@ -7928,12 +7917,12 @@ msgstr "რენდერის კვანძის ჩვენება."
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "შეგიძლიათ მხოლოდ ერთი .node ფაილის გადახედვა\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:54
|
||||
#: tools/gtk-rendernode-tool-utils.c:51
|
||||
#, c-format
|
||||
msgid "Error at %s: %s\n"
|
||||
msgstr "შეცდომა მისამართზე %s: %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:72
|
||||
#: tools/gtk-rendernode-tool-utils.c:69
|
||||
#, c-format
|
||||
msgid "Failed to load node file: %s\n"
|
||||
msgstr "შეცდომა კვანძის ფაილის ჩატვირთვისას: %s\n"
|
||||
|
||||
@@ -22,8 +22,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk+.master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2024-01-16 17:25+0000\n"
|
||||
"PO-Revision-Date: 2024-01-16 22:49+0300\n"
|
||||
"POT-Creation-Date: 2024-01-08 02:46+0000\n"
|
||||
"PO-Revision-Date: 2024-01-08 15:00+0300\n"
|
||||
"Last-Translator: Artur So <arturios2005@mail.ru>\n"
|
||||
"Language-Team: Русский <gnome-cyr@gnome.org>\n"
|
||||
"Language: ru\n"
|
||||
@@ -867,11 +867,6 @@ msgid "This GLES %d.%d implementation does not support half-float vertex data"
|
||||
msgstr ""
|
||||
"Данная реализация GLES %d.%d не поддерживает полуплавающие вершинные данные"
|
||||
|
||||
#: gsk/gpu/gskgldevice.c:238
|
||||
#, c-format
|
||||
msgid "OpenGL ES 2.0 is not supported by this renderer."
|
||||
msgstr "OpenGL ES 2.0 не поддерживается этим рендерером."
|
||||
|
||||
#: gtk/a11y/gtkatspiaction.c:239
|
||||
msgctxt "accessibility"
|
||||
msgid "Click"
|
||||
@@ -2690,7 +2685,7 @@ msgstr "Вариации стилей"
|
||||
msgid "Character Variations"
|
||||
msgstr "Вариации символов"
|
||||
|
||||
#: gtk/gtkglarea.c:309
|
||||
#: gtk/gtkglarea.c:305
|
||||
msgid "OpenGL context creation failed"
|
||||
msgstr "Не удалось создать контекст OpenGL"
|
||||
|
||||
@@ -7308,7 +7303,7 @@ msgid "Use style from CSS file"
|
||||
msgstr "Использовать стиль из файла CSS"
|
||||
|
||||
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:203
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-rendernode-tool-show.c:113
|
||||
#, c-format
|
||||
msgid "Could not initialize windowing system\n"
|
||||
@@ -7354,13 +7349,13 @@ msgstr ""
|
||||
"Используйте --force для перезаписи.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:332
|
||||
#: tools/gtk-rendernode-tool-render.c:171
|
||||
#: tools/gtk-rendernode-tool-render.c:172
|
||||
#, c-format
|
||||
msgid "Output written to %s.\n"
|
||||
msgstr "Выход записывается в %s.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:336
|
||||
#: tools/gtk-rendernode-tool-render.c:175
|
||||
#: tools/gtk-rendernode-tool-render.c:176
|
||||
#, c-format
|
||||
msgid "Failed to save %s: %s\n"
|
||||
msgstr "Не удалось сохранить %s: %s\n"
|
||||
@@ -7378,7 +7373,7 @@ msgid "Overwrite existing file"
|
||||
msgstr "Перезаписать существующий файл"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:363
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
#: tools/gtk-rendernode-tool-render.c:197
|
||||
msgid "FILE…"
|
||||
msgstr "ФАЙЛ…"
|
||||
|
||||
@@ -7849,7 +7844,6 @@ msgid ""
|
||||
"Perform various tasks on GTK render nodes.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" benchmark Benchmark rendering of a node\n"
|
||||
" info Provide information about the node\n"
|
||||
" show Show the node\n"
|
||||
" render Take a screenshot of the node\n"
|
||||
@@ -7861,7 +7855,6 @@ msgstr ""
|
||||
"Выполнение различных задач на узлах рендеринга GTK.\n"
|
||||
"\n"
|
||||
"Команды:\n"
|
||||
" benchmark Тест рендеринга узла\n"
|
||||
" info Предоставить информацию об узле\n"
|
||||
" show Показать узел\n"
|
||||
" render Сделать снимок узла\n"
|
||||
@@ -7891,7 +7884,7 @@ msgstr "Источник: %g %g\n"
|
||||
msgid "Provide information about the render node."
|
||||
msgstr "Предоставить информацию об узле рендеринга."
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:224
|
||||
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-show.c:134
|
||||
#, c-format
|
||||
msgid "No .node file specified\n"
|
||||
@@ -7916,24 +7909,19 @@ msgstr ""
|
||||
msgid "Failed to generate SVG: %s\n"
|
||||
msgstr "Не удалось сгенерировать SVG: %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:150
|
||||
#, c-format
|
||||
msgid "Failed to create renderer: %s\n"
|
||||
msgstr "Не удалось создать рендерер: %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:195
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
msgid "Renderer to use"
|
||||
msgstr "Используемый рендерер"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:195
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
msgid "RENDERER"
|
||||
msgstr "РЕНДЕРЕР"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:211
|
||||
#: tools/gtk-rendernode-tool-render.c:212
|
||||
msgid "Render a .node file to an image."
|
||||
msgstr "Преобразование .node файла в изображение."
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:230
|
||||
#: tools/gtk-rendernode-tool-render.c:231
|
||||
#, c-format
|
||||
msgid "Can only render a single .node file to a single output file\n"
|
||||
msgstr "Можно вывести только один файл .node в один выходной файл\n"
|
||||
@@ -7951,12 +7939,12 @@ msgstr "Показать узел рендеринга."
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "Можно предварительно просмотреть только один .node файл\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:54
|
||||
#: tools/gtk-rendernode-tool-utils.c:51
|
||||
#, c-format
|
||||
msgid "Error at %s: %s\n"
|
||||
msgstr "Ошибка в %s: %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:72
|
||||
#: tools/gtk-rendernode-tool-utils.c:69
|
||||
#, c-format
|
||||
msgid "Failed to load node file: %s\n"
|
||||
msgstr "Не удалось загрузить node файл: %s\n"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
clip {
|
||||
clip: 0 0 50 50;
|
||||
child: border {
|
||||
colors: rgb(255,0,0) rgb(0,255,0);
|
||||
outline: -15 -15 80 80 / 40;
|
||||
widths: 40 0;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 85 B |
@@ -1,15 +0,0 @@
|
||||
opacity {
|
||||
opacity: 0.6;
|
||||
child: container {
|
||||
container {
|
||||
color {
|
||||
bounds: 0 0 40 40;
|
||||
color: rgb(255,0,0);
|
||||
}
|
||||
color {
|
||||
bounds: 10 10 40 40;
|
||||
color: rgb(0,255,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user