Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fac12b5426 | |||
| b58278acf1 |
@@ -2,6 +2,8 @@ FROM fedora:39
|
||||
|
||||
RUN dnf -y install \
|
||||
adwaita-icon-theme \
|
||||
atk-devel \
|
||||
at-spi2-atk-devel \
|
||||
avahi-gobject-devel \
|
||||
cairo-devel \
|
||||
cairo-gobject-devel \
|
||||
@@ -16,6 +18,7 @@ RUN dnf -y install \
|
||||
dejavu-sans-mono-fonts \
|
||||
desktop-file-utils \
|
||||
diffutils \
|
||||
docbook-style-xsl \
|
||||
elfutils-libelf-devel \
|
||||
expat-devel \
|
||||
fribidi-devel \
|
||||
|
||||
@@ -1,45 +1,6 @@
|
||||
Overview of Changes in 4.14.2, xx-xx-xxxx
|
||||
Overview of Changes in 4.14.1, xx-xx-xxxx
|
||||
=========================================
|
||||
|
||||
Overview of Changes in 4.14.1, 16-03-2024
|
||||
=========================================
|
||||
|
||||
* GtkTextView:
|
||||
- Fix a mixup of cursor and anchor when retrieving surrounding text
|
||||
in input methods
|
||||
|
||||
* Printing:
|
||||
- Avoid accessing freed printers
|
||||
|
||||
* Accessibility:
|
||||
- Fix memory leaks
|
||||
|
||||
* GDK:
|
||||
- Rename the GDK_VULKAN_SKIP environment variable to GDK_VULKAN_DISABLE
|
||||
- Add a GDK_GL_DISABLE environment variable
|
||||
|
||||
* GSK:
|
||||
- Rename the GSK_GPU_SKIP environment variable to GSK_GPU_DISABLE
|
||||
- Speed up handling of repeated ops, which should help for text
|
||||
- Speed up the inner loop of text node conversion
|
||||
- Drop the glyph-align optimization flag
|
||||
- ngl: Avoid reusing frames while they are in use
|
||||
- Fix flickering thumbnails in nautilus
|
||||
- Speed up buffer handling in both ngl and Vulkan
|
||||
|
||||
* Demos:
|
||||
- Skip demos using gl shaders when we're not using the gl renderer
|
||||
|
||||
* Build:
|
||||
- Fix some ubsan warnings
|
||||
- Avoid zink in ci since it spams stderr
|
||||
|
||||
* Translation updates:
|
||||
Czech
|
||||
German
|
||||
Korean
|
||||
Russian
|
||||
|
||||
|
||||
Overview of Changes in 4.14.0, 12-03-2024
|
||||
=========================================
|
||||
|
||||
+30
-50
@@ -184,12 +184,6 @@ create_cogs (void)
|
||||
return picture;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_cogs (GtkFishbowl *fb)
|
||||
{
|
||||
return GSK_IS_GL_RENDERER (gtk_native_get_renderer (gtk_widget_get_native (GTK_WIDGET (fb))));
|
||||
}
|
||||
|
||||
static void
|
||||
mapped (GtkWidget *w)
|
||||
{
|
||||
@@ -224,41 +218,36 @@ create_graph (void)
|
||||
|
||||
static const struct {
|
||||
const char *name;
|
||||
GtkWidget * (* create_func) (void);
|
||||
gboolean (* check) (GtkFishbowl *fb);
|
||||
GtkWidget * (*create_func) (void);
|
||||
} widget_types[] = {
|
||||
{ "Icon", create_icon, NULL },
|
||||
{ "Button", create_button, NULL },
|
||||
{ "Blurbutton", create_blurred_button, NULL },
|
||||
{ "Fontbutton", create_font_button, NULL },
|
||||
{ "Levelbar", create_level_bar, NULL },
|
||||
{ "Label", create_label, NULL },
|
||||
{ "Spinner", create_spinner, NULL },
|
||||
{ "Spinbutton", create_spinbutton, NULL },
|
||||
{ "Video", create_video, NULL },
|
||||
{ "Gears", create_gears, NULL },
|
||||
{ "Switch", create_switch, NULL },
|
||||
{ "Menubutton", create_menu_button, NULL },
|
||||
{ "Shader", create_cogs, check_cogs },
|
||||
{ "Tiger", create_tiger, NULL },
|
||||
{ "Graph", create_graph, NULL },
|
||||
{ "Icon", create_icon },
|
||||
{ "Button", create_button },
|
||||
{ "Blurbutton", create_blurred_button },
|
||||
{ "Fontbutton", create_font_button },
|
||||
{ "Levelbar", create_level_bar },
|
||||
{ "Label", create_label },
|
||||
{ "Spinner", create_spinner },
|
||||
{ "Spinbutton", create_spinbutton },
|
||||
{ "Video", create_video },
|
||||
{ "Gears", create_gears },
|
||||
{ "Switch", create_switch },
|
||||
{ "Menubutton", create_menu_button },
|
||||
{ "Shader", create_cogs },
|
||||
{ "Tiger", create_tiger },
|
||||
{ "Graph", create_graph },
|
||||
};
|
||||
|
||||
static int selected_widget_type = -1;
|
||||
static const int N_WIDGET_TYPES = G_N_ELEMENTS (widget_types);
|
||||
|
||||
static gboolean
|
||||
static void
|
||||
set_widget_type (GtkFishbowl *fishbowl,
|
||||
int widget_type_index)
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
if (widget_type_index == selected_widget_type)
|
||||
return TRUE;
|
||||
|
||||
if (widget_types[widget_type_index].check != NULL &&
|
||||
!widget_types[widget_type_index].check (fishbowl))
|
||||
return FALSE;
|
||||
return;
|
||||
|
||||
selected_widget_type = widget_type_index;
|
||||
|
||||
@@ -268,8 +257,6 @@ set_widget_type (GtkFishbowl *fishbowl,
|
||||
window = GTK_WIDGET (gtk_widget_get_root (GTK_WIDGET (fishbowl)));
|
||||
gtk_window_set_title (GTK_WINDOW (window),
|
||||
widget_types[selected_widget_type].name);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT void
|
||||
@@ -277,17 +264,14 @@ fishbowl_next_button_clicked_cb (GtkButton *source,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkFishbowl *fishbowl = user_data;
|
||||
int new_index = selected_widget_type;
|
||||
int new_index;
|
||||
|
||||
do
|
||||
{
|
||||
if (new_index + 1 >= N_WIDGET_TYPES)
|
||||
new_index = 0;
|
||||
else
|
||||
new_index = new_index + 1;
|
||||
if (selected_widget_type + 1 >= N_WIDGET_TYPES)
|
||||
new_index = 0;
|
||||
else
|
||||
new_index = selected_widget_type + 1;
|
||||
|
||||
}
|
||||
while (!set_widget_type (fishbowl, new_index));
|
||||
set_widget_type (fishbowl, new_index);
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT void
|
||||
@@ -295,18 +279,14 @@ fishbowl_prev_button_clicked_cb (GtkButton *source,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkFishbowl *fishbowl = user_data;
|
||||
int new_index = selected_widget_type;
|
||||
int new_index;
|
||||
|
||||
do
|
||||
{
|
||||
if (new_index - 1 < 0)
|
||||
new_index = N_WIDGET_TYPES - 1;
|
||||
else
|
||||
new_index = new_index - 1;
|
||||
if (selected_widget_type - 1 < 0)
|
||||
new_index = N_WIDGET_TYPES - 1;
|
||||
else
|
||||
new_index = selected_widget_type - 1;
|
||||
|
||||
}
|
||||
|
||||
while (!set_widget_type (fishbowl, new_index));
|
||||
set_widget_type (fishbowl, new_index);
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT void
|
||||
|
||||
+17
-37
@@ -827,25 +827,13 @@ demo_search_changed_cb (GtkSearchEntry *entry,
|
||||
gtk_filter_changed (filter, GTK_FILTER_CHANGE_DIFFERENT);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
demo_can_run (GtkWidget *window,
|
||||
const char *name)
|
||||
{
|
||||
if (name != NULL && strcmp (name, "gltransition") == 0)
|
||||
return GSK_IS_GL_RENDERER (gtk_native_get_renderer (GTK_NATIVE (window)));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GListModel *
|
||||
create_demo_model (GtkWidget *window)
|
||||
create_demo_model (void)
|
||||
{
|
||||
GListStore *store = g_list_store_new (GTK_TYPE_DEMO);
|
||||
DemoData *demo = gtk_demos;
|
||||
GtkDemo *d;
|
||||
|
||||
gtk_widget_realize (window);
|
||||
|
||||
d = GTK_DEMO (g_object_new (GTK_TYPE_DEMO, NULL));
|
||||
d->name = "main";
|
||||
d->title = "GTK Demo";
|
||||
@@ -857,20 +845,16 @@ create_demo_model (GtkWidget *window)
|
||||
|
||||
while (demo->title)
|
||||
{
|
||||
DemoData *children = demo->children;
|
||||
d = GTK_DEMO (g_object_new (GTK_TYPE_DEMO, NULL));
|
||||
DemoData *children = demo->children;
|
||||
|
||||
if (demo_can_run (window, demo->name))
|
||||
{
|
||||
d = GTK_DEMO (g_object_new (GTK_TYPE_DEMO, NULL));
|
||||
d->name = demo->name;
|
||||
d->title = demo->title;
|
||||
d->keywords = demo->keywords;
|
||||
d->filename = demo->filename;
|
||||
d->func = demo->func;
|
||||
|
||||
d->name = demo->name;
|
||||
d->title = demo->title;
|
||||
d->keywords = demo->keywords;
|
||||
d->filename = demo->filename;
|
||||
d->func = demo->func;
|
||||
|
||||
g_list_store_append (store, d);
|
||||
}
|
||||
g_list_store_append (store, d);
|
||||
|
||||
if (children)
|
||||
{
|
||||
@@ -878,19 +862,15 @@ create_demo_model (GtkWidget *window)
|
||||
|
||||
while (children->title)
|
||||
{
|
||||
if (demo_can_run (window, children->name))
|
||||
{
|
||||
GtkDemo *child = GTK_DEMO (g_object_new (GTK_TYPE_DEMO, NULL));
|
||||
GtkDemo *child = GTK_DEMO (g_object_new (GTK_TYPE_DEMO, NULL));
|
||||
|
||||
child->name = children->name;
|
||||
child->title = children->title;
|
||||
child->keywords = children->keywords;
|
||||
child->filename = children->filename;
|
||||
child->func = children->func;
|
||||
|
||||
g_list_store_append (G_LIST_STORE (d->children_model), child);
|
||||
}
|
||||
child->name = children->name;
|
||||
child->title = children->title;
|
||||
child->keywords = children->keywords;
|
||||
child->filename = children->filename;
|
||||
child->func = children->func;
|
||||
|
||||
g_list_store_append (G_LIST_STORE (d->children_model), child);
|
||||
children++;
|
||||
}
|
||||
}
|
||||
@@ -956,7 +936,7 @@ activate (GApplication *app)
|
||||
search_bar = GTK_WIDGET (gtk_builder_get_object (builder, "searchbar"));
|
||||
g_signal_connect (search_bar, "notify::search-mode-enabled", G_CALLBACK (clear_search), NULL);
|
||||
|
||||
listmodel = create_demo_model (window);
|
||||
listmodel = create_demo_model ();
|
||||
treemodel = gtk_tree_list_model_new (G_LIST_MODEL (listmodel),
|
||||
FALSE,
|
||||
TRUE,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<interface>
|
||||
<menu id="menubar">
|
||||
<submenu>
|
||||
<attribute name="label" translatable="yes">_File</attribute>
|
||||
<attribute name="label" translatable="yes">_Application</attribute>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_New</attribute>
|
||||
@@ -33,7 +33,7 @@
|
||||
</section>
|
||||
</submenu>
|
||||
<submenu>
|
||||
<attribute name="label" translatable="yes">_Preferences</attribute>
|
||||
<attribute name="label" translatable="yes">_File</attribute>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Prefer Dark Theme</attribute>
|
||||
|
||||
@@ -338,7 +338,7 @@ do_path_maze (GtkWidget *do_widget)
|
||||
GskPath *path;
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Follow the maze with the mouse");
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
|
||||
@@ -38,13 +38,13 @@ can run the build, using Ninja:
|
||||
|
||||
```
|
||||
cd builddir
|
||||
meson compile
|
||||
meson install
|
||||
ninja
|
||||
ninja install
|
||||
```
|
||||
|
||||
If you don't have permission to write to the directory you are
|
||||
installing in, you may have to change to root temporarily before
|
||||
running `meson install`.
|
||||
running `ninja install`.
|
||||
|
||||
Several environment variables are useful to pass to set before
|
||||
running *meson*. `CPPFLAGS` contains options to pass to the C
|
||||
@@ -112,10 +112,10 @@ responsible for controlling the debugging features of GTK with
|
||||
|
||||
## Dependencies
|
||||
|
||||
Before you can compile GTK, you need to have various other tools and
|
||||
libraries installed on your system. Dependencies of GTK have their own
|
||||
build systems, so you will need to refer to their own installation
|
||||
instructions.
|
||||
Before you can compile the GTK widget toolkit, you need to have
|
||||
various other tools and libraries installed on your
|
||||
system. Dependencies of GTK have their own build systems, so
|
||||
you will need to refer to their own installation instructions.
|
||||
|
||||
A particular important tool used by GTK to find its dependencies
|
||||
is `pkg-config`.
|
||||
@@ -156,8 +156,8 @@ Other libraries are maintained separately.
|
||||
the development environment for these libraries that your
|
||||
operating system vendor provides.
|
||||
- The [fontconfig](https://www.freedesktop.org/wiki/Software/fontconfig/)
|
||||
library provides Pango with a standard way of locating fonts and matching
|
||||
them against font names.
|
||||
library provides Pango with a standard way of locating
|
||||
fonts and matching them against font names.
|
||||
- [Cairo](https://www.cairographics.org) is a graphics library that
|
||||
supports vector graphics and image compositing. Both Pango and GTK
|
||||
use Cairo for drawing. Note that we also need the auxiliary cairo-gobject
|
||||
@@ -220,12 +220,13 @@ meson configure builddir
|
||||
|
||||
### `x11-backend`, `win32-backend`, `broadway-backend`, `wayland-backend` and `macos-backend`
|
||||
|
||||
Enable specific backends for GDK. If none of these options are given, the
|
||||
Wayland backend will be enabled by default, if the platform is Linux; the
|
||||
X11 backend will also be enabled by default, unless the platform is Windows,
|
||||
in which case the default is win32, or the platform is macOS, in which case
|
||||
the default is macOS. If any backend is explicitly enabled or disabled, no
|
||||
other platform will be enabled automatically.
|
||||
Enable specific backends for GDK. If none of these options
|
||||
are given, the Wayland backend will be enabled by default,
|
||||
if the platform is Linux; the X11 backend will also be enabled
|
||||
by default, unless the platform is Windows, in which case the
|
||||
default is win32, or the platform is macOS, in which case the
|
||||
default is macOS. If any backend is explicitly enabled or disabled,
|
||||
no other platform will be enabled automatically.
|
||||
|
||||
### `vulkan`
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Title: CSS in GTK
|
||||
Slug: css
|
||||
|
||||
This chapter describes how GTK uses CSS for styling and layout.
|
||||
This chapter describes how GTK uses CSS for styling and layout.
|
||||
It is not meant to be an explanation of CSS from first principles,
|
||||
but focuses on listing supported CSS features and differences
|
||||
between Web CSS and GTK.
|
||||
|
||||
@@ -28,9 +28,6 @@ GTK depends on the following libraries:
|
||||
- **OpenGL**: OpenGL is the premier environment for developing portable,
|
||||
interactive 2D and 3D graphics applications. More information available
|
||||
on the [Khronos website][opengl].
|
||||
- **Vulkan**: Vulkan is the a newer graphics API, that can be considered
|
||||
the successor of OpenGL. More information available on the
|
||||
[Khronos website][vulkan].
|
||||
- **Pango**: Pango is a library for internationalized text handling. It
|
||||
centers around the `PangoLayout` object, representing a paragraph of
|
||||
text. Pango provides the engine for `GtkTextView`, `GtkLabel`,
|
||||
@@ -63,7 +60,6 @@ GTK is divided into three parts:
|
||||
[gio]: https://developer.gnome.org/gio/stable/
|
||||
[cairo]: https://www.cairographics.org/manual/
|
||||
[opengl]: https://www.opengl.org/about/
|
||||
[vulkan]: https://www.vulkan.org/
|
||||
[pango]: https://pango.gnome.org/
|
||||
[gdkpixbuf]: https://developer.gnome.org/gdk-pixbuf/stable/
|
||||
[graphene]: https://ebassi.github.io/graphene/
|
||||
|
||||
@@ -278,11 +278,14 @@ are only available when GTK has been configured with `-Ddebug=true`.
|
||||
: OpenGL renderer information
|
||||
|
||||
`vulkan`
|
||||
: Check Vulkan errors
|
||||
: Vulkan renderer information
|
||||
|
||||
`shaders`
|
||||
: Information about shaders
|
||||
|
||||
`surface`
|
||||
: Information about surfaces
|
||||
|
||||
`fallback`
|
||||
: Information about fallback usage in renderers
|
||||
|
||||
@@ -300,6 +303,9 @@ A number of options affect behavior instead of logging:
|
||||
`full-redraw`
|
||||
: Force full redraws
|
||||
|
||||
`sync`
|
||||
: Sync after each frame
|
||||
|
||||
`staging`
|
||||
: Use a staging image for texture upload (Vulkan only)
|
||||
|
||||
@@ -341,28 +347,6 @@ a `*`, which means: try all remaining backends. The special value
|
||||
backends. For more information about selecting backends,
|
||||
see the [func@Gdk.DisplayManager.get] function.
|
||||
|
||||
### `GDK_GL_DISABLE`
|
||||
|
||||
This variable can be set to a list of values, which cause GDK to
|
||||
disable extension features of the OpenGL support.
|
||||
Note that these features may already be disabled if the GL driver
|
||||
does not support them.
|
||||
|
||||
`debug`
|
||||
: GL_KHR_debug
|
||||
|
||||
`unpack-subimage`
|
||||
:GL_EXT_unpack_subimage
|
||||
|
||||
`half-float`
|
||||
:GL_OES_vertex_half_float
|
||||
|
||||
`sync`
|
||||
:GL_ARB_sync
|
||||
|
||||
`base-instance`
|
||||
:GL_EXT_base_instance
|
||||
|
||||
### `GDK_VULKAN_DEVICE`
|
||||
|
||||
This variable can be set to the index of a Vulkan device to override
|
||||
@@ -370,7 +354,7 @@ the default selection of the device that is used for Vulkan rendering.
|
||||
The special value `list` can be used to obtain a list of all Vulkan
|
||||
devices.
|
||||
|
||||
### `GDK_VULKAN_DISABLE`
|
||||
### `GDK_VULKAN_SKIP`
|
||||
|
||||
This variable can be set to a list of values, which cause GDK to
|
||||
disable features of the Vulkan support.
|
||||
@@ -450,7 +434,7 @@ using and the GDK backend supports them:
|
||||
installation.
|
||||
|
||||
|
||||
### `GSK_GPU_DISABLE`
|
||||
### `GSK_GPU_SKIP`
|
||||
|
||||
This variable can be set to a list of values, which cause GSK to
|
||||
disable certain optimizations of the "ngl" and "vulkan" renderer.
|
||||
@@ -470,6 +454,9 @@ disable certain optimizations of the "ngl" and "vulkan" renderer.
|
||||
`mipmap`
|
||||
: Avoid creating mipmaps
|
||||
|
||||
`gl-baseinstance`
|
||||
: Assume no ARB/EXT_base_instance support
|
||||
|
||||
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.
|
||||
|
||||
@@ -482,10 +469,10 @@ 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 for
|
||||
texture sizes in the "gl" renderer. This can be used to debug issues with
|
||||
texture slicing on systems where the OpenGL texture size limit would
|
||||
otherwise make texture slicing difficult to test.
|
||||
Limit texture size to the minimum of this value and the OpenGL limit
|
||||
for texture sizes. This can be used to debug issues with texture slicing
|
||||
on systems where the OpenGL texture size limit would otherwise make
|
||||
texture slicing difficult to test.
|
||||
|
||||
### `GTK_CSD`
|
||||
|
||||
|
||||
+1
-10
@@ -1538,7 +1538,6 @@ describe_egl_config (EGLDisplay egl_display,
|
||||
EGLConfig egl_config)
|
||||
{
|
||||
EGLint red, green, blue, alpha, type;
|
||||
EGLint depth, stencil;
|
||||
|
||||
if (egl_config == NULL)
|
||||
return g_strdup ("-");
|
||||
@@ -1557,15 +1556,7 @@ describe_egl_config (EGLDisplay egl_display,
|
||||
else
|
||||
type = EGL_COLOR_COMPONENT_TYPE_FIXED_EXT;
|
||||
|
||||
if (!eglGetConfigAttrib (egl_display, egl_config, EGL_DEPTH_SIZE, &depth))
|
||||
depth = 0;
|
||||
if (!eglGetConfigAttrib (egl_display, egl_config, EGL_STENCIL_SIZE, &stencil))
|
||||
stencil = 0;
|
||||
|
||||
return g_strdup_printf ("R%dG%dB%dA%d%s%s%s", red, green, blue, alpha,
|
||||
type == EGL_COLOR_COMPONENT_TYPE_FIXED_EXT ? "" : " float",
|
||||
depth > 0 ? ", depth buffer" : "",
|
||||
stencil > 0 ? ", stencil buffer" : "");
|
||||
return g_strdup_printf ("R%dG%dB%dA%d%s", red, green, blue, alpha, type == EGL_COLOR_COMPONENT_TYPE_FIXED_EXT ? "" : " float");
|
||||
}
|
||||
|
||||
gpointer
|
||||
|
||||
+12
-12
@@ -50,6 +50,18 @@
|
||||
#include "gdkenumtypes.h"
|
||||
#include "gdkeventsprivate.h"
|
||||
|
||||
static struct {
|
||||
GdkDragAction action;
|
||||
const char *name;
|
||||
GdkCursor *cursor;
|
||||
} drag_cursors[] = {
|
||||
{ GDK_ACTION_ASK, "dnd-ask", NULL },
|
||||
{ GDK_ACTION_COPY, "copy", NULL },
|
||||
{ GDK_ACTION_MOVE, "move", NULL },
|
||||
{ GDK_ACTION_LINK, "alias", NULL },
|
||||
{ 0, "no-drop", NULL },
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_CONTENT,
|
||||
@@ -774,18 +786,6 @@ gdk_drag_handle_source_event (GdkEvent *event)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static struct {
|
||||
GdkDragAction action;
|
||||
const char *name;
|
||||
GdkCursor *cursor;
|
||||
} drag_cursors[] = {
|
||||
{ 0, "default", NULL },
|
||||
{ GDK_ACTION_ASK, "dnd-ask", NULL },
|
||||
{ GDK_ACTION_COPY, "copy", NULL },
|
||||
{ GDK_ACTION_MOVE, "move", NULL },
|
||||
{ GDK_ACTION_LINK, "alias", NULL },
|
||||
};
|
||||
|
||||
GdkCursor *
|
||||
gdk_drag_get_cursor (GdkDrag *drag,
|
||||
GdkDragAction action)
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
* the GL_UNPACK_ROW_LENGTH support
|
||||
*/
|
||||
if (gdk_gl_context_get_use_es (paint_context) &&
|
||||
!(version >= 300 || gdk_gl_context_has_feature (paint_context, GDK_GL_FEATURE_UNPACK_SUBIMAGE)))
|
||||
!(version >= 300 || gdk_gl_context_has_unpack_subimage (paint_context)))
|
||||
return;
|
||||
|
||||
/* TODO: avoid reading back non-required data due to dest clip */
|
||||
|
||||
+84
-94
@@ -103,15 +103,6 @@
|
||||
|
||||
#define DEFAULT_ALLOWED_APIS GDK_GL_API_GL | GDK_GL_API_GLES
|
||||
|
||||
static const GdkDebugKey gdk_gl_feature_keys[] = {
|
||||
{ "debug", GDK_GL_FEATURE_DEBUG, "GL_KHR_debug" },
|
||||
{ "unpack-subimage", GDK_GL_FEATURE_UNPACK_SUBIMAGE, "GL_EXT_unpack_subimage" },
|
||||
{ "half-float", GDK_GL_FEATURE_VERTEX_HALF_FLOAT, "GL_OES_vertex_half_float" },
|
||||
{ "sync", GDK_GL_FEATURE_SYNC, "GL_ARB_sync" },
|
||||
{ "base-instance", GDK_GL_FEATURE_BASE_INSTANCE, "GL_ARB_base_instance" },
|
||||
{ "buffer-storage", GDK_GL_FEATURE_BUFFER_STORAGE, "GL_EXT_buffer_storage" },
|
||||
};
|
||||
|
||||
typedef struct _GdkGLContextPrivate GdkGLContextPrivate;
|
||||
|
||||
struct _GdkGLContextPrivate
|
||||
@@ -121,9 +112,13 @@ struct _GdkGLContextPrivate
|
||||
|
||||
GdkGLMemoryFlags memory_flags[GDK_MEMORY_N_FORMATS];
|
||||
|
||||
GdkGLFeatures features;
|
||||
guint has_khr_debug : 1;
|
||||
guint use_khr_debug : 1;
|
||||
guint has_half_float : 1;
|
||||
guint has_sync : 1;
|
||||
guint has_unpack_subimage : 1;
|
||||
guint has_debug_output : 1;
|
||||
guint has_bgra : 1;
|
||||
guint extensions_checked : 1;
|
||||
guint debug_enabled : 1;
|
||||
guint forward_compatible : 1;
|
||||
@@ -295,7 +290,7 @@ gdk_gl_context_create_egl_context (GdkGLContext *context,
|
||||
GdkDisplay *display = gdk_gl_context_get_display (context);
|
||||
EGLDisplay egl_display = gdk_display_get_egl_display (display);
|
||||
GdkGLContext *share = gdk_display_get_gl_context (display);
|
||||
GdkGLContextPrivate *share_priv = share ? gdk_gl_context_get_instance_private (share) : NULL;
|
||||
GdkGLContextPrivate *share_priv = gdk_gl_context_get_instance_private (share);
|
||||
EGLConfig egl_config;
|
||||
EGLContext ctx;
|
||||
EGLint context_attribs[N_EGL_ATTRS], i = 0, flags = 0;
|
||||
@@ -903,12 +898,11 @@ gdk_gl_context_label_object_printf (GdkGLContext *context,
|
||||
|
||||
|
||||
gboolean
|
||||
gdk_gl_context_has_feature (GdkGLContext *self,
|
||||
GdkGLFeatures feature)
|
||||
gdk_gl_context_has_unpack_subimage (GdkGLContext *context)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self);
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||
|
||||
return (priv->features & feature) == feature;
|
||||
return priv->has_unpack_subimage;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1670,53 +1664,10 @@ gdk_gl_version_init_epoxy (GdkGLVersion *version)
|
||||
*version = GDK_GL_VERSION_INIT (epoxy_version / 10, epoxy_version % 10);
|
||||
}
|
||||
|
||||
static GdkGLFeatures
|
||||
gdk_gl_context_check_features (GdkGLContext *context)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||
GdkGLFeatures features = 0;
|
||||
|
||||
if (gdk_gl_context_get_use_es (context))
|
||||
{
|
||||
if (gdk_gl_version_greater_equal (&priv->gl_version, &GDK_GL_VERSION_INIT (3, 0)) ||
|
||||
epoxy_has_gl_extension ("GL_EXT_unpack_subimage"))
|
||||
features |= GDK_GL_FEATURE_UNPACK_SUBIMAGE;
|
||||
}
|
||||
else
|
||||
{
|
||||
features |= GDK_GL_FEATURE_UNPACK_SUBIMAGE;
|
||||
}
|
||||
|
||||
if (epoxy_has_gl_extension ("GL_KHR_debug"))
|
||||
features |= GDK_GL_FEATURE_DEBUG;
|
||||
|
||||
if (gdk_gl_context_check_version (context, "3.0", "3.0") ||
|
||||
epoxy_has_gl_extension ("GL_OES_vertex_half_float"))
|
||||
features |= GDK_GL_FEATURE_VERTEX_HALF_FLOAT;
|
||||
|
||||
if (gdk_gl_context_check_version (context, "3.2", "3.0") ||
|
||||
epoxy_has_gl_extension ("GL_ARB_sync") ||
|
||||
epoxy_has_gl_extension ("GL_APPLE_sync"))
|
||||
features |= GDK_GL_FEATURE_SYNC;
|
||||
|
||||
if (gdk_gl_context_check_version (context, "4.2", "9.9") ||
|
||||
epoxy_has_gl_extension ("GL_EXT_base_instance") ||
|
||||
epoxy_has_gl_extension ("GL_ARB_base_instance"))
|
||||
features |= GDK_GL_FEATURE_BASE_INSTANCE;
|
||||
|
||||
if (gdk_gl_context_check_version (context, "4.4", "9.9") ||
|
||||
epoxy_has_gl_extension ("GL_EXT_buffer_storage") ||
|
||||
epoxy_has_gl_extension ("GL_ARB_buffer_storage"))
|
||||
features |= GDK_GL_FEATURE_BUFFER_STORAGE;
|
||||
|
||||
return features;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||
GdkGLFeatures supported_features, disabled_features;
|
||||
gboolean gl_debug = FALSE;
|
||||
GdkDisplay *display;
|
||||
|
||||
@@ -1734,54 +1685,69 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
|
||||
if (priv->has_debug_output && gl_debug)
|
||||
{
|
||||
gdk_gl_context_make_current (context);
|
||||
glEnable (GL_DEBUG_OUTPUT);
|
||||
glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS);
|
||||
glDebugMessageCallback (gl_debug_message_callback, NULL);
|
||||
}
|
||||
|
||||
/* If we asked for a core profile, but didn't get one, we're in legacy mode */
|
||||
if (!gdk_gl_context_get_use_es (context) &&
|
||||
!gdk_gl_version_greater_equal (&priv->gl_version, &GDK_GL_VERSION_INIT (3, 2)))
|
||||
priv->is_legacy = TRUE;
|
||||
if (gdk_gl_context_get_use_es (context))
|
||||
{
|
||||
priv->has_unpack_subimage = gdk_gl_version_greater_equal (&priv->gl_version, &GDK_GL_VERSION_INIT (3, 0)) ||
|
||||
epoxy_has_gl_extension ("GL_EXT_unpack_subimage");
|
||||
priv->has_khr_debug = epoxy_has_gl_extension ("GL_KHR_debug");
|
||||
priv->has_bgra = epoxy_has_gl_extension ("GL_EXT_texture_format_BGRA8888");
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->has_unpack_subimage = TRUE;
|
||||
priv->has_khr_debug = epoxy_has_gl_extension ("GL_KHR_debug");
|
||||
priv->has_bgra = TRUE;
|
||||
|
||||
supported_features = gdk_gl_context_check_features (context);
|
||||
disabled_features = gdk_parse_debug_var ("GDK_GL_DISABLE",
|
||||
gdk_gl_feature_keys,
|
||||
G_N_ELEMENTS (gdk_gl_feature_keys));
|
||||
/* We asked for a core profile, but we didn't get one, so we're in legacy mode */
|
||||
if (!gdk_gl_version_greater_equal (&priv->gl_version, &GDK_GL_VERSION_INIT (3, 2)))
|
||||
priv->is_legacy = TRUE;
|
||||
}
|
||||
|
||||
priv->features = supported_features & ~disabled_features;
|
||||
|
||||
gdk_gl_context_init_memory_flags (context);
|
||||
|
||||
if ((priv->features & GDK_GL_FEATURE_DEBUG) && gl_debug)
|
||||
if (priv->has_khr_debug && gl_debug)
|
||||
{
|
||||
priv->use_khr_debug = TRUE;
|
||||
glGetIntegerv (GL_MAX_LABEL_LENGTH, &priv->max_debug_label_length);
|
||||
}
|
||||
|
||||
if (GDK_DISPLAY_DEBUG_CHECK (display, OPENGL))
|
||||
{
|
||||
int i, max_texture_size;
|
||||
glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max_texture_size);
|
||||
gdk_debug_message ("%s version: %d.%d (%s)\n"
|
||||
"* GLSL version: %s\n"
|
||||
"* Max texture size: %d\n",
|
||||
gdk_gl_context_get_use_es (context) ? "OpenGL ES" : "OpenGL",
|
||||
gdk_gl_version_get_major (&priv->gl_version), gdk_gl_version_get_minor (&priv->gl_version),
|
||||
priv->is_legacy ? "legacy" : "core",
|
||||
glGetString (GL_SHADING_LANGUAGE_VERSION),
|
||||
max_texture_size);
|
||||
gdk_debug_message ("Enabled features (use GDK_GL_DISABLE env var to disable):");
|
||||
for (i = 0; i < G_N_ELEMENTS (gdk_gl_feature_keys); i++)
|
||||
{
|
||||
gdk_debug_message (" %s: %s",
|
||||
gdk_gl_feature_keys[i].key,
|
||||
(priv->features & gdk_gl_feature_keys[i].value) ? "YES" :
|
||||
((disabled_features & gdk_gl_feature_keys[i].value) ? "disabled via env var" :
|
||||
(((supported_features & gdk_gl_feature_keys[i].value) == 0) ? "not supported" :
|
||||
"Hum, what? This should not happen.")));
|
||||
}
|
||||
}
|
||||
priv->has_half_float = gdk_gl_context_check_version (context, "3.0", "3.0") ||
|
||||
epoxy_has_gl_extension ("GL_OES_vertex_half_float");
|
||||
|
||||
priv->has_sync = gdk_gl_context_check_version (context, "3.2", "3.0") ||
|
||||
epoxy_has_gl_extension ("GL_ARB_sync") ||
|
||||
epoxy_has_gl_extension ("GL_APPLE_sync");
|
||||
|
||||
gdk_gl_context_init_memory_flags (context);
|
||||
|
||||
{
|
||||
int max_texture_size;
|
||||
glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max_texture_size);
|
||||
GDK_DISPLAY_DEBUG (gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context)), OPENGL,
|
||||
"%s version: %d.%d (%s)\n"
|
||||
"* GLSL version: %s\n"
|
||||
"* Max texture size: %d\n"
|
||||
"* Extensions checked:\n"
|
||||
" - GL_KHR_debug: %s\n"
|
||||
" - GL_EXT_unpack_subimage: %s\n"
|
||||
" - half float: %s\n"
|
||||
" - sync: %s\n"
|
||||
" - bgra: %s",
|
||||
gdk_gl_context_get_use_es (context) ? "OpenGL ES" : "OpenGL",
|
||||
gdk_gl_version_get_major (&priv->gl_version), gdk_gl_version_get_minor (&priv->gl_version),
|
||||
priv->is_legacy ? "legacy" : "core",
|
||||
glGetString (GL_SHADING_LANGUAGE_VERSION),
|
||||
max_texture_size,
|
||||
priv->has_khr_debug ? "yes" : "no",
|
||||
priv->has_unpack_subimage ? "yes" : "no",
|
||||
priv->has_half_float ? "yes" : "no",
|
||||
priv->has_sync ? "yes" : "no",
|
||||
priv->has_bgra ? "yes" : "no");
|
||||
}
|
||||
|
||||
priv->extensions_checked = TRUE;
|
||||
}
|
||||
@@ -2050,6 +2016,30 @@ gdk_gl_context_get_format_flags (GdkGLContext *self,
|
||||
return priv->memory_flags[format];
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_gl_context_has_debug (GdkGLContext *self)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self);
|
||||
|
||||
return priv->debug_enabled || priv->use_khr_debug;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_gl_context_has_vertex_half_float (GdkGLContext *self)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self);
|
||||
|
||||
return priv->has_half_float;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_gl_context_has_sync (GdkGLContext *self)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self);
|
||||
|
||||
return priv->has_sync;
|
||||
}
|
||||
|
||||
/* Return if glGenVertexArrays, glBindVertexArray and glDeleteVertexArrays
|
||||
* can be used
|
||||
*/
|
||||
|
||||
@@ -27,15 +27,6 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
GDK_GL_FEATURE_DEBUG = 1 << 0,
|
||||
GDK_GL_FEATURE_UNPACK_SUBIMAGE = 1 << 1,
|
||||
GDK_GL_FEATURE_VERTEX_HALF_FLOAT = 1 << 2,
|
||||
GDK_GL_FEATURE_SYNC = 1 << 3,
|
||||
GDK_GL_FEATURE_BASE_INSTANCE = 1 << 4,
|
||||
GDK_GL_FEATURE_BUFFER_STORAGE = 1 << 5,
|
||||
} GdkGLFeatures;
|
||||
|
||||
typedef enum {
|
||||
GDK_GL_NONE = 0,
|
||||
GDK_GL_EGL,
|
||||
@@ -151,6 +142,7 @@ void gdk_gl_context_get_matching_version (GdkGLContext
|
||||
gboolean legacy,
|
||||
GdkGLVersion *out_version);
|
||||
|
||||
gboolean gdk_gl_context_has_unpack_subimage (GdkGLContext *context);
|
||||
void gdk_gl_context_push_debug_group (GdkGLContext *context,
|
||||
const char *message);
|
||||
void gdk_gl_context_push_debug_group_printf (GdkGLContext *context,
|
||||
@@ -171,11 +163,14 @@ const char * gdk_gl_context_get_glsl_version_string (GdkGLContext
|
||||
|
||||
GdkGLMemoryFlags gdk_gl_context_get_format_flags (GdkGLContext *self,
|
||||
GdkMemoryFormat format) G_GNUC_PURE;
|
||||
gboolean gdk_gl_context_has_feature (GdkGLContext *self,
|
||||
GdkGLFeatures feature) G_GNUC_PURE;
|
||||
gboolean gdk_gl_context_has_debug (GdkGLContext *self) G_GNUC_PURE;
|
||||
|
||||
gboolean gdk_gl_context_use_es_bgra (GdkGLContext *context);
|
||||
|
||||
gboolean gdk_gl_context_has_vertex_half_float (GdkGLContext *self) G_GNUC_PURE;
|
||||
|
||||
gboolean gdk_gl_context_has_sync (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);
|
||||
|
||||
+1
-1
@@ -494,7 +494,7 @@ gdk_gl_texture_new_from_builder (GdkGLTextureBuilder *builder,
|
||||
self->id = gdk_gl_texture_builder_get_id (builder);
|
||||
GDK_TEXTURE (self)->format = gdk_gl_texture_builder_get_format (builder);
|
||||
self->has_mipmap = gdk_gl_texture_builder_get_has_mipmap (builder);
|
||||
if (gdk_gl_context_has_feature (self->context, GDK_GL_FEATURE_SYNC))
|
||||
if (gdk_gl_context_has_sync (self->context))
|
||||
self->sync = gdk_gl_texture_builder_get_sync (builder);
|
||||
self->destroy = destroy;
|
||||
self->data = data;
|
||||
|
||||
+22
-21
@@ -552,8 +552,9 @@ physical_device_supports_extension (VkPhysicalDevice device,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static GdkVulkanFeatures
|
||||
physical_device_check_features (VkPhysicalDevice device)
|
||||
static gboolean
|
||||
physical_device_check_features (VkPhysicalDevice device,
|
||||
GdkVulkanFeatures *out_features)
|
||||
{
|
||||
VkPhysicalDeviceVulkan12Features v12_features = {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES,
|
||||
@@ -562,16 +563,15 @@ physical_device_check_features (VkPhysicalDevice device)
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES,
|
||||
.pNext = &v12_features
|
||||
};
|
||||
VkPhysicalDeviceFeatures2 v10_features = {
|
||||
VkPhysicalDeviceFeatures2 features = {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
|
||||
.pNext = &ycbcr_features
|
||||
};
|
||||
VkExternalSemaphoreProperties semaphore_props = {
|
||||
.sType = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES,
|
||||
};
|
||||
GdkVulkanFeatures features;
|
||||
|
||||
vkGetPhysicalDeviceFeatures2 (device, &v10_features);
|
||||
vkGetPhysicalDeviceFeatures2 (device, &features);
|
||||
vkGetPhysicalDeviceExternalSemaphoreProperties (device,
|
||||
&(VkPhysicalDeviceExternalSemaphoreInfo) {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO,
|
||||
@@ -579,46 +579,46 @@ physical_device_check_features (VkPhysicalDevice device)
|
||||
},
|
||||
&semaphore_props);
|
||||
|
||||
features = 0;
|
||||
*out_features = 0;
|
||||
|
||||
if (v10_features.features.shaderUniformBufferArrayDynamicIndexing &&
|
||||
v10_features.features.shaderSampledImageArrayDynamicIndexing)
|
||||
features |= GDK_VULKAN_FEATURE_DYNAMIC_INDEXING;
|
||||
if (features.features.shaderUniformBufferArrayDynamicIndexing &&
|
||||
features.features.shaderSampledImageArrayDynamicIndexing)
|
||||
*out_features |= GDK_VULKAN_FEATURE_DYNAMIC_INDEXING;
|
||||
|
||||
if (v12_features.descriptorIndexing &&
|
||||
v12_features.descriptorBindingPartiallyBound &&
|
||||
v12_features.descriptorBindingVariableDescriptorCount &&
|
||||
v12_features.descriptorBindingSampledImageUpdateAfterBind &&
|
||||
v12_features.descriptorBindingStorageBufferUpdateAfterBind)
|
||||
features |= GDK_VULKAN_FEATURE_DESCRIPTOR_INDEXING;
|
||||
*out_features |= GDK_VULKAN_FEATURE_DESCRIPTOR_INDEXING;
|
||||
else if (physical_device_supports_extension (device, VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME))
|
||||
features |= GDK_VULKAN_FEATURE_DESCRIPTOR_INDEXING;
|
||||
*out_features |= GDK_VULKAN_FEATURE_DESCRIPTOR_INDEXING;
|
||||
|
||||
if (v12_features.shaderSampledImageArrayNonUniformIndexing &&
|
||||
v12_features.shaderStorageBufferArrayNonUniformIndexing)
|
||||
features |= GDK_VULKAN_FEATURE_NONUNIFORM_INDEXING;
|
||||
*out_features |= GDK_VULKAN_FEATURE_NONUNIFORM_INDEXING;
|
||||
|
||||
if (ycbcr_features.samplerYcbcrConversion ||
|
||||
physical_device_supports_extension (device, VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME))
|
||||
features |= GDK_VULKAN_FEATURE_YCBCR;
|
||||
*out_features |= GDK_VULKAN_FEATURE_YCBCR;
|
||||
|
||||
if (physical_device_supports_extension (device, VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME) &&
|
||||
physical_device_supports_extension (device, VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME))
|
||||
features |= GDK_VULKAN_FEATURE_DMABUF;
|
||||
*out_features |= GDK_VULKAN_FEATURE_DMABUF;
|
||||
|
||||
if (physical_device_supports_extension (device, VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME))
|
||||
{
|
||||
if (semaphore_props.externalSemaphoreFeatures & VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT)
|
||||
features |= GDK_VULKAN_FEATURE_SEMAPHORE_EXPORT;
|
||||
*out_features |= GDK_VULKAN_FEATURE_SEMAPHORE_EXPORT;
|
||||
|
||||
if (semaphore_props.externalSemaphoreFeatures & VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT)
|
||||
features |= GDK_VULKAN_FEATURE_SEMAPHORE_IMPORT;
|
||||
*out_features |= GDK_VULKAN_FEATURE_SEMAPHORE_IMPORT;
|
||||
}
|
||||
|
||||
if (physical_device_supports_extension (device, VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME))
|
||||
features |= GDK_VULKAN_FEATURE_INCREMENTAL_PRESENT;
|
||||
*out_features |= GDK_VULKAN_FEATURE_INCREMENTAL_PRESENT;
|
||||
|
||||
return features;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1366,7 +1366,7 @@ gdk_display_create_vulkan_device (GdkDisplay *display,
|
||||
first = 0;
|
||||
last = n_devices;
|
||||
|
||||
skip_features = gdk_parse_debug_var ("GDK_VULKAN_DISABLE",
|
||||
skip_features = gdk_parse_debug_var ("GDK_VULKAN_SKIP",
|
||||
gsk_vulkan_feature_keys,
|
||||
G_N_ELEMENTS (gsk_vulkan_feature_keys));
|
||||
|
||||
@@ -1454,7 +1454,8 @@ gdk_display_create_vulkan_device (GdkDisplay *display,
|
||||
GdkVulkanFeatures features, device_features;
|
||||
uint32_t n_queue_props;
|
||||
|
||||
device_features = physical_device_check_features (devices[i]);
|
||||
if (!physical_device_check_features (devices[i], &device_features))
|
||||
continue;
|
||||
|
||||
features = device_features & ~skip_features;
|
||||
|
||||
@@ -1539,7 +1540,7 @@ gdk_display_create_vulkan_device (GdkDisplay *display,
|
||||
display->vk_queue_family_index = j;
|
||||
display->vulkan_features = features;
|
||||
|
||||
GDK_DISPLAY_DEBUG (display, VULKAN, "Enabled features (use GDK_VULKAN_DISABLE env var to disable):");
|
||||
GDK_DISPLAY_DEBUG (display, VULKAN, "Enabled features (use GDK_VULKAN_SKIP env var to disable):");
|
||||
for (i = 0; i < G_N_ELEMENTS (gsk_vulkan_feature_keys); i++)
|
||||
{
|
||||
GDK_DISPLAY_DEBUG (display, VULKAN, " %s: %s",
|
||||
|
||||
@@ -296,6 +296,10 @@ typedef NSString *CALayerContentsGravity;
|
||||
GdkMonitor *monitor;
|
||||
GdkRectangle geometry;
|
||||
GdkRectangle workarea;
|
||||
int shadow_top = 0;
|
||||
int shadow_left = 0;
|
||||
int shadow_right = 0;
|
||||
int shadow_bottom = 0;
|
||||
GdkRectangle window_gdk;
|
||||
GdkPoint pointer_position;
|
||||
GdkPoint new_origin;
|
||||
@@ -303,6 +307,13 @@ typedef NSString *CALayerContentsGravity;
|
||||
if (!inManualMove)
|
||||
return NO;
|
||||
|
||||
/* Get our shadow so we can adjust the window position sans-shadow */
|
||||
_gdk_macos_surface_get_shadow (gdk_surface,
|
||||
&shadow_top,
|
||||
&shadow_right,
|
||||
&shadow_bottom,
|
||||
&shadow_left);
|
||||
|
||||
windowFrame = [self frame];
|
||||
currentLocation = [NSEvent mouseLocation];
|
||||
|
||||
@@ -328,9 +339,21 @@ typedef NSString *CALayerContentsGravity;
|
||||
window_gdk.width = windowFrame.size.width;
|
||||
window_gdk.height = windowFrame.size.height;
|
||||
|
||||
/* Subtract our shadowin from the window */
|
||||
window_gdk.x += shadow_left;
|
||||
window_gdk.y += shadow_top;
|
||||
window_gdk.width = window_gdk.width - shadow_left - shadow_right;
|
||||
window_gdk.height = window_gdk.height - shadow_top - shadow_bottom;
|
||||
|
||||
/* Now place things on the monitor */
|
||||
_edge_snapping_motion (&self->snapping, &pointer_position, &window_gdk);
|
||||
|
||||
/* And add our shadow back to the frame */
|
||||
window_gdk.x -= shadow_left;
|
||||
window_gdk.y -= shadow_top;
|
||||
window_gdk.width += shadow_left + shadow_right;
|
||||
window_gdk.height += shadow_top + shadow_bottom;
|
||||
|
||||
/* Convert to quartz coordinates */
|
||||
_gdk_macos_display_to_display_coords ([self gdkDisplay],
|
||||
window_gdk.x,
|
||||
@@ -692,16 +715,26 @@ typedef NSString *CALayerContentsGravity;
|
||||
|
||||
-(void)setStyleMask:(NSWindowStyleMask)styleMask
|
||||
{
|
||||
gboolean was_fullscreen;
|
||||
gboolean is_fullscreen;
|
||||
gboolean was_opaque;
|
||||
gboolean is_opaque;
|
||||
|
||||
was_fullscreen = (([self styleMask] & NSWindowStyleMaskFullScreen) != 0);
|
||||
was_opaque = (([self styleMask] & NSWindowStyleMaskTitled) != 0);
|
||||
|
||||
[super setStyleMask:styleMask];
|
||||
|
||||
is_fullscreen = (([self styleMask] & NSWindowStyleMaskFullScreen) != 0);
|
||||
is_opaque = (([self styleMask] & NSWindowStyleMaskTitled) != 0);
|
||||
|
||||
_gdk_macos_surface_update_fullscreen_state (gdk_surface);
|
||||
if (was_fullscreen != is_fullscreen)
|
||||
{
|
||||
if (was_fullscreen)
|
||||
[self setFrame:lastUnfullscreenFrame display:NO];
|
||||
|
||||
_gdk_macos_surface_update_fullscreen_state (gdk_surface);
|
||||
}
|
||||
|
||||
if (was_opaque != is_opaque)
|
||||
{
|
||||
@@ -714,11 +747,17 @@ typedef NSString *CALayerContentsGravity;
|
||||
|
||||
-(NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
|
||||
{
|
||||
GdkMacosSurface *surface = gdk_surface;
|
||||
NSRect rect;
|
||||
int shadow_top;
|
||||
|
||||
/* Allow the window to move up "shadow_top" more than normally allowed
|
||||
* by the default impl. This makes it possible to move windows with
|
||||
* client side shadow right up to the screen's menu bar. */
|
||||
_gdk_macos_surface_get_shadow (surface, &shadow_top, NULL, NULL, NULL);
|
||||
rect = [super constrainFrameRect:frameRect toScreen:screen];
|
||||
if (frameRect.origin.y > rect.origin.y)
|
||||
rect.origin.y = MIN (frameRect.origin.y, rect.origin.y);
|
||||
rect.origin.y = MIN (frameRect.origin.y, rect.origin.y + shadow_top);
|
||||
|
||||
return rect;
|
||||
}
|
||||
@@ -738,6 +777,7 @@ typedef NSString *CALayerContentsGravity;
|
||||
-(void)windowWillEnterFullScreen:(NSNotification *)aNotification
|
||||
{
|
||||
inFullscreenTransition = YES;
|
||||
lastUnfullscreenFrame = [self frame];
|
||||
}
|
||||
|
||||
-(void)windowDidEnterFullScreen:(NSNotification *)aNotification
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
|
||||
EdgeSnapping snapping;
|
||||
|
||||
NSRect lastUnfullscreenFrame;
|
||||
BOOL inFullscreenTransition;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,20 +47,20 @@ _gdk_macos_display_position_toplevel_with_parent (GdkMacosDisplay *self,
|
||||
/* Try to center on top of the parent but also try to make the whole thing
|
||||
* visible in case that lands us under the topbar/panel/etc.
|
||||
*/
|
||||
parent_rect.x = parent->root_x;
|
||||
parent_rect.y = parent->root_y;
|
||||
parent_rect.width = GDK_SURFACE (parent)->width;
|
||||
parent_rect.height = GDK_SURFACE (parent)->height;
|
||||
parent_rect.x = parent->root_x + parent->shadow_left;
|
||||
parent_rect.y = parent->root_y + parent->shadow_top;
|
||||
parent_rect.width = GDK_SURFACE (parent)->width - parent->shadow_left - parent->shadow_right;
|
||||
parent_rect.height = GDK_SURFACE (parent)->height - parent->shadow_top - parent->shadow_bottom;
|
||||
|
||||
surface_rect.width = GDK_SURFACE (surface)->width;
|
||||
surface_rect.height = GDK_SURFACE (surface)->height;
|
||||
surface_rect.width = GDK_SURFACE (surface)->width - surface->shadow_left - surface->shadow_right;
|
||||
surface_rect.height = GDK_SURFACE (surface)->height - surface->shadow_top - surface->shadow_bottom;
|
||||
surface_rect.x = parent_rect.x + ((parent_rect.width - surface_rect.width) / 2);
|
||||
surface_rect.y = parent_rect.y + ((parent_rect.height - surface_rect.height) / 2);
|
||||
|
||||
_gdk_macos_monitor_clamp (GDK_MACOS_MONITOR (monitor), &surface_rect);
|
||||
|
||||
*x = surface_rect.x;
|
||||
*y = surface_rect.y;
|
||||
*x = surface_rect.x - surface->shadow_left;
|
||||
*y = surface_rect.y - surface->shadow_top;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
@@ -99,15 +99,15 @@ _gdk_macos_display_position_toplevel (GdkMacosDisplay *self,
|
||||
gdk_macos_monitor_get_workarea (monitor, &workarea);
|
||||
|
||||
/* First place at top-left of current monitor */
|
||||
surface_rect.width = GDK_SURFACE (surface)->width;
|
||||
surface_rect.height = GDK_SURFACE (surface)->height;
|
||||
surface_rect.width = GDK_SURFACE (surface)->width - surface->shadow_left - surface->shadow_right;
|
||||
surface_rect.height = GDK_SURFACE (surface)->height - surface->shadow_top - surface->shadow_bottom;
|
||||
surface_rect.x = workarea.x + ((workarea.width - surface_rect.width) / 2);
|
||||
surface_rect.y = workarea.y + ((workarea.height - surface_rect.height) / 2);
|
||||
|
||||
_gdk_macos_monitor_clamp (GDK_MACOS_MONITOR (surface->best_monitor), &surface_rect);
|
||||
|
||||
*x = surface_rect.x;
|
||||
*y = surface_rect.y;
|
||||
*x = surface_rect.x - surface->shadow_left;
|
||||
*y = surface_rect.y - surface->shadow_top;
|
||||
|
||||
/* Try to see if there are any other surfaces at this origin and if so,
|
||||
* adjust until we get something better.
|
||||
@@ -119,11 +119,11 @@ _gdk_macos_display_position_toplevel (GdkMacosDisplay *self,
|
||||
*y += WARP_OFFSET_Y;
|
||||
|
||||
/* If we reached the bottom right, just bail and try the workspace origin */
|
||||
if (*x + WARP_OFFSET_X > workarea.x + workarea.width ||
|
||||
*y + WARP_OFFSET_Y > workarea.y + workarea.height)
|
||||
if (*x + surface->shadow_left + WARP_OFFSET_X > workarea.x + workarea.width ||
|
||||
*y + surface->shadow_top + WARP_OFFSET_Y > workarea.y + workarea.height)
|
||||
{
|
||||
*x = workarea.x;
|
||||
*y = workarea.y;
|
||||
*x = workarea.x - surface->shadow_left;
|
||||
*y = workarea.y - surface->shadow_top;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -998,9 +998,7 @@ _gdk_macos_display_get_nsevent (GdkEvent *event)
|
||||
{
|
||||
const GdkToNSEventMap *map = iter->data;
|
||||
|
||||
if (map->gdk_event->event_type == event->event_type &&
|
||||
map->gdk_event->device == event->device &&
|
||||
map->gdk_event->time == event->time)
|
||||
if (map->gdk_event == event)
|
||||
return map->nsevent;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,10 +68,19 @@ gdk_macos_popup_surface_layout (GdkMacosPopupSurface *self,
|
||||
monitor = _gdk_macos_surface_get_best_monitor (GDK_MACOS_SURFACE (self));
|
||||
gdk_macos_monitor_get_workarea (monitor, &bounds);
|
||||
|
||||
gdk_popup_layout_get_shadow_width (layout,
|
||||
&self->parent_instance.shadow_left,
|
||||
&self->parent_instance.shadow_right,
|
||||
&self->parent_instance.shadow_top,
|
||||
&self->parent_instance.shadow_bottom);
|
||||
|
||||
gdk_surface_layout_popup_helper (GDK_SURFACE (self),
|
||||
width,
|
||||
height,
|
||||
0, 0, 0, 0, /* shadow-left/right/top/bottom */
|
||||
self->parent_instance.shadow_left,
|
||||
self->parent_instance.shadow_right,
|
||||
self->parent_instance.shadow_top,
|
||||
self->parent_instance.shadow_bottom,
|
||||
monitor,
|
||||
&bounds,
|
||||
self->layout,
|
||||
|
||||
@@ -61,6 +61,11 @@ struct _GdkMacosSurface
|
||||
int height;
|
||||
} next_layout;
|
||||
|
||||
int shadow_top;
|
||||
int shadow_right;
|
||||
int shadow_bottom;
|
||||
int shadow_left;
|
||||
|
||||
cairo_rectangle_int_t next_frame;
|
||||
|
||||
gint64 pending_frame_counter;
|
||||
@@ -86,6 +91,16 @@ CGDirectDisplayID _gdk_macos_surface_get_screen_id (GdkMacosSurface
|
||||
const char *_gdk_macos_surface_get_title (GdkMacosSurface *self);
|
||||
void _gdk_macos_surface_set_title (GdkMacosSurface *self,
|
||||
const char *title);
|
||||
void _gdk_macos_surface_get_shadow (GdkMacosSurface *self,
|
||||
int *top,
|
||||
int *right,
|
||||
int *bottom,
|
||||
int *left);
|
||||
void _gdk_macos_surface_set_shadow (GdkMacosSurface *self,
|
||||
int top,
|
||||
int right,
|
||||
int bottom,
|
||||
int left);
|
||||
gboolean _gdk_macos_surface_is_opaque (GdkMacosSurface *self);
|
||||
NSView *_gdk_macos_surface_get_view (GdkMacosSurface *self);
|
||||
gboolean _gdk_macos_surface_get_modal_hint (GdkMacosSurface *self);
|
||||
|
||||
@@ -56,6 +56,14 @@ enum {
|
||||
|
||||
static GParamSpec *properties [LAST_PROP];
|
||||
|
||||
static gboolean
|
||||
window_is_fullscreen (GdkMacosSurface *self)
|
||||
{
|
||||
g_assert (GDK_IS_MACOS_SURFACE (self));
|
||||
|
||||
return ([self->window styleMask] & NSWindowStyleMaskFullScreen) != 0;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_macos_surface_request_frame (GdkMacosSurface *self)
|
||||
{
|
||||
@@ -236,6 +244,32 @@ gdk_macos_surface_get_scale (GdkSurface *surface)
|
||||
return [self->window backingScaleFactor];
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_macos_surface_set_shadow (GdkMacosSurface *surface,
|
||||
int top,
|
||||
int right,
|
||||
int bottom,
|
||||
int left)
|
||||
{
|
||||
GdkMacosSurface *self = (GdkMacosSurface *)surface;
|
||||
|
||||
g_assert (GDK_IS_MACOS_SURFACE (self));
|
||||
|
||||
if (self->shadow_top == top &&
|
||||
self->shadow_right == right &&
|
||||
self->shadow_bottom == bottom &&
|
||||
self->shadow_left == left)
|
||||
return;
|
||||
|
||||
self->shadow_top = top;
|
||||
self->shadow_right = right;
|
||||
self->shadow_bottom = bottom;
|
||||
self->shadow_left = left;
|
||||
|
||||
if (top || right || bottom || left)
|
||||
[self->window setHasShadow:NO];
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_macos_surface_begin_frame (GdkMacosSurface *self)
|
||||
{
|
||||
@@ -553,6 +587,29 @@ gdk_macos_surface_init (GdkMacosSurface *self)
|
||||
self->monitors = g_ptr_array_new_with_free_func (g_object_unref);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_macos_surface_get_shadow (GdkMacosSurface *self,
|
||||
int *top,
|
||||
int *right,
|
||||
int *bottom,
|
||||
int *left)
|
||||
{
|
||||
|
||||
g_return_if_fail (GDK_IS_MACOS_SURFACE (self));
|
||||
|
||||
if (top)
|
||||
*top = self->shadow_top;
|
||||
|
||||
if (left)
|
||||
*left = self->shadow_left;
|
||||
|
||||
if (bottom)
|
||||
*bottom = self->shadow_bottom;
|
||||
|
||||
if (right)
|
||||
*right = self->shadow_right;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gdk_macos_surface_is_opaque (GdkMacosSurface *self)
|
||||
{
|
||||
@@ -701,7 +758,7 @@ _gdk_macos_surface_update_fullscreen_state (GdkMacosSurface *self)
|
||||
g_return_if_fail (GDK_IS_MACOS_SURFACE (self));
|
||||
|
||||
state = GDK_SURFACE (self)->state;
|
||||
is_fullscreen = ([self->window styleMask] & NSWindowStyleMaskFullScreen) != 0;
|
||||
is_fullscreen = window_is_fullscreen (self);
|
||||
was_fullscreen = (state & GDK_TOPLEVEL_STATE_FULLSCREEN) != 0;
|
||||
|
||||
if (is_fullscreen != was_fullscreen)
|
||||
@@ -1048,12 +1105,16 @@ _gdk_macos_surface_monitor_changed (GdkMacosSurface *self)
|
||||
|
||||
g_set_object (&child->best_monitor, best);
|
||||
|
||||
area.x = self->root_x + GDK_SURFACE (child)->x;
|
||||
area.y = self->root_y + GDK_SURFACE (child)->y;
|
||||
area.width = GDK_SURFACE (child)->width;
|
||||
area.height = GDK_SURFACE (child)->height;
|
||||
area.x = self->root_x + GDK_SURFACE (child)->x + child->shadow_left;
|
||||
area.y = self->root_y + GDK_SURFACE (child)->y + child->shadow_top;
|
||||
area.width = GDK_SURFACE (child)->width - child->shadow_left - child->shadow_right;
|
||||
area.height = GDK_SURFACE (child)->height - child->shadow_top - child->shadow_bottom;
|
||||
|
||||
_gdk_macos_monitor_clamp (GDK_MACOS_MONITOR (best), &area);
|
||||
|
||||
area.x -= child->shadow_left;
|
||||
area.y -= child->shadow_top;
|
||||
|
||||
_gdk_macos_surface_move (child, area.x, area.y);
|
||||
gdk_surface_invalidate_rect (GDK_SURFACE (child), NULL);
|
||||
}
|
||||
|
||||
@@ -152,6 +152,13 @@ _gdk_macos_toplevel_surface_compute_size (GdkSurface *surface)
|
||||
mask = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE;
|
||||
}
|
||||
|
||||
if (size.shadow.is_valid)
|
||||
_gdk_macos_surface_set_shadow (macos_surface,
|
||||
size.shadow.top,
|
||||
size.shadow.right,
|
||||
size.shadow.bottom,
|
||||
size.shadow.left);
|
||||
|
||||
_gdk_macos_surface_set_geometry_hints (macos_surface, &geometry, mask);
|
||||
|
||||
if (surface->state & (GDK_TOPLEVEL_STATE_FULLSCREEN |
|
||||
|
||||
@@ -62,7 +62,6 @@ struct _GdkWaylandPointerData {
|
||||
uint32_t grab_time;
|
||||
|
||||
struct wl_surface *pointer_surface;
|
||||
struct wp_viewport *pointer_surface_viewport;
|
||||
guint cursor_is_default: 1;
|
||||
GdkCursor *cursor;
|
||||
guint cursor_timeout_id;
|
||||
|
||||
@@ -310,10 +310,7 @@ gdk_wayland_device_update_surface_cursor (GdkDevice *device)
|
||||
if (buffer)
|
||||
{
|
||||
wl_surface_attach (pointer->pointer_surface, buffer, 0, 0);
|
||||
if (pointer->pointer_surface_viewport)
|
||||
wp_viewport_set_destination (pointer->pointer_surface_viewport, w, h);
|
||||
else
|
||||
wl_surface_set_buffer_scale (pointer->pointer_surface, scale);
|
||||
wl_surface_set_buffer_scale (pointer->pointer_surface, scale);
|
||||
wl_surface_damage (pointer->pointer_surface, 0, 0, w, h);
|
||||
wl_surface_commit (pointer->pointer_surface);
|
||||
}
|
||||
|
||||
@@ -3878,7 +3878,6 @@ gdk_wayland_pointer_data_finalize (GdkWaylandPointerData *pointer)
|
||||
g_clear_object (&pointer->cursor);
|
||||
wl_surface_destroy (pointer->pointer_surface);
|
||||
g_slist_free (pointer->pointer_surface_outputs);
|
||||
g_clear_pointer (&pointer->pointer_surface_viewport, wp_viewport_destroy);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4242,8 +4241,6 @@ init_pointer_data (GdkWaylandPointerData *pointer_data,
|
||||
wl_surface_add_listener (pointer_data->pointer_surface,
|
||||
&pointer_surface_listener,
|
||||
logical_device);
|
||||
if (display_wayland->viewporter)
|
||||
pointer_data->pointer_surface_viewport = wp_viewporter_get_viewport (display_wayland->viewporter, pointer_data->pointer_surface);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -488,14 +488,12 @@ gsk_gl_command_queue_new (GdkGLContext *context,
|
||||
int max_texture_size = atoi (g_getenv ("GSK_MAX_TEXTURE_SIZE"));
|
||||
if (max_texture_size == 0)
|
||||
{
|
||||
g_warning ("Failed to parse %s", "GSK_MAX_TEXTURE_SIZE");
|
||||
g_warning ("Failed to parse GSK_MAX_TEXTURE_SIZE");
|
||||
}
|
||||
else
|
||||
{
|
||||
max_texture_size = MAX (max_texture_size, 512);
|
||||
GSK_DEBUG (RENDERER,
|
||||
"Limiting texture size in the GL renderer to %d (via %s)",
|
||||
max_texture_size, "GSK_MAX_TEXTURE_SIZE");
|
||||
GSK_DEBUG(OPENGL, "Limiting max texture size to %d", max_texture_size);
|
||||
self->max_texture_size = MIN (self->max_texture_size, max_texture_size);
|
||||
}
|
||||
}
|
||||
@@ -1624,7 +1622,7 @@ gsk_gl_command_queue_do_upload_texture_chunk (GskGLCommandQueue *self,
|
||||
{
|
||||
glTexSubImage2D (GL_TEXTURE_2D, 0, x, y, width, height, gl_format, gl_type, data);
|
||||
}
|
||||
else if (stride % bpp == 0 && gdk_gl_context_has_feature (self->context, GDK_GL_FEATURE_UNPACK_SUBIMAGE))
|
||||
else if (stride % bpp == 0 && gdk_gl_context_has_unpack_subimage (self->context))
|
||||
{
|
||||
glPixelStorei (GL_UNPACK_ROW_LENGTH, stride / bpp);
|
||||
|
||||
|
||||
@@ -1835,7 +1835,7 @@ gsk_gl_driver_create_gdk_texture (GskGLDriver *self,
|
||||
state = g_new0 (GskGLTextureState, 1);
|
||||
state->texture_id = texture_id;
|
||||
state->context = g_object_ref (self->command_queue->context);
|
||||
if (gdk_gl_context_has_feature (self->command_queue->context, GDK_GL_FEATURE_SYNC))
|
||||
if (gdk_gl_context_has_sync (self->command_queue->context))
|
||||
state->sync = glFenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||
|
||||
g_hash_table_steal (self->textures, GUINT_TO_POINTER (texture_id));
|
||||
|
||||
@@ -194,7 +194,7 @@ gsk_gl_renderer_realize (GskRenderer *renderer,
|
||||
{
|
||||
gdk_gl_context_make_current (context);
|
||||
|
||||
if (!gdk_gl_context_has_feature (context, GDK_GL_FEATURE_VERTEX_HALF_FLOAT))
|
||||
if (!gdk_gl_context_has_vertex_half_float (context))
|
||||
{
|
||||
int major, minor;
|
||||
|
||||
|
||||
+7
-17
@@ -52,6 +52,8 @@
|
||||
#include "ninesliceprivate.h"
|
||||
#include "fp16private.h"
|
||||
|
||||
#define ALLOW_OFFLOAD_FOR_ANY_TEXTURE 1
|
||||
|
||||
#define ORTHO_NEAR_PLANE -10000
|
||||
#define ORTHO_FAR_PLANE 10000
|
||||
#define MAX_GRADIENT_STOPS 6
|
||||
@@ -174,8 +176,6 @@ struct _GskGLRenderJob
|
||||
* looking at the format of the framebuffer we are rendering on.
|
||||
*/
|
||||
int target_format;
|
||||
|
||||
guint offscreen_count; /* if > 0, we're rendering to an offscreen */
|
||||
};
|
||||
|
||||
typedef struct _GskGLRenderOffscreen
|
||||
@@ -1235,7 +1235,7 @@ gsk_gl_render_job_visit_as_fallback (GskGLRenderJob *job,
|
||||
texture = gdk_texture_new_for_surface (surface);
|
||||
texture_id = gsk_gl_driver_load_texture (job->driver, texture, FALSE);
|
||||
|
||||
if (gdk_gl_context_has_feature (job->command_queue->context, GDK_GL_FEATURE_DEBUG))
|
||||
if (gdk_gl_context_has_debug (job->command_queue->context))
|
||||
gdk_gl_context_label_object_printf (job->command_queue->context, GL_TEXTURE, texture_id,
|
||||
"Fallback %s %d",
|
||||
g_type_name_from_instance ((GTypeInstance *) node),
|
||||
@@ -2532,7 +2532,7 @@ gsk_gl_render_job_visit_blurred_outset_shadow_node (GskGLRenderJob *job,
|
||||
get_target_format (job, node),
|
||||
&render_target);
|
||||
|
||||
if (gdk_gl_context_has_feature (context, GDK_GL_FEATURE_DEBUG))
|
||||
if (gdk_gl_context_has_debug (context))
|
||||
{
|
||||
gdk_gl_context_label_object_printf (context,
|
||||
GL_TEXTURE,
|
||||
@@ -4002,15 +4002,9 @@ gsk_gl_render_job_visit_subsurface_node (GskGLRenderJob *job,
|
||||
{
|
||||
if (!gdk_subsurface_is_above_parent (subsurface))
|
||||
{
|
||||
if (job->offscreen_count > 0)
|
||||
/* Clear the area so we can see through */
|
||||
if (gsk_gl_render_job_begin_draw (job, CHOOSE_PROGRAM (job, color)))
|
||||
{
|
||||
GDK_DISPLAY_DEBUG (gdk_gl_context_get_display (job->command_queue->context), OFFLOAD, "Hiding subsurface %p in offscreen context", subsurface);
|
||||
gdk_subsurface_detach (subsurface);
|
||||
gsk_gl_render_job_visit_node (job, gsk_subsurface_node_get_child (node));
|
||||
}
|
||||
else if (gsk_gl_render_job_begin_draw (job, CHOOSE_PROGRAM (job, color)))
|
||||
{
|
||||
/* Clear the area so we can see through */
|
||||
GskGLCommandBatch *batch;
|
||||
guint16 color[4];
|
||||
rgba_to_half (&(GdkRGBA){0,0,0,0}, color);
|
||||
@@ -4388,7 +4382,7 @@ gsk_gl_render_job_visit_node_with_offscreen (GskGLRenderJob *job,
|
||||
&render_target))
|
||||
g_assert_not_reached ();
|
||||
|
||||
if (gdk_gl_context_has_feature (job->command_queue->context, GDK_GL_FEATURE_DEBUG))
|
||||
if (gdk_gl_context_has_debug (job->command_queue->context))
|
||||
{
|
||||
gdk_gl_context_label_object_printf (job->command_queue->context,
|
||||
GL_TEXTURE,
|
||||
@@ -4428,12 +4422,8 @@ gsk_gl_render_job_visit_node_with_offscreen (GskGLRenderJob *job,
|
||||
reset_clip = TRUE;
|
||||
}
|
||||
|
||||
job->offscreen_count++;
|
||||
|
||||
gsk_gl_render_job_visit_node (job, node);
|
||||
|
||||
job->offscreen_count--;
|
||||
|
||||
if (reset_clip)
|
||||
gsk_gl_render_job_pop_clip (job);
|
||||
|
||||
|
||||
+41
-139
@@ -1,8 +1,8 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "gskglbufferprivate.h"
|
||||
#include <gdk/gdkprofilerprivate.h>
|
||||
|
||||
/* {{{ GskGLBuffer */
|
||||
#include "gskglbufferprivate.h"
|
||||
|
||||
struct _GskGLBuffer
|
||||
{
|
||||
@@ -10,16 +10,21 @@ struct _GskGLBuffer
|
||||
|
||||
GLenum target;
|
||||
GLuint buffer_id;
|
||||
GLenum access;
|
||||
guchar *data;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GskGLBuffer, gsk_gl_buffer, GSK_TYPE_GPU_BUFFER)
|
||||
|
||||
static guint profiler_buffer_uploads_id;
|
||||
static gint64 profiler_buffer_uploads;
|
||||
|
||||
static void
|
||||
gsk_gl_buffer_finalize (GObject *object)
|
||||
{
|
||||
GskGLBuffer *self = GSK_GL_BUFFER (object);
|
||||
|
||||
g_free (self->data);
|
||||
glDeleteBuffers (1, &self->buffer_id);
|
||||
|
||||
G_OBJECT_CLASS (gsk_gl_buffer_parent_class)->finalize (object);
|
||||
@@ -37,6 +42,16 @@ static void
|
||||
gsk_gl_buffer_unmap (GskGpuBuffer *buffer,
|
||||
gsize used)
|
||||
{
|
||||
GskGLBuffer *self = GSK_GL_BUFFER (buffer);
|
||||
|
||||
if (used == 0)
|
||||
return;
|
||||
|
||||
gsk_gl_buffer_bind (self);
|
||||
|
||||
profiler_buffer_uploads += used;
|
||||
glBufferSubData (self->target, 0, used, self->data);
|
||||
gdk_profiler_set_int_counter (profiler_buffer_uploads_id, profiler_buffer_uploads);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -49,6 +64,8 @@ gsk_gl_buffer_class_init (GskGLBufferClass *klass)
|
||||
buffer_class->unmap = gsk_gl_buffer_unmap;
|
||||
|
||||
gobject_class->finalize = gsk_gl_buffer_finalize;
|
||||
|
||||
profiler_buffer_uploads_id = gdk_profiler_define_int_counter ("ngl-buffer-uploads", "Number of bytes uploaded to GPU");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -56,6 +73,28 @@ gsk_gl_buffer_init (GskGLBuffer *self)
|
||||
{
|
||||
}
|
||||
|
||||
GskGpuBuffer *
|
||||
gsk_gl_buffer_new (GLenum target,
|
||||
gsize size,
|
||||
GLenum access)
|
||||
{
|
||||
GskGLBuffer *self;
|
||||
|
||||
self = g_object_new (GSK_TYPE_GL_BUFFER, NULL);
|
||||
|
||||
gsk_gpu_buffer_setup (GSK_GPU_BUFFER (self), size);
|
||||
|
||||
self->target = target;
|
||||
self->access = access;
|
||||
|
||||
glGenBuffers (1, &self->buffer_id);
|
||||
glBindBuffer (target, self->buffer_id);
|
||||
glBufferData (target, size, NULL, GL_STATIC_DRAW);
|
||||
self->data = malloc (size);
|
||||
|
||||
return GSK_GPU_BUFFER (self);
|
||||
}
|
||||
|
||||
void
|
||||
gsk_gl_buffer_bind (GskGLBuffer *self)
|
||||
{
|
||||
@@ -69,140 +108,3 @@ gsk_gl_buffer_bind_base (GskGLBuffer *self,
|
||||
glBindBufferBase (self->target, index, self->buffer_id);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gl_buffer_setup (GskGLBuffer *self,
|
||||
GLenum target,
|
||||
gsize size)
|
||||
{
|
||||
gsk_gpu_buffer_setup (GSK_GPU_BUFFER (self), size);
|
||||
|
||||
self->target = target;
|
||||
|
||||
glGenBuffers (1, &self->buffer_id);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
/* {{{ GskGLMappedBuffer */
|
||||
|
||||
struct _GskGLMappedBuffer
|
||||
{
|
||||
GskGLBuffer parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GskGLMappedBuffer, gsk_gl_mapped_buffer, GSK_TYPE_GL_BUFFER)
|
||||
|
||||
static void
|
||||
gsk_gl_mapped_buffer_finalize (GObject *object)
|
||||
{
|
||||
GskGLBuffer *self = GSK_GL_BUFFER (object);
|
||||
|
||||
gsk_gl_buffer_bind (self);
|
||||
glUnmapBuffer (self->target);
|
||||
|
||||
G_OBJECT_CLASS (gsk_gl_mapped_buffer_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gl_mapped_buffer_class_init (GskGLMappedBufferClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
gobject_class->finalize = gsk_gl_mapped_buffer_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gl_mapped_buffer_init (GskGLMappedBuffer *self)
|
||||
{
|
||||
}
|
||||
|
||||
GskGpuBuffer *
|
||||
gsk_gl_mapped_buffer_new (GLenum target,
|
||||
gsize size)
|
||||
{
|
||||
GskGLBuffer *self;
|
||||
|
||||
self = g_object_new (GSK_TYPE_GL_MAPPED_BUFFER, NULL);
|
||||
|
||||
gsk_gl_buffer_setup (self, target, size);
|
||||
gsk_gl_buffer_bind (self);
|
||||
|
||||
glBufferStorage (target,
|
||||
size,
|
||||
NULL,
|
||||
GL_MAP_READ_BIT | GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);
|
||||
self->data = glMapBufferRange (target,
|
||||
0,
|
||||
size,
|
||||
GL_MAP_READ_BIT | GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);
|
||||
|
||||
return GSK_GPU_BUFFER (self);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
/* {{{ GskGLCopiedBuffer */
|
||||
|
||||
struct _GskGLCopiedBuffer
|
||||
{
|
||||
GskGLBuffer parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GskGLCopiedBuffer, gsk_gl_copied_buffer, GSK_TYPE_GL_BUFFER)
|
||||
|
||||
static void
|
||||
gsk_gl_copied_buffer_finalize (GObject *object)
|
||||
{
|
||||
GskGLBuffer *self = GSK_GL_BUFFER (object);
|
||||
|
||||
g_free (self->data);
|
||||
|
||||
G_OBJECT_CLASS (gsk_gl_copied_buffer_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gl_copied_buffer_unmap (GskGpuBuffer *buffer,
|
||||
gsize used)
|
||||
{
|
||||
GskGLBuffer *self = GSK_GL_BUFFER (buffer);
|
||||
|
||||
if (used == 0)
|
||||
return;
|
||||
|
||||
gsk_gl_buffer_bind (self);
|
||||
|
||||
glBufferSubData (self->target, 0, used, self->data);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gl_copied_buffer_class_init (GskGLCopiedBufferClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GskGpuBufferClass *buffer_class = GSK_GPU_BUFFER_CLASS (klass);
|
||||
|
||||
gobject_class->finalize = gsk_gl_copied_buffer_finalize;
|
||||
|
||||
buffer_class->unmap = gsk_gl_copied_buffer_unmap;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gl_copied_buffer_init (GskGLCopiedBuffer *self)
|
||||
{
|
||||
}
|
||||
|
||||
GskGpuBuffer *
|
||||
gsk_gl_copied_buffer_new (GLenum target,
|
||||
gsize size)
|
||||
{
|
||||
GskGLBuffer *self;
|
||||
|
||||
self = g_object_new (GSK_TYPE_GL_COPIED_BUFFER, NULL);
|
||||
|
||||
gsk_gl_buffer_setup (self, target, size);
|
||||
gsk_gl_buffer_bind (self);
|
||||
|
||||
glBufferData (target, size, NULL, GL_STATIC_DRAW);
|
||||
self->data = malloc (size);
|
||||
|
||||
return GSK_GPU_BUFFER (self);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
@@ -7,17 +7,12 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GSK_TYPE_GL_BUFFER (gsk_gl_buffer_get_type ())
|
||||
#define GSK_TYPE_GL_MAPPED_BUFFER (gsk_gl_mapped_buffer_get_type ())
|
||||
#define GSK_TYPE_GL_COPIED_BUFFER (gsk_gl_copied_buffer_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (GskGLBuffer, gsk_gl_buffer, GSK, GL_BUFFER, GskGpuBuffer)
|
||||
G_DECLARE_FINAL_TYPE (GskGLMappedBuffer, gsk_gl_mapped_buffer, GSK, GL_MAPPED_BUFFER, GskGLBuffer)
|
||||
G_DECLARE_FINAL_TYPE (GskGLCopiedBuffer, gsk_gl_copied_buffer, GSK, GL_COPIED_BUFFER, GskGLBuffer)
|
||||
|
||||
GskGpuBuffer * gsk_gl_mapped_buffer_new (GLenum target,
|
||||
gsize size);
|
||||
GskGpuBuffer * gsk_gl_copied_buffer_new (GLenum target,
|
||||
gsize size);
|
||||
GskGpuBuffer * gsk_gl_buffer_new (GLenum target,
|
||||
gsize size,
|
||||
GLenum access);
|
||||
|
||||
void gsk_gl_buffer_bind (GskGLBuffer *self);
|
||||
void gsk_gl_buffer_bind_base (GskGLBuffer *self,
|
||||
|
||||
+3
-39
@@ -20,7 +20,6 @@ struct _GskGLFrame
|
||||
|
||||
GLuint globals_buffer_id;
|
||||
guint next_texture_slot;
|
||||
GLsync sync;
|
||||
|
||||
GHashTable *vaos;
|
||||
};
|
||||
@@ -35,23 +34,7 @@ G_DEFINE_TYPE (GskGLFrame, gsk_gl_frame, GSK_TYPE_GPU_FRAME)
|
||||
static gboolean
|
||||
gsk_gl_frame_is_busy (GskGpuFrame *frame)
|
||||
{
|
||||
GskGLFrame *self = GSK_GL_FRAME (frame);
|
||||
|
||||
if (!self->sync)
|
||||
return FALSE;
|
||||
|
||||
return glClientWaitSync (self->sync, 0, 0) == GL_TIMEOUT_EXPIRED;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gl_frame_wait (GskGpuFrame *frame)
|
||||
{
|
||||
GskGLFrame *self = GSK_GL_FRAME (frame);
|
||||
|
||||
if (!self->sync)
|
||||
return;
|
||||
|
||||
glClientWaitSync (self->sync, 0, G_MAXINT64);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -67,12 +50,6 @@ gsk_gl_frame_cleanup (GskGpuFrame *frame)
|
||||
{
|
||||
GskGLFrame *self = GSK_GL_FRAME (frame);
|
||||
|
||||
if (self->sync)
|
||||
{
|
||||
glClientWaitSync (self->sync, 0, -1);
|
||||
g_clear_pointer (&self->sync, glDeleteSync);
|
||||
}
|
||||
|
||||
self->next_texture_slot = 0;
|
||||
|
||||
GSK_GPU_FRAME_CLASS (gsk_gl_frame_parent_class)->cleanup (frame);
|
||||
@@ -147,22 +124,14 @@ gsk_gl_frame_create_vertex_buffer (GskGpuFrame *frame,
|
||||
*/
|
||||
g_hash_table_remove_all (self->vaos);
|
||||
|
||||
if (gdk_gl_context_has_feature (GDK_GL_CONTEXT (gsk_gpu_frame_get_context (frame)),
|
||||
GDK_GL_FEATURE_BUFFER_STORAGE))
|
||||
return gsk_gl_mapped_buffer_new (GL_ARRAY_BUFFER, size);
|
||||
else
|
||||
return gsk_gl_copied_buffer_new (GL_ARRAY_BUFFER, size);
|
||||
return gsk_gl_buffer_new (GL_ARRAY_BUFFER, size, GL_WRITE_ONLY);
|
||||
}
|
||||
|
||||
static GskGpuBuffer *
|
||||
gsk_gl_frame_create_storage_buffer (GskGpuFrame *frame,
|
||||
gsize size)
|
||||
{
|
||||
if (gdk_gl_context_has_feature (GDK_GL_CONTEXT (gsk_gpu_frame_get_context (frame)),
|
||||
GDK_GL_FEATURE_BUFFER_STORAGE))
|
||||
return gsk_gl_mapped_buffer_new (GL_UNIFORM_BUFFER, size);
|
||||
else
|
||||
return gsk_gl_copied_buffer_new (GL_UNIFORM_BUFFER, size);
|
||||
return gsk_gl_buffer_new (GL_UNIFORM_BUFFER, size, GL_WRITE_ONLY);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -191,10 +160,6 @@ gsk_gl_frame_submit (GskGpuFrame *frame,
|
||||
{
|
||||
op = gsk_gpu_op_gl_command (op, frame, &state);
|
||||
}
|
||||
|
||||
if (gdk_gl_context_has_feature (GDK_GL_CONTEXT (gsk_gpu_frame_get_context (frame)),
|
||||
GDK_GL_FEATURE_SYNC))
|
||||
self->sync = glFenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -215,7 +180,6 @@ gsk_gl_frame_class_init (GskGLFrameClass *klass)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
gpu_frame_class->is_busy = gsk_gl_frame_is_busy;
|
||||
gpu_frame_class->wait = gsk_gl_frame_wait;
|
||||
gpu_frame_class->setup = gsk_gl_frame_setup;
|
||||
gpu_frame_class->cleanup = gsk_gl_frame_cleanup;
|
||||
gpu_frame_class->upload_texture = gsk_gl_frame_upload_texture;
|
||||
|
||||
@@ -17,16 +17,23 @@ struct _GskGpuBlendModeOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_blend_mode_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_blend_mode_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuBlendmodeInstance *instance = (GskGpuBlendmodeInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuBlendmodeInstance *instance;
|
||||
|
||||
instance = (GskGpuBlendmodeInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "blend-mode");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->bottom_id);
|
||||
gsk_gpu_print_enum (string, GSK_TYPE_BLEND_MODE, shader->variation);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->top_id);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_BLEND_MODE_OP_CLASS = {
|
||||
@@ -34,7 +41,7 @@ static const GskGpuShaderOpClass GSK_GPU_BLEND_MODE_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuBlendModeOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_blend_mode_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -45,7 +52,6 @@ static const GskGpuShaderOpClass GSK_GPU_BLEND_MODE_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_blendmode_info,
|
||||
#endif
|
||||
gsk_gpu_blend_mode_op_print_instance,
|
||||
gsk_gpu_blendmode_setup_attrib_locations,
|
||||
gsk_gpu_blendmode_setup_vao
|
||||
};
|
||||
|
||||
+12
-6
@@ -20,15 +20,22 @@ struct _GskGpuBlurOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_blur_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_blur_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuBlurInstance *instance = (GskGpuBlurInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuBlurInstance *instance;
|
||||
|
||||
instance = (GskGpuBlurInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "blur");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
g_string_append_printf (string, "%g,%g ", instance->blur_direction[0], instance->blur_direction[1]);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->tex_id);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_BLUR_OP_CLASS = {
|
||||
@@ -36,7 +43,7 @@ static const GskGpuShaderOpClass GSK_GPU_BLUR_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuBlurOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_blur_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -47,7 +54,6 @@ static const GskGpuShaderOpClass GSK_GPU_BLUR_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_blur_info,
|
||||
#endif
|
||||
gsk_gpu_blur_op_print_instance,
|
||||
gsk_gpu_blur_setup_attrib_locations,
|
||||
gsk_gpu_blur_setup_vao
|
||||
};
|
||||
|
||||
@@ -25,12 +25,18 @@ color_equal (const float *color1,
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gpu_border_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_border_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuBorderInstance *instance = (GskGpuBorderInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuBorderInstance *instance;
|
||||
|
||||
instance = (GskGpuBorderInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "border");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rounded_rect (string, instance->outline);
|
||||
|
||||
gsk_gpu_print_rgba (string, (const float *) &instance->border_colors[0]);
|
||||
@@ -52,6 +58,8 @@ gsk_gpu_border_op_print_instance (GskGpuShaderOp *shader,
|
||||
instance->border_widths[2],
|
||||
instance->border_widths[3]);
|
||||
}
|
||||
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
@@ -77,7 +85,7 @@ static const GskGpuShaderOpClass GSK_GPU_BORDER_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuBorderOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_border_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_border_op_vk_command,
|
||||
#endif
|
||||
@@ -88,7 +96,6 @@ static const GskGpuShaderOpClass GSK_GPU_BORDER_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_border_info,
|
||||
#endif
|
||||
gsk_gpu_border_op_print_instance,
|
||||
gsk_gpu_border_setup_attrib_locations,
|
||||
gsk_gpu_border_setup_vao
|
||||
};
|
||||
|
||||
@@ -20,17 +20,24 @@ struct _GskGpuBoxShadowOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_box_shadow_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_box_shadow_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuBoxshadowInstance *instance = (GskGpuBoxshadowInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuBoxshadowInstance *instance;
|
||||
|
||||
instance = (GskGpuBoxshadowInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, shader->variation & VARIATION_INSET ? "inset-shadow" : "outset-shadow");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rounded_rect (string, instance->outline);
|
||||
gsk_gpu_print_rgba (string, instance->color);
|
||||
g_string_append_printf (string, "%g %g %g %g ",
|
||||
instance->shadow_offset[0], instance->shadow_offset[1],
|
||||
instance->blur_radius, instance->shadow_spread);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
@@ -56,7 +63,7 @@ static const GskGpuShaderOpClass GSK_GPU_BOX_SHADOW_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuBoxShadowOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_box_shadow_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_box_shadow_op_vk_command,
|
||||
#endif
|
||||
@@ -67,7 +74,6 @@ static const GskGpuShaderOpClass GSK_GPU_BOX_SHADOW_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_boxshadow_info,
|
||||
#endif
|
||||
gsk_gpu_box_shadow_op_print_instance,
|
||||
gsk_gpu_boxshadow_setup_attrib_locations,
|
||||
gsk_gpu_boxshadow_setup_vao
|
||||
};
|
||||
|
||||
+1
-10
@@ -2,8 +2,6 @@
|
||||
|
||||
#include "gskgpubufferprivate.h"
|
||||
|
||||
#include <gdk/gdkprofilerprivate.h>
|
||||
|
||||
typedef struct _GskGpuBufferPrivate GskGpuBufferPrivate;
|
||||
|
||||
struct _GskGpuBufferPrivate
|
||||
@@ -13,13 +11,9 @@ struct _GskGpuBufferPrivate
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GskGpuBuffer, gsk_gpu_buffer, G_TYPE_OBJECT)
|
||||
|
||||
static guint profiler_buffer_uploads_id;
|
||||
static gint64 profiler_buffer_uploads;
|
||||
|
||||
static void
|
||||
gsk_gpu_buffer_class_init (GskGpuBufferClass *klass)
|
||||
{
|
||||
profiler_buffer_uploads_id = gdk_profiler_define_int_counter ("ngl-buffer-uploads", "Number of bytes uploaded to GPU");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -35,7 +29,7 @@ gsk_gpu_buffer_setup (GskGpuBuffer *self,
|
||||
|
||||
priv->size = size;
|
||||
}
|
||||
|
||||
|
||||
gsize
|
||||
gsk_gpu_buffer_get_size (GskGpuBuffer *self)
|
||||
{
|
||||
@@ -55,8 +49,5 @@ gsk_gpu_buffer_unmap (GskGpuBuffer *self,
|
||||
gsize size)
|
||||
{
|
||||
GSK_GPU_BUFFER_GET_CLASS (self)->unmap (self, size);
|
||||
|
||||
profiler_buffer_uploads += size;
|
||||
gdk_profiler_set_int_counter (profiler_buffer_uploads_id, profiler_buffer_uploads);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,15 +16,22 @@ struct _GskGpuColorizeOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_colorize_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_colorize_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuColorizeInstance *instance = (GskGpuColorizeInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuColorizeInstance *instance;
|
||||
|
||||
instance = (GskGpuColorizeInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "colorize");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->tex_id);
|
||||
gsk_gpu_print_rgba (string, instance->color);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_COLORIZE_OP_CLASS = {
|
||||
@@ -32,7 +39,7 @@ static const GskGpuShaderOpClass GSK_GPU_COLORIZE_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuColorizeOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_colorize_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -43,7 +50,6 @@ static const GskGpuShaderOpClass GSK_GPU_COLORIZE_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_colorize_info,
|
||||
#endif
|
||||
gsk_gpu_colorize_op_print_instance,
|
||||
gsk_gpu_colorize_setup_attrib_locations,
|
||||
gsk_gpu_colorize_setup_vao
|
||||
};
|
||||
|
||||
@@ -16,14 +16,21 @@ struct _GskGpuColorMatrixOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_color_matrix_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_color_matrix_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuColormatrixInstance *instance = (GskGpuColormatrixInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuColormatrixInstance *instance;
|
||||
|
||||
instance = (GskGpuColormatrixInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "color-matrix");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->tex_id);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_COLOR_MATRIX_OP_CLASS = {
|
||||
@@ -31,7 +38,7 @@ static const GskGpuShaderOpClass GSK_GPU_COLOR_MATRIX_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuColorMatrixOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_color_matrix_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -42,7 +49,6 @@ static const GskGpuShaderOpClass GSK_GPU_COLOR_MATRIX_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_colormatrix_info,
|
||||
#endif
|
||||
gsk_gpu_color_matrix_op_print_instance,
|
||||
gsk_gpu_colormatrix_setup_attrib_locations,
|
||||
gsk_gpu_colormatrix_setup_vao
|
||||
};
|
||||
|
||||
+12
-6
@@ -17,14 +17,21 @@ struct _GskGpuColorOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_color_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_color_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuColorInstance *instance = (GskGpuColorInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuColorInstance *instance;
|
||||
|
||||
instance = (GskGpuColorInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "color");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_rgba (string, instance->color);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_COLOR_OP_CLASS = {
|
||||
@@ -32,7 +39,7 @@ static const GskGpuShaderOpClass GSK_GPU_COLOR_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuColorOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_color_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -43,7 +50,6 @@ static const GskGpuShaderOpClass GSK_GPU_COLOR_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_color_info,
|
||||
#endif
|
||||
gsk_gpu_color_op_print_instance,
|
||||
gsk_gpu_color_setup_attrib_locations,
|
||||
gsk_gpu_color_setup_vao
|
||||
};
|
||||
|
||||
@@ -18,13 +18,20 @@ struct _GskGpuConicGradientOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_conic_gradient_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_conic_gradient_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuConicgradientInstance *instance = (GskGpuConicgradientInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuConicgradientInstance *instance;
|
||||
|
||||
instance = (GskGpuConicgradientInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "conic-gradient");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_CONIC_GRADIENT_OP_CLASS = {
|
||||
@@ -32,7 +39,7 @@ static const GskGpuShaderOpClass GSK_GPU_CONIC_GRADIENT_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuConicGradientOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_conic_gradient_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -43,7 +50,6 @@ static const GskGpuShaderOpClass GSK_GPU_CONIC_GRADIENT_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_conicgradient_info,
|
||||
#endif
|
||||
gsk_gpu_conic_gradient_op_print_instance,
|
||||
gsk_gpu_conicgradient_setup_attrib_locations,
|
||||
gsk_gpu_conicgradient_setup_vao
|
||||
};
|
||||
|
||||
@@ -16,16 +16,23 @@ struct _GskGpuCrossFadeOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_cross_fade_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_cross_fade_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuCrossfadeInstance *instance = (GskGpuCrossfadeInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuCrossfadeInstance *instance;
|
||||
|
||||
instance = (GskGpuCrossfadeInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "cross-fade");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->start_id);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->end_id);
|
||||
g_string_append_printf (string, "%g%%", 100 * instance->opacity_progress[1]);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_CROSS_FADE_OP_CLASS = {
|
||||
@@ -33,7 +40,7 @@ static const GskGpuShaderOpClass GSK_GPU_CROSS_FADE_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuCrossFadeOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_cross_fade_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -44,7 +51,6 @@ static const GskGpuShaderOpClass GSK_GPU_CROSS_FADE_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_crossfade_info,
|
||||
#endif
|
||||
gsk_gpu_cross_fade_op_print_instance,
|
||||
gsk_gpu_crossfade_setup_attrib_locations,
|
||||
gsk_gpu_crossfade_setup_vao
|
||||
};
|
||||
|
||||
@@ -272,7 +272,7 @@ gsk_gpu_download_op_gl_command (GskGpuOp *op,
|
||||
data->context = g_object_ref (context);
|
||||
data->texture_id = gsk_gl_image_steal_texture (GSK_GL_IMAGE (self->image));
|
||||
|
||||
if (gdk_gl_context_has_feature (context, GDK_GL_FEATURE_SYNC))
|
||||
if (gdk_gl_context_has_sync (context))
|
||||
data->sync = glFenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||
|
||||
builder = gdk_gl_texture_builder_new ();
|
||||
|
||||
+27
-71
@@ -40,7 +40,6 @@ struct _GskGpuFramePrivate
|
||||
|
||||
GskGpuOps ops;
|
||||
GskGpuOp *first_op;
|
||||
GskGpuOp *last_op;
|
||||
|
||||
GskGpuBuffer *vertex_buffer;
|
||||
guchar *vertex_buffer_data;
|
||||
@@ -71,8 +70,6 @@ gsk_gpu_frame_default_cleanup (GskGpuFrame *self)
|
||||
gsk_gpu_op_finish (op);
|
||||
}
|
||||
gsk_gpu_ops_set_size (&priv->ops, 0);
|
||||
|
||||
priv->last_op = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -251,35 +248,27 @@ gsk_gpu_frame_sort_render_pass (GskGpuFrame *self,
|
||||
SortData *sort_data)
|
||||
{
|
||||
SortData subpasses = { { NULL, NULL }, { NULL, NULL } };
|
||||
SortData pass = { { NULL, NULL }, { NULL, NULL } };
|
||||
|
||||
if (op->op_class->stage == GSK_GPU_STAGE_BEGIN_PASS)
|
||||
{
|
||||
pass.command.first = op;
|
||||
pass.command.last = op;
|
||||
op = op->next;
|
||||
}
|
||||
|
||||
while (op)
|
||||
{
|
||||
switch (op->op_class->stage)
|
||||
{
|
||||
case GSK_GPU_STAGE_UPLOAD:
|
||||
if (pass.upload.first == NULL)
|
||||
pass.upload.first = op;
|
||||
if (sort_data->upload.first == NULL)
|
||||
sort_data->upload.first = op;
|
||||
else
|
||||
pass.upload.last->next = op;
|
||||
pass.upload.last = op;
|
||||
sort_data->upload.last->next = op;
|
||||
sort_data->upload.last = op;
|
||||
op = op->next;
|
||||
break;
|
||||
|
||||
case GSK_GPU_STAGE_COMMAND:
|
||||
case GSK_GPU_STAGE_SHADER:
|
||||
if (pass.command.first == NULL)
|
||||
pass.command.first = op;
|
||||
if (sort_data->command.first == NULL)
|
||||
sort_data->command.first = op;
|
||||
else
|
||||
pass.command.last->next = op;
|
||||
pass.command.last = op;
|
||||
sort_data->command.last->next = op;
|
||||
sort_data->command.last = op;
|
||||
op = op->next;
|
||||
break;
|
||||
|
||||
@@ -293,13 +282,19 @@ gsk_gpu_frame_sort_render_pass (GskGpuFrame *self,
|
||||
break;
|
||||
|
||||
case GSK_GPU_STAGE_BEGIN_PASS:
|
||||
if (subpasses.command.first == NULL)
|
||||
subpasses.command.first = op;
|
||||
else
|
||||
subpasses.command.last->next = op;
|
||||
subpasses.command.last = op;
|
||||
|
||||
/* append subpass to existing subpasses */
|
||||
op = gsk_gpu_frame_sort_render_pass (self, op, &subpasses);
|
||||
op = gsk_gpu_frame_sort_render_pass (self, op->next, &subpasses);
|
||||
break;
|
||||
|
||||
case GSK_GPU_STAGE_END_PASS:
|
||||
pass.command.last->next = op;
|
||||
pass.command.last = op;
|
||||
sort_data->command.last->next = op;
|
||||
sort_data->command.last = op;
|
||||
op = op->next;
|
||||
goto out;
|
||||
|
||||
@@ -310,38 +305,22 @@ gsk_gpu_frame_sort_render_pass (GskGpuFrame *self,
|
||||
}
|
||||
|
||||
out:
|
||||
/* append to the sort data, first the subpasses, then the current pass */
|
||||
/* prepend subpasses to the current pass */
|
||||
if (subpasses.upload.first)
|
||||
{
|
||||
if (sort_data->upload.first != NULL)
|
||||
sort_data->upload.last->next = subpasses.upload.first;
|
||||
subpasses.upload.last->next = sort_data->upload.first;
|
||||
else
|
||||
sort_data->upload.first = subpasses.upload.first;
|
||||
sort_data->upload.last = subpasses.upload.last;
|
||||
}
|
||||
if (pass.upload.first)
|
||||
{
|
||||
if (sort_data->upload.first != NULL)
|
||||
sort_data->upload.last->next = pass.upload.first;
|
||||
else
|
||||
sort_data->upload.first = pass.upload.first;
|
||||
sort_data->upload.last = pass.upload.last;
|
||||
sort_data->upload.last = subpasses.upload.last;
|
||||
sort_data->upload.first = subpasses.upload.first;
|
||||
}
|
||||
if (subpasses.command.first)
|
||||
{
|
||||
if (sort_data->command.first != NULL)
|
||||
sort_data->command.last->next = subpasses.command.first;
|
||||
subpasses.command.last->next = sort_data->command.first;
|
||||
else
|
||||
sort_data->command.first = subpasses.command.first;
|
||||
sort_data->command.last = subpasses.command.last;
|
||||
}
|
||||
if (pass.command.first)
|
||||
{
|
||||
if (sort_data->command.first != NULL)
|
||||
sort_data->command.last->next = pass.command.first;
|
||||
else
|
||||
sort_data->command.first = pass.command.first;
|
||||
sort_data->command.last = pass.command.last;
|
||||
sort_data->command.last = subpasses.command.last;
|
||||
sort_data->command.first = subpasses.command.first;
|
||||
}
|
||||
|
||||
return op;
|
||||
@@ -352,13 +331,8 @@ gsk_gpu_frame_sort_ops (GskGpuFrame *self)
|
||||
{
|
||||
GskGpuFramePrivate *priv = gsk_gpu_frame_get_instance_private (self);
|
||||
SortData sort_data = { { NULL, }, };
|
||||
GskGpuOp *op;
|
||||
|
||||
op = priv->first_op;
|
||||
while (op)
|
||||
{
|
||||
op = gsk_gpu_frame_sort_render_pass (self, op, &sort_data);
|
||||
}
|
||||
|
||||
gsk_gpu_frame_sort_render_pass (self, priv->first_op, &sort_data);
|
||||
|
||||
if (sort_data.upload.first)
|
||||
{
|
||||
@@ -369,8 +343,6 @@ gsk_gpu_frame_sort_ops (GskGpuFrame *self)
|
||||
priv->first_op = sort_data.command.first;
|
||||
if (sort_data.command.last)
|
||||
sort_data.command.last->next = NULL;
|
||||
|
||||
priv->last_op = NULL;
|
||||
}
|
||||
|
||||
gpointer
|
||||
@@ -388,17 +360,7 @@ gsk_gpu_frame_alloc_op (GskGpuFrame *self,
|
||||
NULL,
|
||||
size);
|
||||
|
||||
priv->last_op = (GskGpuOp *) gsk_gpu_ops_index (&priv->ops, pos);
|
||||
|
||||
return priv->last_op;
|
||||
}
|
||||
|
||||
GskGpuOp *
|
||||
gsk_gpu_frame_get_last_op (GskGpuFrame *self)
|
||||
{
|
||||
GskGpuFramePrivate *priv = gsk_gpu_frame_get_instance_private (self);
|
||||
|
||||
return priv->last_op;
|
||||
return gsk_gpu_ops_index (&priv->ops, pos);
|
||||
}
|
||||
|
||||
GskGpuImage *
|
||||
@@ -543,12 +505,6 @@ gsk_gpu_frame_is_busy (GskGpuFrame *self)
|
||||
return GSK_GPU_FRAME_GET_CLASS (self)->is_busy (self);
|
||||
}
|
||||
|
||||
void
|
||||
gsk_gpu_frame_wait (GskGpuFrame *self)
|
||||
{
|
||||
GSK_GPU_FRAME_GET_CLASS (self)->wait (self);
|
||||
}
|
||||
|
||||
static void
|
||||
copy_texture (gpointer user_data,
|
||||
GdkTexture *texture)
|
||||
|
||||
@@ -24,7 +24,6 @@ struct _GskGpuFrameClass
|
||||
GObjectClass parent_class;
|
||||
|
||||
gboolean (* is_busy) (GskGpuFrame *self);
|
||||
void (* wait) (GskGpuFrame *self);
|
||||
void (* setup) (GskGpuFrame *self);
|
||||
void (* cleanup) (GskGpuFrame *self);
|
||||
GskGpuImage * (* upload_texture) (GskGpuFrame *self,
|
||||
@@ -70,7 +69,6 @@ GskGpuBuffer * gsk_gpu_frame_write_storage_buffer (GskGpuF
|
||||
gsize *out_offset);
|
||||
|
||||
gboolean gsk_gpu_frame_is_busy (GskGpuFrame *self);
|
||||
void gsk_gpu_frame_wait (GskGpuFrame *self);
|
||||
|
||||
void gsk_gpu_frame_render (GskGpuFrame *self,
|
||||
gint64 timestamp,
|
||||
@@ -85,7 +83,6 @@ void gsk_gpu_frame_download_texture (GskGpuF
|
||||
GdkMemoryFormat format,
|
||||
guchar *data,
|
||||
gsize stride);
|
||||
GskGpuOp *gsk_gpu_frame_get_last_op (GskGpuFrame *self);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GskGpuFrame, g_object_unref)
|
||||
|
||||
|
||||
@@ -19,15 +19,23 @@ struct _GskGpuLinearGradientOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_linear_gradient_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_linear_gradient_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuLineargradientInstance *instance = (GskGpuLineargradientInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuLineargradientInstance *instance;
|
||||
|
||||
instance = (GskGpuLineargradientInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
if (shader->variation & VARIATION_REPEATING)
|
||||
gsk_gpu_print_string (string, "repeating");
|
||||
gsk_gpu_print_op (string, indent, "repeating-linear-gradient");
|
||||
else
|
||||
gsk_gpu_print_op (string, indent, "linear-gradient");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_LINEAR_GRADIENT_OP_CLASS = {
|
||||
@@ -35,7 +43,7 @@ static const GskGpuShaderOpClass GSK_GPU_LINEAR_GRADIENT_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuLinearGradientOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_linear_gradient_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -46,7 +54,6 @@ static const GskGpuShaderOpClass GSK_GPU_LINEAR_GRADIENT_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_lineargradient_info,
|
||||
#endif
|
||||
gsk_gpu_linear_gradient_op_print_instance,
|
||||
gsk_gpu_lineargradient_setup_attrib_locations,
|
||||
gsk_gpu_lineargradient_setup_vao
|
||||
};
|
||||
|
||||
+12
-6
@@ -16,15 +16,22 @@ struct _GskGpuMaskOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_mask_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_mask_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuMaskInstance *instance = (GskGpuMaskInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuMaskInstance *instance;
|
||||
|
||||
instance = (GskGpuMaskInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "mask");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->source_id);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->mask_id);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_MASK_OP_CLASS = {
|
||||
@@ -32,7 +39,7 @@ static const GskGpuShaderOpClass GSK_GPU_MASK_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuMaskOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_mask_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -43,7 +50,6 @@ static const GskGpuShaderOpClass GSK_GPU_MASK_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_mask_info,
|
||||
#endif
|
||||
gsk_gpu_mask_op_print_instance,
|
||||
gsk_gpu_mask_setup_attrib_locations,
|
||||
gsk_gpu_mask_setup_vao
|
||||
};
|
||||
|
||||
@@ -3000,12 +3000,8 @@ gsk_gpu_node_processor_add_glyph_node (GskGpuNodeProcessor *self,
|
||||
guint i, num_glyphs;
|
||||
float scale, inv_scale;
|
||||
GdkRGBA color;
|
||||
float align_scale_x, align_scale_y;
|
||||
float inv_align_scale_x, inv_align_scale_y;
|
||||
unsigned int flags_mask;
|
||||
GskGpuImage *last_image;
|
||||
guint32 descriptor;
|
||||
const float inv_pango_scale = 1.f / PANGO_SCALE;
|
||||
gboolean glyph_align;
|
||||
gboolean hinting;
|
||||
|
||||
if (self->opacity < 1.0 &&
|
||||
gsk_text_node_has_color_glyphs (node))
|
||||
@@ -3021,6 +3017,7 @@ gsk_gpu_node_processor_add_glyph_node (GskGpuNodeProcessor *self,
|
||||
num_glyphs = gsk_text_node_get_num_glyphs (node);
|
||||
glyphs = gsk_text_node_get_glyphs (node, NULL);
|
||||
font = gsk_text_node_get_font (node);
|
||||
hinting = gsk_text_node_use_font_hinting (node);
|
||||
offset = *gsk_text_node_get_offset (node);
|
||||
offset.x += self->offset.x;
|
||||
offset.y += self->offset.y;
|
||||
@@ -3028,38 +3025,44 @@ gsk_gpu_node_processor_add_glyph_node (GskGpuNodeProcessor *self,
|
||||
scale = MAX (graphene_vec2_get_x (&self->scale), graphene_vec2_get_y (&self->scale));
|
||||
inv_scale = 1.f / scale;
|
||||
|
||||
if (gsk_font_get_hint_style (font) != CAIRO_HINT_STYLE_NONE)
|
||||
{
|
||||
align_scale_x = scale * 4;
|
||||
align_scale_y = scale;
|
||||
flags_mask = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
align_scale_x = align_scale_y = scale * 4;
|
||||
flags_mask = 15;
|
||||
}
|
||||
glyph_align = gsk_gpu_frame_should_optimize (self->frame, GSK_GPU_OPTIMIZE_GLYPH_ALIGN);
|
||||
|
||||
inv_align_scale_x = 1 / align_scale_x;
|
||||
inv_align_scale_y = 1 / align_scale_y;
|
||||
|
||||
last_image = NULL;
|
||||
descriptor = 0;
|
||||
for (i = 0; i < num_glyphs; i++)
|
||||
{
|
||||
GskGpuImage *image;
|
||||
graphene_rect_t glyph_bounds, glyph_tex_rect;
|
||||
graphene_point_t glyph_offset, glyph_origin;
|
||||
guint32 descriptor;
|
||||
GskGpuGlyphLookupFlags flags;
|
||||
|
||||
glyph_origin = GRAPHENE_POINT_INIT (offset.x + glyphs[i].geometry.x_offset * inv_pango_scale,
|
||||
offset.y + glyphs[i].geometry.y_offset * inv_pango_scale);
|
||||
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);
|
||||
|
||||
glyph_origin.x = floorf (glyph_origin.x * align_scale_x + 0.5f);
|
||||
glyph_origin.y = floorf (glyph_origin.y * align_scale_y + 0.5f);
|
||||
flags = (((int) glyph_origin.x & 3) | (((int) glyph_origin.y & 3) << 2)) & flags_mask;
|
||||
glyph_origin.x *= inv_align_scale_x;
|
||||
glyph_origin.y *= inv_align_scale_y;
|
||||
if (hinting && glyph_align)
|
||||
{
|
||||
/* Force glyph_origin.y to be device pixel aligned.
|
||||
* The hinter expects that.
|
||||
*/
|
||||
glyph_origin.x = floor (glyph_origin.x * scale * 4 + .5);
|
||||
flags = ((int) glyph_origin.x & 3);
|
||||
glyph_origin.x = 0.25 * inv_scale * glyph_origin.x;
|
||||
glyph_origin.y = floor (glyph_origin.y * scale + .5) * inv_scale;
|
||||
}
|
||||
else if (glyph_align)
|
||||
{
|
||||
glyph_origin.x = floor (glyph_origin.x * scale * 4 + .5);
|
||||
glyph_origin.y = floor (glyph_origin.y * scale * 4 + .5);
|
||||
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
|
||||
{
|
||||
glyph_origin.x = floor (glyph_origin.x * scale + .5) * inv_scale;
|
||||
glyph_origin.y = floor (glyph_origin.y * scale + .5) * inv_scale;
|
||||
flags = 0;
|
||||
}
|
||||
|
||||
image = gsk_gpu_device_lookup_glyph_image (device,
|
||||
self->frame,
|
||||
@@ -3081,11 +3084,7 @@ gsk_gpu_node_processor_add_glyph_node (GskGpuNodeProcessor *self,
|
||||
glyph_origin = GRAPHENE_POINT_INIT (glyph_origin.x - glyph_offset.x * inv_scale,
|
||||
glyph_origin.y - glyph_offset.y * inv_scale);
|
||||
|
||||
if (image != last_image)
|
||||
{
|
||||
descriptor = gsk_gpu_node_processor_add_image (self, image, GSK_GPU_SAMPLER_DEFAULT);
|
||||
last_image = image;
|
||||
}
|
||||
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,
|
||||
@@ -3105,7 +3104,7 @@ gsk_gpu_node_processor_add_glyph_node (GskGpuNodeProcessor *self,
|
||||
&glyph_tex_rect,
|
||||
&color);
|
||||
|
||||
offset.x += glyphs[i].geometry.width * inv_pango_scale;
|
||||
offset.x += (float) glyphs[i].geometry.width / PANGO_SCALE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3122,10 +3121,8 @@ gsk_gpu_node_processor_create_glyph_pattern (GskGpuPatternWriter *self,
|
||||
guint32 tex_id;
|
||||
GskGpuImage *last_image;
|
||||
graphene_point_t offset;
|
||||
float align_scale_x, align_scale_y;
|
||||
float inv_align_scale_x, inv_align_scale_y;
|
||||
unsigned int flags_mask;
|
||||
const float inv_pango_scale = 1.f / PANGO_SCALE;
|
||||
gboolean glyph_align;
|
||||
gboolean hinting;
|
||||
|
||||
if (gsk_text_node_has_color_glyphs (node))
|
||||
return FALSE;
|
||||
@@ -3145,20 +3142,8 @@ gsk_gpu_node_processor_create_glyph_pattern (GskGpuPatternWriter *self,
|
||||
gsk_gpu_pattern_writer_append_rgba (self, gsk_text_node_get_color (node));
|
||||
gsk_gpu_pattern_writer_append_uint (self, num_glyphs);
|
||||
|
||||
if (gsk_font_get_hint_style (font) != CAIRO_HINT_STYLE_NONE)
|
||||
{
|
||||
align_scale_x = scale * 4;
|
||||
align_scale_y = scale;
|
||||
flags_mask = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
align_scale_x = align_scale_y = scale * 4;
|
||||
flags_mask = 15;
|
||||
}
|
||||
|
||||
inv_align_scale_x = 1 / align_scale_x;
|
||||
inv_align_scale_y = 1 / align_scale_y;
|
||||
glyph_align = gsk_gpu_frame_should_optimize (self->frame, GSK_GPU_OPTIMIZE_GLYPH_ALIGN);
|
||||
hinting = gsk_font_get_hint_style (font) != CAIRO_HINT_STYLE_NONE;
|
||||
|
||||
last_image = NULL;
|
||||
for (i = 0; i < num_glyphs; i++)
|
||||
@@ -3168,14 +3153,34 @@ gsk_gpu_node_processor_create_glyph_pattern (GskGpuPatternWriter *self,
|
||||
graphene_point_t glyph_offset, glyph_origin;
|
||||
GskGpuGlyphLookupFlags flags;
|
||||
|
||||
glyph_origin = GRAPHENE_POINT_INIT (offset.x + glyphs[i].geometry.x_offset * inv_pango_scale,
|
||||
offset.y + glyphs[i].geometry.y_offset * inv_pango_scale);
|
||||
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);
|
||||
|
||||
glyph_origin.x = floorf (glyph_origin.x * align_scale_x + 0.5f);
|
||||
glyph_origin.y = floorf (glyph_origin.y * align_scale_y + 0.5f);
|
||||
flags = (((int) glyph_origin.x & 3) | (((int) glyph_origin.y & 3) << 2)) & flags_mask;
|
||||
glyph_origin.x *= inv_align_scale_x;
|
||||
glyph_origin.y *= inv_align_scale_y;
|
||||
if (hinting && glyph_align)
|
||||
{
|
||||
/* Force glyph_origin.y to be device pixel aligned.
|
||||
* The hinter expects that.
|
||||
*/
|
||||
glyph_origin.x = roundf (glyph_origin.x * scale * 4);
|
||||
flags = ((int) glyph_origin.x & 3);
|
||||
glyph_origin.x = 0.25 * inv_scale * glyph_origin.x;
|
||||
glyph_origin.y = roundf (glyph_origin.y * scale) * inv_scale;
|
||||
}
|
||||
else 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
|
||||
{
|
||||
glyph_origin.x = roundf (glyph_origin.x * scale) * inv_scale;
|
||||
glyph_origin.y = roundf (glyph_origin.y * scale) * inv_scale;
|
||||
flags = 0;
|
||||
}
|
||||
|
||||
image = gsk_gpu_device_lookup_glyph_image (device,
|
||||
self->frame,
|
||||
@@ -3215,7 +3220,7 @@ gsk_gpu_node_processor_create_glyph_pattern (GskGpuPatternWriter *self,
|
||||
),
|
||||
&glyph_origin);
|
||||
|
||||
offset.x += glyphs[i].geometry.width * inv_pango_scale;
|
||||
offset.x += (float) glyphs[i].geometry.width / PANGO_SCALE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -19,15 +19,23 @@ struct _GskGpuRadialGradientOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_radial_gradient_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_radial_gradient_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuRadialgradientInstance *instance = (GskGpuRadialgradientInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuRadialgradientInstance *instance;
|
||||
|
||||
instance = (GskGpuRadialgradientInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
if (shader->variation & VARIATION_REPEATING)
|
||||
gsk_gpu_print_string (string, "repeating");
|
||||
gsk_gpu_print_op (string, indent, "repeating-radial-gradient");
|
||||
else
|
||||
gsk_gpu_print_op (string, indent, "radial-gradient");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_RADIAL_GRADIENT_OP_CLASS = {
|
||||
@@ -35,7 +43,7 @@ static const GskGpuShaderOpClass GSK_GPU_RADIAL_GRADIENT_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuRadialGradientOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_radial_gradient_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -46,7 +54,6 @@ static const GskGpuShaderOpClass GSK_GPU_RADIAL_GRADIENT_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_radialgradient_info,
|
||||
#endif
|
||||
gsk_gpu_radial_gradient_op_print_instance,
|
||||
gsk_gpu_radialgradient_setup_attrib_locations,
|
||||
gsk_gpu_radialgradient_setup_vao
|
||||
};
|
||||
|
||||
+35
-30
@@ -30,6 +30,9 @@ 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" },
|
||||
};
|
||||
|
||||
typedef struct _GskGpuRendererPrivate GskGpuRendererPrivate;
|
||||
@@ -164,36 +167,24 @@ static GskGpuFrame *
|
||||
gsk_gpu_renderer_get_frame (GskGpuRenderer *self)
|
||||
{
|
||||
GskGpuRendererPrivate *priv = gsk_gpu_renderer_get_instance_private (self);
|
||||
GskGpuFrame *earliest_frame = NULL;
|
||||
gint64 earliest_time = G_MAXINT64;
|
||||
guint i;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (priv->frames); i++)
|
||||
while (TRUE)
|
||||
{
|
||||
gint64 timestamp;
|
||||
|
||||
if (priv->frames[i] == NULL)
|
||||
for (i = 0; i < G_N_ELEMENTS (priv->frames); i++)
|
||||
{
|
||||
priv->frames[i] = gsk_gpu_renderer_create_frame (self);
|
||||
return priv->frames[i];
|
||||
if (priv->frames[i] == NULL)
|
||||
{
|
||||
priv->frames[i] = gsk_gpu_renderer_create_frame (self);
|
||||
return priv->frames[i];
|
||||
}
|
||||
|
||||
if (!gsk_gpu_frame_is_busy (priv->frames[i]))
|
||||
return priv->frames[i];
|
||||
}
|
||||
|
||||
if (!gsk_gpu_frame_is_busy (priv->frames[i]))
|
||||
return priv->frames[i];
|
||||
|
||||
timestamp = gsk_gpu_frame_get_timestamp (priv->frames[i]);
|
||||
if (timestamp < earliest_time)
|
||||
{
|
||||
earliest_time = timestamp;
|
||||
earliest_frame = priv->frames[i];
|
||||
}
|
||||
GSK_GPU_RENDERER_GET_CLASS (self)->wait (self, priv->frames, GSK_GPU_MAX_FRAMES);
|
||||
}
|
||||
|
||||
g_assert (earliest_frame);
|
||||
|
||||
gsk_gpu_frame_wait (earliest_frame);
|
||||
|
||||
return earliest_frame;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -227,17 +218,31 @@ gsk_gpu_renderer_unrealize (GskRenderer *renderer)
|
||||
{
|
||||
GskGpuRenderer *self = GSK_GPU_RENDERER (renderer);
|
||||
GskGpuRendererPrivate *priv = gsk_gpu_renderer_get_instance_private (self);
|
||||
gsize i;
|
||||
gsize i, j;
|
||||
|
||||
gsk_gpu_renderer_make_current (self);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (priv->frames); i++)
|
||||
while (TRUE)
|
||||
{
|
||||
if (priv->frames[i] == NULL)
|
||||
for (i = 0, j = 0; i < G_N_ELEMENTS (priv->frames); i++)
|
||||
{
|
||||
if (priv->frames[i] == NULL)
|
||||
break;
|
||||
if (gsk_gpu_frame_is_busy (priv->frames[i]))
|
||||
{
|
||||
if (i > j)
|
||||
{
|
||||
priv->frames[j] = priv->frames[i];
|
||||
priv->frames[i] = NULL;
|
||||
}
|
||||
j++;
|
||||
continue;
|
||||
}
|
||||
g_clear_object (&priv->frames[i]);
|
||||
}
|
||||
if (j == 0)
|
||||
break;
|
||||
if (gsk_gpu_frame_is_busy (priv->frames[i]))
|
||||
gsk_gpu_frame_wait (priv->frames[i]);
|
||||
g_clear_object (&priv->frames[i]);
|
||||
GSK_GPU_RENDERER_GET_CLASS (self)->wait (self, priv->frames, j);
|
||||
}
|
||||
|
||||
g_clear_object (&priv->context);
|
||||
@@ -453,7 +458,7 @@ gsk_gpu_renderer_class_init (GskGpuRendererClass *klass)
|
||||
gsk_ensure_resources ();
|
||||
|
||||
klass->optimizations = -1;
|
||||
klass->optimizations &= ~gdk_parse_debug_var ("GSK_GPU_DISABLE",
|
||||
klass->optimizations &= ~gdk_parse_debug_var ("GSK_GPU_SKIP",
|
||||
gsk_gpu_optimization_keys,
|
||||
G_N_ELEMENTS (gsk_gpu_optimization_keys));
|
||||
klass->get_scale = gsk_gpu_renderer_real_get_scale;
|
||||
|
||||
@@ -35,6 +35,9 @@ struct _GskGpuRendererClass
|
||||
|
||||
void (* make_current) (GskGpuRenderer *self);
|
||||
GskGpuImage * (* get_backbuffer) (GskGpuRenderer *self);
|
||||
void (* wait) (GskGpuRenderer *self,
|
||||
GskGpuFrame **frame,
|
||||
gsize n_frames);
|
||||
|
||||
double (* get_scale) (GskGpuRenderer *self);
|
||||
GdkDmabufFormats * (* get_dmabuf_formats) (GskGpuRenderer *self);
|
||||
|
||||
@@ -17,14 +17,21 @@ struct _GskGpuRoundedColorOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_rounded_color_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_rounded_color_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuRoundedcolorInstance *instance = (GskGpuRoundedcolorInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuRoundedcolorInstance *instance;
|
||||
|
||||
instance = (GskGpuRoundedcolorInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "rounded-color");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rounded_rect (string, instance->outline);
|
||||
gsk_gpu_print_rgba (string, instance->color);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_ROUNDED_COLOR_OP_CLASS = {
|
||||
@@ -32,7 +39,7 @@ static const GskGpuShaderOpClass GSK_GPU_ROUNDED_COLOR_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuRoundedColorOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_rounded_color_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -43,7 +50,6 @@ static const GskGpuShaderOpClass GSK_GPU_ROUNDED_COLOR_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_roundedcolor_info,
|
||||
#endif
|
||||
gsk_gpu_rounded_color_op_print_instance,
|
||||
gsk_gpu_roundedcolor_setup_attrib_locations,
|
||||
gsk_gpu_roundedcolor_setup_vao
|
||||
};
|
||||
|
||||
+43
-104
@@ -3,7 +3,6 @@
|
||||
#include "gskgpushaderopprivate.h"
|
||||
|
||||
#include "gskgpuframeprivate.h"
|
||||
#include "gskgpuprintprivate.h"
|
||||
#include "gskgldescriptorsprivate.h"
|
||||
#include "gskgldeviceprivate.h"
|
||||
#include "gskglframeprivate.h"
|
||||
@@ -13,8 +12,6 @@
|
||||
#include "gskvulkandeviceprivate.h"
|
||||
#endif
|
||||
|
||||
#include "gdkglcontextprivate.h"
|
||||
|
||||
/* maximum number of ops to merge into one call
|
||||
* If this number is too high, the command may take too long
|
||||
* causing the driver to kill us.
|
||||
@@ -29,36 +26,6 @@ gsk_gpu_shader_op_finish (GskGpuOp *op)
|
||||
g_clear_object (&self->desc);
|
||||
}
|
||||
|
||||
void
|
||||
gsk_gpu_shader_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuShaderOp *self = (GskGpuShaderOp *) op;
|
||||
const GskGpuShaderOpClass *shader_class = (const GskGpuShaderOpClass *) op->op_class;
|
||||
const char *shader_name;
|
||||
guchar *instance;
|
||||
gsize i;
|
||||
|
||||
if (g_str_has_prefix (shader_class->shader_name, "gskgpu"))
|
||||
shader_name = shader_class->shader_name + 6;
|
||||
else
|
||||
shader_name = shader_class->shader_name;
|
||||
|
||||
instance = gsk_gpu_frame_get_vertex_data (frame, self->vertex_offset);
|
||||
|
||||
for (i = 0; i < self->n_ops; i++)
|
||||
{
|
||||
gsk_gpu_print_op (string, indent, shader_name);
|
||||
gsk_gpu_print_shader_info (string, self->clip);
|
||||
shader_class->print_instance (self,
|
||||
instance + i * shader_class->vertex_size,
|
||||
string);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
GskGpuOp *
|
||||
gsk_gpu_shader_op_vk_command_n (GskGpuOp *op,
|
||||
@@ -70,15 +37,15 @@ gsk_gpu_shader_op_vk_command_n (GskGpuOp *op,
|
||||
GskGpuShaderOpClass *shader_op_class = (GskGpuShaderOpClass *) op->op_class;
|
||||
GskVulkanDescriptors *desc;
|
||||
GskGpuOp *next;
|
||||
gsize i, n_ops, max_ops_per_draw;
|
||||
gsize i, n;
|
||||
|
||||
if (gsk_gpu_frame_should_optimize (frame, GSK_GPU_OPTIMIZE_MERGE) &&
|
||||
gsk_vulkan_device_has_feature (GSK_VULKAN_DEVICE (gsk_gpu_frame_get_device (frame)),
|
||||
GDK_VULKAN_FEATURE_NONUNIFORM_INDEXING))
|
||||
max_ops_per_draw = MAX_MERGE_OPS;
|
||||
n = MAX_MERGE_OPS;
|
||||
else
|
||||
max_ops_per_draw = 1;
|
||||
|
||||
n = 1;
|
||||
i = 1;
|
||||
desc = GSK_VULKAN_DESCRIPTORS (self->desc);
|
||||
if (desc && state->desc != desc)
|
||||
{
|
||||
@@ -86,8 +53,7 @@ gsk_gpu_shader_op_vk_command_n (GskGpuOp *op,
|
||||
state->desc = desc;
|
||||
}
|
||||
|
||||
n_ops = self->n_ops;
|
||||
for (next = op->next; next; next = next->next)
|
||||
for (next = op->next; next && i < n; next = next->next)
|
||||
{
|
||||
GskGpuShaderOp *next_shader = (GskGpuShaderOp *) next;
|
||||
|
||||
@@ -95,10 +61,10 @@ gsk_gpu_shader_op_vk_command_n (GskGpuOp *op,
|
||||
next_shader->desc != self->desc ||
|
||||
next_shader->variation != self->variation ||
|
||||
next_shader->clip != self->clip ||
|
||||
next_shader->vertex_offset != self->vertex_offset + n_ops * shader_op_class->vertex_size)
|
||||
next_shader->vertex_offset != self->vertex_offset + i * shader_op_class->vertex_size)
|
||||
break;
|
||||
|
||||
n_ops += next_shader->n_ops;
|
||||
i++;
|
||||
}
|
||||
|
||||
vkCmdBindPipeline (state->vk_command_buffer,
|
||||
@@ -112,13 +78,10 @@ gsk_gpu_shader_op_vk_command_n (GskGpuOp *op,
|
||||
state->vk_format,
|
||||
state->vk_render_pass));
|
||||
|
||||
for (i = 0; i < n_ops; i += max_ops_per_draw)
|
||||
{
|
||||
vkCmdDraw (state->vk_command_buffer,
|
||||
6 * instance_scale, MIN (max_ops_per_draw, n_ops - i),
|
||||
0, self->vertex_offset / shader_op_class->vertex_size + i);
|
||||
}
|
||||
|
||||
vkCmdDraw (state->vk_command_buffer,
|
||||
6 * instance_scale, i,
|
||||
0, self->vertex_offset / shader_op_class->vertex_size);
|
||||
|
||||
return next;
|
||||
}
|
||||
|
||||
@@ -141,7 +104,7 @@ gsk_gpu_shader_op_gl_command_n (GskGpuOp *op,
|
||||
GskGpuShaderOpClass *shader_op_class = (GskGpuShaderOpClass *) op->op_class;
|
||||
GskGLDescriptors *desc;
|
||||
GskGpuOp *next;
|
||||
gsize i, n_ops, n_external, max_ops_per_draw;
|
||||
gsize i, n, n_external;
|
||||
|
||||
desc = GSK_GL_DESCRIPTORS (self->desc);
|
||||
if (desc)
|
||||
@@ -172,12 +135,11 @@ gsk_gpu_shader_op_gl_command_n (GskGpuOp *op,
|
||||
}
|
||||
|
||||
if (gsk_gpu_frame_should_optimize (frame, GSK_GPU_OPTIMIZE_MERGE))
|
||||
max_ops_per_draw = MAX_MERGE_OPS;
|
||||
n = MAX_MERGE_OPS;
|
||||
else
|
||||
max_ops_per_draw = 1;
|
||||
|
||||
n_ops = self->n_ops;
|
||||
for (next = op->next; next; next = next->next)
|
||||
n = 1;
|
||||
i = 1;
|
||||
for (next = op->next; next && i < n; next = next->next)
|
||||
{
|
||||
GskGpuShaderOp *next_shader = (GskGpuShaderOp *) next;
|
||||
|
||||
@@ -185,32 +147,28 @@ gsk_gpu_shader_op_gl_command_n (GskGpuOp *op,
|
||||
next_shader->desc != self->desc ||
|
||||
next_shader->variation != self->variation ||
|
||||
next_shader->clip != self->clip ||
|
||||
next_shader->vertex_offset != self->vertex_offset + n_ops * shader_op_class->vertex_size)
|
||||
next_shader->vertex_offset != self->vertex_offset + i * shader_op_class->vertex_size)
|
||||
break;
|
||||
|
||||
n_ops += next_shader->n_ops;
|
||||
i++;
|
||||
}
|
||||
|
||||
for (i = 0; i < n_ops; i += max_ops_per_draw)
|
||||
if (gsk_gpu_frame_should_optimize (frame, GSK_GPU_OPTIMIZE_GL_BASE_INSTANCE))
|
||||
{
|
||||
if (gdk_gl_context_has_feature (GDK_GL_CONTEXT (gsk_gpu_frame_get_context (frame)),
|
||||
GDK_GL_FEATURE_BASE_INSTANCE))
|
||||
{
|
||||
glDrawArraysInstancedBaseInstance (GL_TRIANGLES,
|
||||
0,
|
||||
6 * instance_scale,
|
||||
MIN (max_ops_per_draw, n_ops - i),
|
||||
self->vertex_offset / shader_op_class->vertex_size + i);
|
||||
}
|
||||
else
|
||||
{
|
||||
shader_op_class->setup_vao (self->vertex_offset + i * shader_op_class->vertex_size);
|
||||
glDrawArraysInstancedBaseInstance (GL_TRIANGLES,
|
||||
0,
|
||||
6 * instance_scale,
|
||||
i,
|
||||
self->vertex_offset / shader_op_class->vertex_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
shader_op_class->setup_vao (self->vertex_offset);
|
||||
|
||||
glDrawArraysInstanced (GL_TRIANGLES,
|
||||
0,
|
||||
6 * instance_scale,
|
||||
MIN (max_ops_per_draw, n_ops - i));
|
||||
}
|
||||
glDrawArraysInstanced (GL_TRIANGLES,
|
||||
0,
|
||||
6 * instance_scale,
|
||||
i);
|
||||
}
|
||||
|
||||
return next;
|
||||
@@ -224,7 +182,7 @@ gsk_gpu_shader_op_gl_command (GskGpuOp *op,
|
||||
return gsk_gpu_shader_op_gl_command_n (op, frame, state, 1);
|
||||
}
|
||||
|
||||
void
|
||||
GskGpuShaderOp *
|
||||
gsk_gpu_shader_op_alloc (GskGpuFrame *frame,
|
||||
const GskGpuShaderOpClass *op_class,
|
||||
guint32 variation,
|
||||
@@ -232,39 +190,20 @@ gsk_gpu_shader_op_alloc (GskGpuFrame *frame,
|
||||
GskGpuDescriptors *desc,
|
||||
gpointer out_vertex_data)
|
||||
{
|
||||
GskGpuOp *last;
|
||||
GskGpuShaderOp *last_shader;
|
||||
gsize vertex_offset;
|
||||
GskGpuShaderOp *self;
|
||||
|
||||
vertex_offset = gsk_gpu_frame_reserve_vertex_data (frame, op_class->vertex_size);
|
||||
self = (GskGpuShaderOp *) gsk_gpu_op_alloc (frame, &op_class->parent_class);
|
||||
|
||||
last = gsk_gpu_frame_get_last_op (frame);
|
||||
/* careful: We're casting without checking, but the if() does the check */
|
||||
last_shader = (GskGpuShaderOp *) last;
|
||||
if (last &&
|
||||
last->op_class == (const GskGpuOpClass *) op_class &&
|
||||
last_shader->desc == desc &&
|
||||
last_shader->variation == variation &&
|
||||
last_shader->clip == clip &&
|
||||
last_shader->vertex_offset + last_shader->n_ops * op_class->vertex_size == vertex_offset)
|
||||
{
|
||||
last_shader->n_ops++;
|
||||
}
|
||||
self->variation = variation;
|
||||
self->clip = clip;
|
||||
if (desc)
|
||||
self->desc = g_object_ref (desc);
|
||||
else
|
||||
{
|
||||
GskGpuShaderOp *self;
|
||||
self = (GskGpuShaderOp *) gsk_gpu_op_alloc (frame, &op_class->parent_class);
|
||||
self->desc = NULL;
|
||||
self->vertex_offset = gsk_gpu_frame_reserve_vertex_data (frame, op_class->vertex_size);
|
||||
|
||||
self->variation = variation;
|
||||
self->clip = clip;
|
||||
self->vertex_offset = vertex_offset;
|
||||
if (desc)
|
||||
self->desc = g_object_ref (desc);
|
||||
else
|
||||
self->desc = NULL;
|
||||
self->n_ops = 1;
|
||||
}
|
||||
*((gpointer *) out_vertex_data) = gsk_gpu_frame_get_vertex_data (frame, self->vertex_offset);
|
||||
|
||||
*((gpointer *) out_vertex_data) = gsk_gpu_frame_get_vertex_data (frame, vertex_offset);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ struct _GskGpuShaderOp
|
||||
guint32 variation;
|
||||
GskGpuShaderClip clip;
|
||||
gsize vertex_offset;
|
||||
gsize n_ops;
|
||||
};
|
||||
|
||||
struct _GskGpuShaderOpClass
|
||||
@@ -26,14 +25,11 @@ struct _GskGpuShaderOpClass
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
const VkPipelineVertexInputStateCreateInfo *vertex_input_state;
|
||||
#endif
|
||||
void (* print_instance) (GskGpuShaderOp *shader,
|
||||
gpointer instance,
|
||||
GString *string);
|
||||
void (* setup_attrib_locations) (GLuint program);
|
||||
void (* setup_vao) (gsize offset);
|
||||
};
|
||||
|
||||
void gsk_gpu_shader_op_alloc (GskGpuFrame *frame,
|
||||
GskGpuShaderOp * gsk_gpu_shader_op_alloc (GskGpuFrame *frame,
|
||||
const GskGpuShaderOpClass *op_class,
|
||||
guint32 variation,
|
||||
GskGpuShaderClip clip,
|
||||
@@ -42,10 +38,6 @@ void gsk_gpu_shader_op_alloc (GskGpuF
|
||||
|
||||
void gsk_gpu_shader_op_finish (GskGpuOp *op);
|
||||
|
||||
void gsk_gpu_shader_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent);
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
GskGpuOp * gsk_gpu_shader_op_vk_command_n (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
|
||||
@@ -19,14 +19,21 @@ struct _GskGpuStraightAlphaOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_straight_alpha_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_straight_alpha_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuStraightalphaInstance *instance = (GskGpuStraightalphaInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuStraightalphaInstance *instance;
|
||||
|
||||
instance = (GskGpuStraightalphaInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "straight-alpha");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->tex_id);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_STRAIGHT_ALPHA_OP_CLASS = {
|
||||
@@ -34,7 +41,7 @@ static const GskGpuShaderOpClass GSK_GPU_STRAIGHT_ALPHA_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuStraightAlphaOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_straight_alpha_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -45,7 +52,6 @@ static const GskGpuShaderOpClass GSK_GPU_STRAIGHT_ALPHA_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_straightalpha_info,
|
||||
#endif
|
||||
gsk_gpu_straight_alpha_op_print_instance,
|
||||
gsk_gpu_straightalpha_setup_attrib_locations,
|
||||
gsk_gpu_straightalpha_setup_vao
|
||||
};
|
||||
|
||||
@@ -16,14 +16,21 @@ struct _GskGpuTextureOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_texture_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_texture_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuTextureInstance *instance = (GskGpuTextureInstance *) instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuTextureInstance *instance;
|
||||
|
||||
instance = (GskGpuTextureInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "texture");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_image_descriptor (string, shader->desc, instance->tex_id);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_TEXTURE_OP_CLASS = {
|
||||
@@ -31,7 +38,7 @@ static const GskGpuShaderOpClass GSK_GPU_TEXTURE_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuTextureOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_texture_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -42,7 +49,6 @@ static const GskGpuShaderOpClass GSK_GPU_TEXTURE_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_texture_info,
|
||||
#endif
|
||||
gsk_gpu_texture_op_print_instance,
|
||||
gsk_gpu_texture_setup_attrib_locations,
|
||||
gsk_gpu_texture_setup_vao
|
||||
};
|
||||
|
||||
@@ -118,5 +118,8 @@ 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,
|
||||
} GskGpuOptimizations;
|
||||
|
||||
|
||||
+13
-7
@@ -17,13 +17,20 @@ struct _GskGpuUberOp
|
||||
};
|
||||
|
||||
static void
|
||||
gsk_gpu_uber_op_print_instance (GskGpuShaderOp *shader,
|
||||
gpointer instance_,
|
||||
GString *string)
|
||||
gsk_gpu_uber_op_print (GskGpuOp *op,
|
||||
GskGpuFrame *frame,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
GskGpuUberInstance *instance = instance_;
|
||||
GskGpuShaderOp *shader = (GskGpuShaderOp *) op;
|
||||
GskGpuUberInstance *instance;
|
||||
|
||||
instance = (GskGpuUberInstance *) gsk_gpu_frame_get_vertex_data (frame, shader->vertex_offset);
|
||||
|
||||
gsk_gpu_print_op (string, indent, "uber");
|
||||
gsk_gpu_print_shader_info (string, shader->clip);
|
||||
gsk_gpu_print_rect (string, instance->rect);
|
||||
gsk_gpu_print_newline (string);
|
||||
}
|
||||
|
||||
static const GskGpuShaderOpClass GSK_GPU_UBER_OP_CLASS = {
|
||||
@@ -31,7 +38,7 @@ static const GskGpuShaderOpClass GSK_GPU_UBER_OP_CLASS = {
|
||||
GSK_GPU_OP_SIZE (GskGpuUberOp),
|
||||
GSK_GPU_STAGE_SHADER,
|
||||
gsk_gpu_shader_op_finish,
|
||||
gsk_gpu_shader_op_print,
|
||||
gsk_gpu_uber_op_print,
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
gsk_gpu_shader_op_vk_command,
|
||||
#endif
|
||||
@@ -42,9 +49,8 @@ static const GskGpuShaderOpClass GSK_GPU_UBER_OP_CLASS = {
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
&gsk_gpu_uber_info,
|
||||
#endif
|
||||
gsk_gpu_uber_op_print_instance,
|
||||
gsk_gpu_uber_setup_attrib_locations,
|
||||
gsk_gpu_uber_setup_vao,
|
||||
gsk_gpu_uber_setup_vao
|
||||
};
|
||||
|
||||
void
|
||||
|
||||
@@ -52,7 +52,7 @@ gsk_gpu_upload_op_gl_command_with_area (GskGpuOp *op,
|
||||
{
|
||||
glTexSubImage2D (GL_TEXTURE_2D, 0, area->x, area->y, area->width, area->height, gl_format, gl_type, data);
|
||||
}
|
||||
else if (stride % bpp == 0 && gdk_gl_context_has_feature (context, GDK_GL_FEATURE_UNPACK_SUBIMAGE))
|
||||
else if (stride % bpp == 0 && gdk_gl_context_has_unpack_subimage (context))
|
||||
{
|
||||
glPixelStorei (GL_UNPACK_ROW_LENGTH, stride / bpp);
|
||||
|
||||
|
||||
@@ -72,6 +72,11 @@ gsk_ngl_renderer_create_context (GskGpuRenderer *renderer,
|
||||
*/
|
||||
*supported &= ~GSK_GPU_OPTIMIZE_UBER;
|
||||
|
||||
if (!gdk_gl_context_check_version (context, "4.2", "9.9") &&
|
||||
!epoxy_has_gl_extension ("GL_EXT_base_instance") &&
|
||||
!epoxy_has_gl_extension ("GL_ARB_base_instance"))
|
||||
*supported &= ~GSK_GPU_OPTIMIZE_GL_BASE_INSTANCE;
|
||||
|
||||
return GDK_DRAW_CONTEXT (context);
|
||||
}
|
||||
|
||||
@@ -114,6 +119,13 @@ gsk_ngl_renderer_get_backbuffer (GskGpuRenderer *renderer)
|
||||
return self->backbuffer;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_ngl_renderer_wait (GskGpuRenderer *self,
|
||||
GskGpuFrame **frame,
|
||||
gsize n_frames)
|
||||
{
|
||||
}
|
||||
|
||||
static double
|
||||
gsk_ngl_renderer_get_scale (GskGpuRenderer *self)
|
||||
{
|
||||
@@ -152,6 +164,7 @@ gsk_ngl_renderer_class_init (GskNglRendererClass *klass)
|
||||
gpu_renderer_class->create_context = gsk_ngl_renderer_create_context;
|
||||
gpu_renderer_class->make_current = gsk_ngl_renderer_make_current;
|
||||
gpu_renderer_class->get_backbuffer = gsk_ngl_renderer_get_backbuffer;
|
||||
gpu_renderer_class->wait = gsk_ngl_renderer_wait;
|
||||
gpu_renderer_class->get_scale = gsk_ngl_renderer_get_scale;
|
||||
gpu_renderer_class->get_dmabuf_formats = gsk_ngl_renderer_get_dmabuf_formats;
|
||||
|
||||
|
||||
@@ -97,8 +97,7 @@ gsk_vulkan_buffer_new_internal (GskVulkanDevice *device,
|
||||
self->allocator = gsk_vulkan_device_find_allocator (device,
|
||||
requirements.memoryTypeBits,
|
||||
GSK_VULKAN_MEMORY_MAPPABLE,
|
||||
GSK_VULKAN_MEMORY_MAPPABLE |
|
||||
VK_MEMORY_PROPERTY_HOST_CACHED_BIT);
|
||||
GSK_VULKAN_MEMORY_MAPPABLE);
|
||||
gsk_vulkan_alloc (self->allocator,
|
||||
requirements.size,
|
||||
requirements.alignment,
|
||||
|
||||
@@ -74,21 +74,6 @@ gsk_vulkan_frame_is_busy (GskGpuFrame *frame)
|
||||
return vkGetFenceStatus (device, self->vk_fence) == VK_NOT_READY;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_frame_wait (GskGpuFrame *frame)
|
||||
{
|
||||
GskVulkanFrame *self = GSK_VULKAN_FRAME (frame);
|
||||
VkDevice vk_device;
|
||||
|
||||
vk_device = gsk_vulkan_device_get_vk_device (GSK_VULKAN_DEVICE (gsk_gpu_frame_get_device (frame)));
|
||||
|
||||
GSK_VK_CHECK (vkWaitForFences, vk_device,
|
||||
1,
|
||||
&self->vk_fence,
|
||||
VK_FALSE,
|
||||
INT64_MAX);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_frame_setup (GskGpuFrame *frame)
|
||||
{
|
||||
@@ -402,7 +387,6 @@ gsk_vulkan_frame_class_init (GskVulkanFrameClass *klass)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
gpu_frame_class->is_busy = gsk_vulkan_frame_is_busy;
|
||||
gpu_frame_class->wait = gsk_vulkan_frame_wait;
|
||||
gpu_frame_class->setup = gsk_vulkan_frame_setup;
|
||||
gpu_frame_class->cleanup = gsk_vulkan_frame_cleanup;
|
||||
gpu_frame_class->upload_texture = gsk_vulkan_frame_upload_texture;
|
||||
|
||||
@@ -129,6 +129,31 @@ gsk_vulkan_renderer_get_backbuffer (GskGpuRenderer *renderer)
|
||||
return self->targets[gdk_vulkan_context_get_draw_index (context)];
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_renderer_wait (GskGpuRenderer *renderer,
|
||||
GskGpuFrame **frames,
|
||||
gsize n_frames)
|
||||
{
|
||||
VkFence *fences;
|
||||
VkDevice vk_device;
|
||||
gsize i;
|
||||
|
||||
vk_device = gsk_vulkan_device_get_vk_device (GSK_VULKAN_DEVICE (gsk_gpu_renderer_get_device (renderer)));
|
||||
|
||||
fences = g_alloca (sizeof (VkFence) * n_frames);
|
||||
|
||||
for (i = 0; i < n_frames; i++)
|
||||
{
|
||||
fences[i] = gsk_vulkan_frame_get_vk_fence (GSK_VULKAN_FRAME (frames[i]));
|
||||
}
|
||||
|
||||
GSK_VK_CHECK (vkWaitForFences, vk_device,
|
||||
n_frames,
|
||||
fences,
|
||||
VK_FALSE,
|
||||
INT64_MAX);
|
||||
}
|
||||
|
||||
static GdkDmabufFormats *
|
||||
gsk_vulkan_renderer_get_dmabuf_formats (GskGpuRenderer *renderer)
|
||||
{
|
||||
@@ -164,6 +189,7 @@ gsk_vulkan_renderer_class_init (GskVulkanRendererClass *klass)
|
||||
gpu_renderer_class->create_context = gsk_vulkan_renderer_create_context;
|
||||
gpu_renderer_class->make_current = gsk_vulkan_renderer_make_current;
|
||||
gpu_renderer_class->get_backbuffer = gsk_vulkan_renderer_get_backbuffer;
|
||||
gpu_renderer_class->wait = gsk_vulkan_renderer_wait;
|
||||
gpu_renderer_class->get_dmabuf_formats = gsk_vulkan_renderer_get_dmabuf_formats;
|
||||
|
||||
renderer_class->unrealize = gsk_vulkan_renderer_unrealize;
|
||||
|
||||
@@ -5,13 +5,16 @@
|
||||
|
||||
static const GdkDebugKey gsk_debug_keys[] = {
|
||||
{ "renderer", GSK_DEBUG_RENDERER, "General renderer information" },
|
||||
{ "opengl", GSK_DEBUG_OPENGL, "OpenGL renderer information" },
|
||||
{ "vulkan", GSK_DEBUG_VULKAN, "Vulkan renderer information" },
|
||||
{ "shaders", GSK_DEBUG_SHADERS, "Information about shaders" },
|
||||
{ "surface", GSK_DEBUG_SURFACE, "Information about surfaces" },
|
||||
{ "fallback", GSK_DEBUG_FALLBACK, "Information about fallback usage in renderers" },
|
||||
{ "glyphcache", GSK_DEBUG_GLYPH_CACHE, "Information about glyph caching" },
|
||||
{ "verbose", GSK_DEBUG_VERBOSE, "Print verbose output while rendering" },
|
||||
{ "geometry", GSK_DEBUG_GEOMETRY, "Show borders (when using cairo)" },
|
||||
{ "full-redraw", GSK_DEBUG_FULL_REDRAW, "Force full redraws" },
|
||||
{ "sync", GSK_DEBUG_SYNC, "Sync after each frame" },
|
||||
{ "staging", GSK_DEBUG_STAGING, "Use a staging image for texture upload (Vulkan only)" },
|
||||
{ "offload-disable", GSK_DEBUG_OFFLOAD_DISABLE, "Disable graphics offload" },
|
||||
{ "cairo", GSK_DEBUG_CAIRO, "Overlay error pattern over Cairo drawing (finds fallbacks)" },
|
||||
|
||||
+12
-9
@@ -7,17 +7,20 @@ G_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
GSK_DEBUG_RENDERER = 1 << 0,
|
||||
GSK_DEBUG_OPENGL = 1 << 1,
|
||||
GSK_DEBUG_SHADERS = 1 << 2,
|
||||
GSK_DEBUG_VULKAN = 1 << 3,
|
||||
GSK_DEBUG_FALLBACK = 1 << 4,
|
||||
GSK_DEBUG_GLYPH_CACHE = 1 << 5,
|
||||
GSK_DEBUG_VERBOSE = 1 << 6,
|
||||
GSK_DEBUG_SURFACE = 1 << 3,
|
||||
GSK_DEBUG_VULKAN = 1 << 4,
|
||||
GSK_DEBUG_FALLBACK = 1 << 5,
|
||||
GSK_DEBUG_GLYPH_CACHE = 1 << 6,
|
||||
GSK_DEBUG_VERBOSE = 1 << 7,
|
||||
/* flags below may affect behavior */
|
||||
GSK_DEBUG_GEOMETRY = 1 << 7,
|
||||
GSK_DEBUG_FULL_REDRAW = 1 << 8,
|
||||
GSK_DEBUG_STAGING = 1 << 10,
|
||||
GSK_DEBUG_OFFLOAD_DISABLE = 1 << 11,
|
||||
GSK_DEBUG_CAIRO = 1 << 12,
|
||||
GSK_DEBUG_GEOMETRY = 1 << 8,
|
||||
GSK_DEBUG_FULL_REDRAW = 1 << 9,
|
||||
GSK_DEBUG_SYNC = 1 << 10,
|
||||
GSK_DEBUG_STAGING = 1 << 11,
|
||||
GSK_DEBUG_OFFLOAD_DISABLE = 1 << 12,
|
||||
GSK_DEBUG_CAIRO = 1 << 13,
|
||||
} GskDebugFlags;
|
||||
|
||||
#define GSK_DEBUG_ANY ((1 << 13) - 1)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <graphene.h>
|
||||
|
||||
static inline void G_GNUC_PURE
|
||||
gsk_point_interpolate (const graphene_point_t *p1,
|
||||
const graphene_point_t *p2,
|
||||
float t,
|
||||
graphene_point_t *p)
|
||||
{
|
||||
p->x = p1->x * (1 - t) + p2->x * t;
|
||||
p->Y = p1->y * (1 - t) + p2->y * t;
|
||||
}
|
||||
|
||||
static inline float G_GNUC_PURE
|
||||
gsk_point_distance (const graphene_point_t *p1,
|
||||
const graphene_point_t *p2)
|
||||
{
|
||||
return sqrtf ((p1->x - p2->x)*(p1->x - p2->x) + (p1->y - p2->y)*(p1->y - p2->y));
|
||||
}
|
||||
+16
-12
@@ -44,9 +44,9 @@ gsk_reload_font (PangoFont *font,
|
||||
cairo_hint_style_t hint_style,
|
||||
cairo_antialias_t antialias)
|
||||
{
|
||||
static cairo_font_options_t *options = NULL;
|
||||
static PangoContext *context = NULL;
|
||||
cairo_font_options_t *options;
|
||||
cairo_scaled_font_t *sf;
|
||||
static PangoContext *context = NULL;
|
||||
#if !PANGO_VERSION_CHECK (1, 52, 0)
|
||||
PangoFontDescription *desc;
|
||||
FcPattern *pattern;
|
||||
@@ -80,9 +80,7 @@ gsk_reload_font (PangoFont *font,
|
||||
g_set_object (&last_font, font);
|
||||
g_clear_object (&last_result);
|
||||
|
||||
if (G_UNLIKELY (options == NULL))
|
||||
options = cairo_font_options_create ();
|
||||
|
||||
options = cairo_font_options_create ();
|
||||
sf = pango_cairo_font_get_scaled_font (PANGO_CAIRO_FONT (font));
|
||||
cairo_scaled_font_get_font_options (sf, options);
|
||||
|
||||
@@ -102,6 +100,7 @@ gsk_reload_font (PangoFont *font,
|
||||
cairo_font_options_get_subpixel_order (options) == CAIRO_SUBPIXEL_ORDER_DEFAULT)
|
||||
{
|
||||
last_result = g_object_ref (font);
|
||||
cairo_font_options_destroy (options);
|
||||
return g_object_ref (font);
|
||||
}
|
||||
|
||||
@@ -110,10 +109,11 @@ gsk_reload_font (PangoFont *font,
|
||||
cairo_font_options_set_antialias (options, antialias);
|
||||
cairo_font_options_set_subpixel_order (options, CAIRO_SUBPIXEL_ORDER_DEFAULT);
|
||||
|
||||
if (G_UNLIKELY (context == NULL))
|
||||
if (!context)
|
||||
context = pango_context_new ();
|
||||
|
||||
pango_cairo_context_set_font_options (context, options);
|
||||
cairo_font_options_destroy (options);
|
||||
|
||||
#if PANGO_VERSION_CHECK (1, 52, 0)
|
||||
last_result = pango_font_map_reload_font (pango_font_get_font_map (font), font, scale, context, NULL);
|
||||
@@ -123,9 +123,14 @@ gsk_reload_font (PangoFont *font,
|
||||
if (FcPatternGetDouble (pattern, FC_DPI, 0, &dpi) == FcResultMatch)
|
||||
pango_cairo_context_set_resolution (context, dpi);
|
||||
|
||||
desc = pango_font_describe_with_absolute_size (font);
|
||||
desc = pango_font_describe (font);
|
||||
size = pango_font_description_get_size (desc);
|
||||
pango_font_description_set_absolute_size (desc, size * scale);
|
||||
|
||||
if (pango_font_description_get_size_is_absolute (desc))
|
||||
pango_font_description_set_absolute_size (desc, size * scale);
|
||||
else
|
||||
pango_font_description_set_size (desc, (int) floor (size * scale + .5));
|
||||
|
||||
last_result = pango_font_map_load_font (pango_font_get_font_map (font), context, desc);
|
||||
pango_font_description_free (desc);
|
||||
#endif
|
||||
@@ -173,16 +178,15 @@ gsk_get_unhinted_glyph_string_extents (PangoGlyphString *glyphs,
|
||||
cairo_hint_style_t
|
||||
gsk_font_get_hint_style (PangoFont *font)
|
||||
{
|
||||
static cairo_font_options_t *options = NULL;
|
||||
cairo_scaled_font_t *sf;
|
||||
cairo_font_options_t *options;
|
||||
cairo_hint_style_t style;
|
||||
|
||||
if (G_UNLIKELY (options == NULL))
|
||||
options = cairo_font_options_create ();
|
||||
|
||||
sf = pango_cairo_font_get_scaled_font (PANGO_CAIRO_FONT (font));
|
||||
options = cairo_font_options_create ();
|
||||
cairo_scaled_font_get_font_options (sf, options);
|
||||
style = cairo_font_options_get_hint_style (options);
|
||||
cairo_font_options_destroy (options);
|
||||
|
||||
return style;
|
||||
}
|
||||
|
||||
@@ -5833,6 +5833,7 @@ gsk_text_node_new (PangoFont *font,
|
||||
self = gsk_render_node_alloc (GSK_TEXT_NODE);
|
||||
node = (GskRenderNode *) self;
|
||||
node->offscreen_for_opacity = FALSE;
|
||||
node->font_hinting = gsk_font_get_hint_style (font) != CAIRO_HINT_STYLE_NONE;
|
||||
|
||||
self->fontmap = g_object_ref (pango_font_get_font_map (font));
|
||||
self->font = g_object_ref (font);
|
||||
|
||||
@@ -34,6 +34,7 @@ struct _GskRenderNode
|
||||
|
||||
guint preferred_depth : 2;
|
||||
guint offscreen_for_opacity : 1;
|
||||
guint font_hinting : 1;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
@@ -100,6 +101,12 @@ gboolean gsk_container_node_is_disjoint (const GskRenderNode
|
||||
|
||||
gboolean gsk_render_node_use_offscreen_for_opacity (const GskRenderNode *node) G_GNUC_PURE;
|
||||
|
||||
static inline gboolean
|
||||
gsk_text_node_use_font_hinting (const GskRenderNode *node)
|
||||
{
|
||||
return node->font_hinting;
|
||||
}
|
||||
|
||||
#define gsk_render_node_ref(node) _gsk_render_node_ref(node)
|
||||
#define gsk_render_node_unref(node) _gsk_render_node_unref(node)
|
||||
|
||||
|
||||
@@ -86,8 +86,6 @@ translate_coordinates_to_accessible (GtkAccessible *accessible,
|
||||
parent = gtk_accessible_get_accessible_parent (accessible);
|
||||
while (parent != NULL)
|
||||
{
|
||||
g_object_unref (parent);
|
||||
|
||||
if (gtk_accessible_get_bounds (parent, &x, &y, &width, &height))
|
||||
{
|
||||
*xo = *xo - x;
|
||||
@@ -140,8 +138,6 @@ translate_coordinates_from_accessible (GtkAccessible *accessible,
|
||||
parent = gtk_accessible_get_accessible_parent (accessible);
|
||||
while (parent != NULL)
|
||||
{
|
||||
g_object_unref (parent);
|
||||
|
||||
if (gtk_accessible_get_bounds (parent, &x, &y, &width, &height))
|
||||
{
|
||||
*xo = *xo + x;
|
||||
@@ -176,7 +172,6 @@ accessible_at_point (GtkAccessible *parent,
|
||||
child = gtk_accessible_get_next_accessible_sibling (child))
|
||||
{
|
||||
GtkAccessible *found = accessible_at_point (child, x - px, y - py, FALSE);
|
||||
g_object_unref (child);
|
||||
if (found)
|
||||
result = found;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,6 @@ gtk_at_spi_socket_get_bounds (GtkAccessible *accessible,
|
||||
int *height)
|
||||
{
|
||||
GtkAccessible *accessible_parent;
|
||||
gboolean res = FALSE;
|
||||
|
||||
g_assert (GTK_IS_AT_SPI_SOCKET (accessible));
|
||||
|
||||
@@ -191,11 +190,7 @@ gtk_at_spi_socket_get_bounds (GtkAccessible *accessible,
|
||||
if (accessible_parent == NULL)
|
||||
return FALSE;
|
||||
|
||||
res = gtk_accessible_get_bounds (accessible_parent, x, y, width, height);
|
||||
|
||||
g_object_unref (accessible_parent);
|
||||
|
||||
return res;
|
||||
return gtk_accessible_get_bounds (accessible_parent, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -1087,7 +1087,6 @@ gtk_accessible_platform_changed (GtkAccessible *self,
|
||||
|
||||
if (parent != NULL)
|
||||
{
|
||||
g_clear_object (&context);
|
||||
context = gtk_accessible_get_at_context (parent);
|
||||
g_object_unref (parent);
|
||||
}
|
||||
|
||||
+21
-46
@@ -48,7 +48,6 @@ typedef struct
|
||||
|
||||
GtkActionMuxer *muxer;
|
||||
GMenu *combined;
|
||||
GMenuModel *standard_app_menu;
|
||||
|
||||
GSList *inhibitors;
|
||||
int quit_inhibit;
|
||||
@@ -151,29 +150,6 @@ static GActionEntry gtk_application_impl_quartz_actions[] = {
|
||||
{ "show-all", gtk_application_impl_quartz_show_all }
|
||||
};
|
||||
|
||||
static void
|
||||
gtk_application_impl_quartz_set_app_menu (GtkApplicationImpl *impl,
|
||||
GMenuModel *app_menu)
|
||||
{
|
||||
GtkApplicationImplQuartz *quartz = (GtkApplicationImplQuartz *) impl;
|
||||
|
||||
/* If there are any items at all, then the first one is the app menu */
|
||||
if (g_menu_model_get_n_items (G_MENU_MODEL (quartz->combined)))
|
||||
g_menu_remove (quartz->combined, 0);
|
||||
|
||||
if (app_menu)
|
||||
g_menu_prepend_submenu (quartz->combined, "Application", app_menu);
|
||||
else
|
||||
{
|
||||
GMenu *empty;
|
||||
|
||||
/* We must preserve the rule that index 0 is the app menu */
|
||||
empty = g_menu_new ();
|
||||
g_menu_prepend_submenu (quartz->combined, "Application", G_MENU_MODEL (empty));
|
||||
g_object_unref (empty);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_application_impl_quartz_startup (GtkApplicationImpl *impl,
|
||||
gboolean register_session)
|
||||
@@ -208,23 +184,6 @@ gtk_application_impl_quartz_startup (GtkApplicationImpl *impl,
|
||||
g_object_unref (gtkinternal);
|
||||
|
||||
/* now setup the menu */
|
||||
if (quartz->standard_app_menu == NULL)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
|
||||
/* If the user didn't fill in their own menu yet, add ours.
|
||||
*
|
||||
* The fact that we do this here ensures that we will always have the
|
||||
* app menu at index 0 in 'combined'.
|
||||
*/
|
||||
builder = gtk_builder_new_from_resource ("/org/gtk/libgtk/ui/gtkapplication-quartz.ui");
|
||||
quartz->standard_app_menu = G_MENU_MODEL (g_object_ref (gtk_builder_get_object (builder, "app-menu")));
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
gtk_application_impl_quartz_set_app_menu (impl, quartz->standard_app_menu);
|
||||
|
||||
/* This may or may not add an item to 'combined' */
|
||||
gtk_application_impl_set_menubar (impl, gtk_application_get_menubar (impl->application));
|
||||
|
||||
/* OK. Now put it in the menu. */
|
||||
@@ -295,12 +254,30 @@ gtk_application_impl_quartz_set_menubar (GtkApplicationImpl *impl,
|
||||
{
|
||||
GtkApplicationImplQuartz *quartz = (GtkApplicationImplQuartz *) impl;
|
||||
|
||||
/* If we have the menubar, it is a section at index '1' */
|
||||
if (g_menu_model_get_n_items (G_MENU_MODEL (quartz->combined)) > 1)
|
||||
g_menu_remove (quartz->combined, 1);
|
||||
/* If we have the menubar, it is a section at index '0' */
|
||||
if (g_menu_model_get_n_items (G_MENU_MODEL (quartz->combined)))
|
||||
g_menu_remove (quartz->combined, 0);
|
||||
|
||||
if (menubar)
|
||||
g_menu_append_section (quartz->combined, NULL, menubar);
|
||||
else
|
||||
{
|
||||
// Ensure that we will always have one menu.
|
||||
char app_menu_key[] = "APP_MENU";
|
||||
GMenuModel *app_menu = g_object_get_data (G_OBJECT (impl), app_menu_key);
|
||||
if (app_menu == NULL)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
|
||||
// If the user didn't fill in their own menu yet, add ours.
|
||||
builder = gtk_builder_new_from_resource ("/org/gtk/libgtk/ui/gtkapplication-quartz.ui");
|
||||
app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "app-menu"));
|
||||
g_object_set_data_full (G_OBJECT (impl), app_menu_key, g_object_ref (app_menu), g_object_unref);
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
g_menu_append_submenu (quartz->combined, "Application", app_menu);
|
||||
}
|
||||
}
|
||||
|
||||
static guint
|
||||
@@ -369,7 +346,6 @@ gtk_application_impl_quartz_finalize (GObject *object)
|
||||
GtkApplicationImplQuartz *quartz = (GtkApplicationImplQuartz *) object;
|
||||
|
||||
g_clear_object (&quartz->combined);
|
||||
g_clear_object (&quartz->standard_app_menu);
|
||||
|
||||
G_OBJECT_CLASS (gtk_application_impl_quartz_parent_class)->finalize (object);
|
||||
}
|
||||
@@ -382,7 +358,6 @@ gtk_application_impl_quartz_class_init (GtkApplicationImplClass *class)
|
||||
class->startup = gtk_application_impl_quartz_startup;
|
||||
class->shutdown = gtk_application_impl_quartz_shutdown;
|
||||
class->active_window_changed = gtk_application_impl_quartz_active_window_changed;
|
||||
class->set_app_menu = gtk_application_impl_quartz_set_app_menu;
|
||||
class->set_menubar = gtk_application_impl_quartz_set_menubar;
|
||||
class->inhibit = gtk_application_impl_quartz_inhibit;
|
||||
class->uninhibit = gtk_application_impl_quartz_uninhibit;
|
||||
|
||||
@@ -541,7 +541,6 @@ gtk_at_context_set_accessible_parent (GtkATContext *self,
|
||||
parent_context = get_parent_context (self);
|
||||
if (parent_context && parent_context->realized)
|
||||
gtk_at_context_realize (self);
|
||||
g_clear_object (&parent_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -776,7 +776,7 @@ gtk_gl_area_snapshot (GtkWidget *widget,
|
||||
priv->texture = NULL;
|
||||
priv->textures = g_list_prepend (priv->textures, texture);
|
||||
|
||||
if (gdk_gl_context_has_feature (priv->context, GDK_GL_FEATURE_SYNC))
|
||||
if (gdk_gl_context_has_sync (priv->context))
|
||||
sync = glFenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||
|
||||
gdk_gl_texture_builder_set_sync (texture->builder, sync);
|
||||
|
||||
@@ -75,8 +75,6 @@
|
||||
* On Wayland, the settings are obtained either via a settings portal,
|
||||
* or by reading desktop settings from DConf.
|
||||
*
|
||||
* On macOS, the settings are obtained from `NSUserDefaults`.
|
||||
*
|
||||
* In the absence of these sharing mechanisms, GTK reads default values for
|
||||
* settings from `settings.ini` files in `/etc/gtk-4.0`, `$XDG_CONFIG_DIRS/gtk-4.0`
|
||||
* and `$XDG_CONFIG_HOME/gtk-4.0`. These files must be valid key files (see
|
||||
|
||||
+7
-7
@@ -8754,11 +8754,11 @@ gtk_text_view_retrieve_surrounding_handler (GtkIMContext *context,
|
||||
gboolean flip;
|
||||
|
||||
gtk_text_buffer_get_iter_at_mark (text_view->priv->buffer, &start,
|
||||
gtk_text_buffer_get_selection_bound (text_view->priv->buffer));
|
||||
gtk_text_buffer_get_iter_at_mark (text_view->priv->buffer, &end,
|
||||
gtk_text_buffer_get_insert (text_view->priv->buffer));
|
||||
gtk_text_buffer_get_iter_at_mark (text_view->priv->buffer, &end,
|
||||
gtk_text_buffer_get_selection_bound (text_view->priv->buffer));
|
||||
|
||||
flip = gtk_text_iter_compare (&start, &end) > 0;
|
||||
flip = gtk_text_iter_compare (&start, &end) < 0;
|
||||
|
||||
gtk_text_iter_order (&start, &end);
|
||||
|
||||
@@ -8784,13 +8784,13 @@ gtk_text_view_retrieve_surrounding_handler (GtkIMContext *context,
|
||||
|
||||
if (flip)
|
||||
{
|
||||
cursor_pos = strlen (pre);
|
||||
anchor_pos = cursor_pos + strlen (sel);
|
||||
anchor_pos = strlen (pre);
|
||||
cursor_pos = anchor_pos + strlen (sel);
|
||||
}
|
||||
else
|
||||
{
|
||||
anchor_pos = strlen (pre);
|
||||
cursor_pos = anchor_pos + strlen (sel);
|
||||
cursor_pos = strlen (pre);
|
||||
anchor_pos = cursor_pos + strlen (sel);
|
||||
}
|
||||
|
||||
text = g_strconcat (pre, sel, post, NULL);
|
||||
|
||||
@@ -62,8 +62,10 @@ struct _GtkInspectorLogs
|
||||
|
||||
GtkWidget *renderer;
|
||||
GtkWidget *cairo;
|
||||
GtkWidget *opengl_gsk;
|
||||
GtkWidget *vulkan_gsk;
|
||||
GtkWidget *shaders;
|
||||
GtkWidget *surface;
|
||||
GtkWidget *glyphcache;
|
||||
GtkWidget *verbose;
|
||||
|
||||
@@ -141,8 +143,10 @@ flag_toggled (GtkWidget *button,
|
||||
flags = gsk_get_debug_flags ();
|
||||
update_flag (logs->renderer, &flags, GSK_DEBUG_RENDERER);
|
||||
update_flag (logs->cairo, &flags, GSK_DEBUG_CAIRO);
|
||||
update_flag (logs->opengl_gsk, &flags, GSK_DEBUG_OPENGL);
|
||||
update_flag (logs->vulkan_gsk, &flags, GSK_DEBUG_VULKAN);
|
||||
update_flag (logs->shaders, &flags, GSK_DEBUG_SHADERS);
|
||||
update_flag (logs->surface, &flags, GSK_DEBUG_SURFACE);
|
||||
update_flag (logs->glyphcache, &flags, GSK_DEBUG_GLYPH_CACHE);
|
||||
update_flag (logs->verbose, &flags, GSK_DEBUG_VERBOSE);
|
||||
gsk_set_debug_flags (flags);
|
||||
@@ -203,8 +207,10 @@ gtk_inspector_logs_class_init (GtkInspectorLogsClass *klass)
|
||||
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, renderer);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, cairo);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, opengl_gsk);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, vulkan_gsk);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, shaders);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, surface);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, glyphcache);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, verbose);
|
||||
|
||||
|
||||
@@ -128,6 +128,12 @@
|
||||
<signal name="toggled" handler="flag_toggled"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="opengl_gsk">
|
||||
<property name="label">OpenGL</property>
|
||||
<signal name="toggled" handler="flag_toggled"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="vulkan_gsk">
|
||||
<property name="label">Vulkan</property>
|
||||
@@ -140,6 +146,12 @@
|
||||
<signal name="toggled" handler="flag_toggled"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="surface">
|
||||
<property name="label">Surface</property>
|
||||
<signal name="toggled" handler="flag_toggled"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="glyphcache">
|
||||
<property name="label">Glyph Cache</property>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
project('gtk', 'c',
|
||||
version: '4.14.2',
|
||||
version: '4.14.1',
|
||||
default_options: [
|
||||
'buildtype=debugoptimized',
|
||||
'warning_level=1',
|
||||
|
||||
@@ -3639,19 +3639,6 @@ avahi_request_printer_list (GtkPrintBackendCups *cups_backend)
|
||||
g_bus_get (G_BUS_TYPE_SYSTEM, cups_backend->avahi_cancellable, avahi_create_browsers, cups_backend);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print backend can be disposed together with all its printers
|
||||
* as a reaction to user stopping enumeration of printers.
|
||||
*/
|
||||
static void
|
||||
backend_finalized_cb (gpointer data,
|
||||
GObject *where_the_object_was)
|
||||
{
|
||||
gboolean *backend_finalized = data;
|
||||
|
||||
*backend_finalized = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
|
||||
GtkCupsResult *result,
|
||||
@@ -3664,7 +3651,6 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
|
||||
GList *removed_printer_checklist;
|
||||
char *remote_default_printer = NULL;
|
||||
GList *iter;
|
||||
gboolean backend_finalized = FALSE;
|
||||
|
||||
list_has_changed = FALSE;
|
||||
|
||||
@@ -3697,8 +3683,6 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
|
||||
*/
|
||||
removed_printer_checklist = gtk_print_backend_get_printer_list (backend);
|
||||
|
||||
g_object_weak_ref (G_OBJECT (backend), backend_finalized_cb, &backend_finalized);
|
||||
|
||||
response = gtk_cups_result_get_response (result);
|
||||
for (attr = ippFirstAttribute (response); attr != NULL;
|
||||
attr = ippNextAttribute (response))
|
||||
@@ -3816,9 +3800,6 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
|
||||
{
|
||||
g_signal_emit_by_name (backend, "printer-added", printer);
|
||||
|
||||
if (backend_finalized)
|
||||
break;
|
||||
|
||||
gtk_printer_set_is_new (printer, FALSE);
|
||||
}
|
||||
|
||||
@@ -3856,44 +3837,36 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
|
||||
break;
|
||||
}
|
||||
|
||||
if (!backend_finalized)
|
||||
/* look at the removed printers checklist and mark any printer
|
||||
as inactive if it is in the list, emitting a printer_removed signal */
|
||||
if (removed_printer_checklist != NULL)
|
||||
{
|
||||
g_object_weak_unref (G_OBJECT (backend), backend_finalized_cb, &backend_finalized);
|
||||
|
||||
/* look at the removed printers checklist and mark any printer
|
||||
as inactive if it is in the list, emitting a printer_removed signal */
|
||||
if (removed_printer_checklist != NULL)
|
||||
for (iter = removed_printer_checklist; iter; iter = iter->next)
|
||||
{
|
||||
for (iter = removed_printer_checklist; iter; iter = iter->next)
|
||||
if (!GTK_PRINTER_CUPS (iter->data)->avahi_browsed)
|
||||
{
|
||||
if (!GTK_PRINTER_CUPS (iter->data)->avahi_browsed)
|
||||
{
|
||||
mark_printer_inactive (GTK_PRINTER (iter->data), backend);
|
||||
list_has_changed = TRUE;
|
||||
}
|
||||
mark_printer_inactive (GTK_PRINTER (iter->data), backend);
|
||||
list_has_changed = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (removed_printer_checklist);
|
||||
g_list_free (removed_printer_checklist);
|
||||
}
|
||||
|
||||
done:
|
||||
if (!backend_finalized)
|
||||
if (list_has_changed)
|
||||
g_signal_emit_by_name (backend, "printer-list-changed");
|
||||
|
||||
gtk_print_backend_set_list_done (backend);
|
||||
|
||||
if (!cups_backend->got_default_printer && remote_default_printer != NULL)
|
||||
{
|
||||
if (list_has_changed)
|
||||
g_signal_emit_by_name (backend, "printer-list-changed");
|
||||
|
||||
gtk_print_backend_set_list_done (backend);
|
||||
|
||||
if (!cups_backend->got_default_printer && remote_default_printer != NULL)
|
||||
{
|
||||
set_default_printer (cups_backend, remote_default_printer);
|
||||
g_free (remote_default_printer);
|
||||
}
|
||||
|
||||
if (!cups_backend->got_default_printer && cups_backend->avahi_default_printer != NULL)
|
||||
set_default_printer (cups_backend, cups_backend->avahi_default_printer);
|
||||
set_default_printer (cups_backend, remote_default_printer);
|
||||
g_free (remote_default_printer);
|
||||
}
|
||||
|
||||
if (!cups_backend->got_default_printer && cups_backend->avahi_default_printer != NULL)
|
||||
set_default_printer (cups_backend, cups_backend->avahi_default_printer);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
# Lukas Novotny <lukasnov@cvs.gnome.org>, 2006.
|
||||
# Petr Kovar <pknbe@volny.cz>, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015.
|
||||
# Marek Černocký <marek@manet.cz>, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023.
|
||||
# Vojtěch Perník <translations@pervoj.cz>, 2023-2024.
|
||||
# Vojtěch Perník <translations@pervoj.cz>, 2023.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2024-03-17 03:06+0000\n"
|
||||
"PO-Revision-Date: 2024-03-18 12:28+0100\n"
|
||||
"POT-Creation-Date: 2024-03-11 18:00+0000\n"
|
||||
"PO-Revision-Date: 2024-03-12 13:38+0100\n"
|
||||
"Last-Translator: Daniel Rusek <mail@asciiwolf.com>\n"
|
||||
"Language-Team: Czech <gnome-cs-list@gnome.org>\n"
|
||||
"Language: cs\n"
|
||||
@@ -59,11 +59,11 @@ msgstr "Nezdařilo se poskytnout obsah jako „%s“"
|
||||
msgid "Cannot provide contents as %s"
|
||||
msgstr "Nezdařilo se poskytnout obsah jako %s"
|
||||
|
||||
#: gdk/gdkdisplay.c:176 gdk/gdkglcontext.c:464
|
||||
#: gdk/gdkdisplay.c:176 gdk/gdkglcontext.c:459
|
||||
msgid "The current backend does not support OpenGL"
|
||||
msgstr "Aktuální podpůrná vrstva nepodporuje OpenGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1315 gdk/gdkvulkancontext.c:1600
|
||||
#: gdk/gdkdisplay.c:1315 gdk/gdkvulkancontext.c:1601
|
||||
msgid "Vulkan support disabled via GDK_DEBUG"
|
||||
msgstr "Podpora technologie Vulkan je zakázána skrz GDK_DEBUG"
|
||||
|
||||
@@ -71,23 +71,23 @@ msgstr "Podpora technologie Vulkan je zakázána skrz GDK_DEBUG"
|
||||
msgid "GL support disabled via GDK_DEBUG"
|
||||
msgstr "Podpora GL je zakázána skrz GDK_DEBUG"
|
||||
|
||||
#: gdk/gdkdisplay.c:1674
|
||||
#: gdk/gdkdisplay.c:1665
|
||||
msgid "No EGL configuration available"
|
||||
msgstr "Není k dispozici žádná konfigurace EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1682
|
||||
#: gdk/gdkdisplay.c:1673
|
||||
msgid "Failed to get EGL configurations"
|
||||
msgstr "Selhalo získání konfigurace EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1712
|
||||
#: gdk/gdkdisplay.c:1703
|
||||
msgid "No EGL configuration with required features found"
|
||||
msgstr "Nebyla nazelezna žádná konfigurace EGL s požadovanými vlastnostmi"
|
||||
|
||||
#: gdk/gdkdisplay.c:1719
|
||||
#: gdk/gdkdisplay.c:1710
|
||||
msgid "No perfect EGL configuration found"
|
||||
msgstr "Nebyla nalezena žádná bezvadná konfigurace EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1761
|
||||
#: gdk/gdkdisplay.c:1752
|
||||
#, c-format
|
||||
msgid "EGL implementation is missing extension %s"
|
||||
msgid_plural "EGL implementation is missing %2$d extensions: %1$s"
|
||||
@@ -95,23 +95,23 @@ msgstr[0] "Implementace EGL postrádá rozšíření %s"
|
||||
msgstr[1] "Implementace EGL postrádá %2$d rozšíření: %1$s"
|
||||
msgstr[2] "Implementace EGL postrádá %2$d rozšíření: %1$s"
|
||||
|
||||
#: gdk/gdkdisplay.c:1810
|
||||
#: gdk/gdkdisplay.c:1801
|
||||
msgid "libEGL not available in this sandbox"
|
||||
msgstr "V tomto izolovaném prostředí není k dispozici libEGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1811
|
||||
#: gdk/gdkdisplay.c:1802
|
||||
msgid "libEGL not available"
|
||||
msgstr "libEGL není dostupná"
|
||||
|
||||
#: gdk/gdkdisplay.c:1821
|
||||
#: gdk/gdkdisplay.c:1812
|
||||
msgid "Failed to create EGL display"
|
||||
msgstr "Selhalo vytvoření displeje EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1830
|
||||
#: gdk/gdkdisplay.c:1821
|
||||
msgid "Could not initialize EGL display"
|
||||
msgstr "Nezdařilo se inicializovat displej EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1840
|
||||
#: gdk/gdkdisplay.c:1831
|
||||
#, c-format
|
||||
msgid "EGL version %d.%d is too old. GTK requires %d.%d"
|
||||
msgstr "Verze EGL %d.%d je příliš stará. GTK vyžaduje %d.%d"
|
||||
@@ -124,32 +124,32 @@ msgstr "„Táhni a upusť“ z jiné aplikace není podporováno."
|
||||
msgid "No compatible formats to transfer contents."
|
||||
msgstr "Není k dispozici žádný kompatibilní formát pro přenos obsahu."
|
||||
|
||||
#: gdk/gdkglcontext.c:424 gdk/x11/gdkglcontext-glx.c:645
|
||||
#: gdk/gdkglcontext.c:419 gdk/x11/gdkglcontext-glx.c:645
|
||||
msgid "No GL API allowed."
|
||||
msgstr "Není povolené žádné GL API."
|
||||
|
||||
#: gdk/gdkglcontext.c:447 gdk/win32/gdkglcontext-win32-wgl.c:395
|
||||
#: gdk/gdkglcontext.c:442 gdk/win32/gdkglcontext-win32-wgl.c:395
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:538
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:582 gdk/x11/gdkglcontext-glx.c:691
|
||||
msgid "Unable to create a GL context"
|
||||
msgstr "Nelze vytvořit kontext GL"
|
||||
|
||||
#: gdk/gdkglcontext.c:1310
|
||||
#: gdk/gdkglcontext.c:1304
|
||||
msgid "OpenGL ES disabled via GDK_DEBUG"
|
||||
msgstr "OpenGL ES je zakázáno skrz GDK_DEBUG"
|
||||
|
||||
#: gdk/gdkglcontext.c:1322
|
||||
#: gdk/gdkglcontext.c:1316
|
||||
msgid "OpenGL disabled via GDK_DEBUG"
|
||||
msgstr "OpenGL je zakázáno skrz GDK_DEBUG"
|
||||
|
||||
#: gdk/gdkglcontext.c:1333
|
||||
#: gdk/gdkglcontext.c:1327
|
||||
#, c-format
|
||||
msgid "Application does not support %s API"
|
||||
msgstr "Aplikace nepodporuje API %s"
|
||||
|
||||
#. translators: This is about OpenGL backend names, like
|
||||
#. * "Trying to use X11 GLX, but EGL is already in use"
|
||||
#: gdk/gdkglcontext.c:2123
|
||||
#: gdk/gdkglcontext.c:2113
|
||||
#, c-format
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "Zkouší se použít %s, ale již se používá %s"
|
||||
@@ -566,9 +566,10 @@ msgid "Unsupported color type %u in png image"
|
||||
msgstr "Nepodporovaný typ barvy %u v obrázku PNG"
|
||||
|
||||
#: gdk/loaders/gdkpng.c:272
|
||||
#, c-format
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Not enough memory for image size %ux%u"
|
||||
msgid "Image stride too large for image size %ux%u"
|
||||
msgstr ""
|
||||
msgstr "Nedostatek paměti pro obrázek velikosti %u × %u"
|
||||
|
||||
#: gdk/loaders/gdktiff.c:358
|
||||
msgid "Failed to load RGB data from TIFF file"
|
||||
@@ -2372,7 +2373,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "Pokud smažete položku, bude natrvalo ztracena."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1188 gtk/gtkfilechooserwidget.c:1786
|
||||
#: gtk/gtklabel.c:5712 gtk/gtktext.c:6194 gtk/gtktextview.c:9099
|
||||
#: gtk/gtklabel.c:5711 gtk/gtktext.c:6194 gtk/gtktextview.c:9080
|
||||
msgid "_Delete"
|
||||
msgstr "_Smazat"
|
||||
|
||||
@@ -2711,31 +2712,31 @@ msgstr "Zavřít"
|
||||
msgid "Close the infobar"
|
||||
msgstr "Zavřít informační lištu"
|
||||
|
||||
#: gtk/gtklabel.c:5709 gtk/gtktext.c:6182 gtk/gtktextview.c:9087
|
||||
#: gtk/gtklabel.c:5708 gtk/gtktext.c:6182 gtk/gtktextview.c:9068
|
||||
msgid "Cu_t"
|
||||
msgstr "_Vyjmout"
|
||||
|
||||
#: gtk/gtklabel.c:5710 gtk/gtktext.c:6186 gtk/gtktextview.c:9091
|
||||
#: gtk/gtklabel.c:5709 gtk/gtktext.c:6186 gtk/gtktextview.c:9072
|
||||
msgid "_Copy"
|
||||
msgstr "_Kopírovat"
|
||||
|
||||
#: gtk/gtklabel.c:5711 gtk/gtktext.c:6190 gtk/gtktextview.c:9095
|
||||
#: gtk/gtklabel.c:5710 gtk/gtktext.c:6190 gtk/gtktextview.c:9076
|
||||
msgid "_Paste"
|
||||
msgstr "V_ložit"
|
||||
|
||||
#: gtk/gtklabel.c:5717 gtk/gtktext.c:6203 gtk/gtktextview.c:9120
|
||||
#: gtk/gtklabel.c:5716 gtk/gtktext.c:6203 gtk/gtktextview.c:9101
|
||||
msgid "Select _All"
|
||||
msgstr "Vybr_at vše"
|
||||
|
||||
#: gtk/gtklabel.c:5722
|
||||
#: gtk/gtklabel.c:5721
|
||||
msgid "_Open Link"
|
||||
msgstr "_Otevřít odkaz"
|
||||
|
||||
#: gtk/gtklabel.c:5726
|
||||
#: gtk/gtklabel.c:5725
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "Ko_pírovat adresu odkazu"
|
||||
|
||||
#: gtk/gtklabel.c:5770 gtk/gtktext.c:2723 gtk/gtktextview.c:9169
|
||||
#: gtk/gtklabel.c:5769 gtk/gtktext.c:2723 gtk/gtktextview.c:9150
|
||||
msgid "Context menu"
|
||||
msgstr "Kontextová nabídka"
|
||||
|
||||
@@ -3498,42 +3499,42 @@ msgstr "Získávají se informace o tiskárně…"
|
||||
#. * multiple pages on a sheet when printing
|
||||
#.
|
||||
#: gtk/print/gtkprintunixdialog.c:2753
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5672
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5645
|
||||
msgid "Left to right, top to bottom"
|
||||
msgstr "Zleva doprava, shora dolů"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2753
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5672
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5645
|
||||
msgid "Left to right, bottom to top"
|
||||
msgstr "Zleva doprava, zdola nahoru"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2754
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5673
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5646
|
||||
msgid "Right to left, top to bottom"
|
||||
msgstr "Zprava doleva, shora dolů"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2754
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5673
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5646
|
||||
msgid "Right to left, bottom to top"
|
||||
msgstr "Zprava doleva, zdola nahoru"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2755
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5674
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5647
|
||||
msgid "Top to bottom, left to right"
|
||||
msgstr "Shora dolů, zleva doprava"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2755
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5674
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5647
|
||||
msgid "Top to bottom, right to left"
|
||||
msgstr "Shora dolů, zprava doleva"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2756
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5675
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5648
|
||||
msgid "Bottom to top, left to right"
|
||||
msgstr "Zdola nahoru, zleva doprava"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2756
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5675
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5648
|
||||
msgid "Bottom to top, right to left"
|
||||
msgstr "Zdola nahoru, zprava doleva"
|
||||
|
||||
@@ -3672,15 +3673,15 @@ msgctxt "accessibility"
|
||||
msgid "Sidebar"
|
||||
msgstr "Postranní panel"
|
||||
|
||||
#: gtk/gtktext.c:6208 gtk/gtktextview.c:9125
|
||||
#: gtk/gtktext.c:6208 gtk/gtktextview.c:9106
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "Vložit _Emodži"
|
||||
|
||||
#: gtk/gtktextview.c:9107
|
||||
#: gtk/gtktextview.c:9088
|
||||
msgid "_Undo"
|
||||
msgstr "_Zpět"
|
||||
|
||||
#: gtk/gtktextview.c:9111
|
||||
#: gtk/gtktextview.c:9092
|
||||
msgid "_Redo"
|
||||
msgstr "Zn_ovu"
|
||||
|
||||
@@ -4417,7 +4418,6 @@ msgid ""
|
||||
"Tints all the places where the current renderer uses Cairo instead of the "
|
||||
"GPU."
|
||||
msgstr ""
|
||||
"Obarví všechna místa, kde aktuální vykreslování používá Cairo namísto GPU."
|
||||
|
||||
#: gtk/inspector/visual.ui:407
|
||||
msgid "Show Cairo Rendering"
|
||||
@@ -6591,22 +6591,22 @@ msgstr "Některá nastavení v dialogovém okně se navzájem vylučují"
|
||||
#. * job priority option in the print dialog
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:541
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5667
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5640
|
||||
msgid "Urgent"
|
||||
msgstr "Naléhavá"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:541
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5667
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5640
|
||||
msgid "High"
|
||||
msgstr "Vysoká"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:541
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5667
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5640
|
||||
msgid "Medium"
|
||||
msgstr "Střední"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:541
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5667
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5640
|
||||
msgid "Low"
|
||||
msgstr "Nízká"
|
||||
|
||||
@@ -6614,7 +6614,7 @@ msgstr "Nízká"
|
||||
#. * dialog that controls the front cover page.
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:562
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5809
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5782
|
||||
msgctxt "printer option"
|
||||
msgid "Before"
|
||||
msgstr "Před"
|
||||
@@ -6623,7 +6623,7 @@ msgstr "Před"
|
||||
#. * dialog that controls the back cover page.
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:569
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5824
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5797
|
||||
msgctxt "printer option"
|
||||
msgid "After"
|
||||
msgstr "Za"
|
||||
@@ -6802,266 +6802,266 @@ msgstr "Na tiskárně „%s“ se vyskytla chyba."
|
||||
msgid "; "
|
||||
msgstr "; "
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4609
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4676
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4582
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4649
|
||||
msgctxt "printing option"
|
||||
msgid "Two Sided"
|
||||
msgstr "Oboustranný"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4610
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4583
|
||||
msgctxt "printing option"
|
||||
msgid "Paper Type"
|
||||
msgstr "Typ papíru"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4611
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4584
|
||||
msgctxt "printing option"
|
||||
msgid "Paper Source"
|
||||
msgstr "Zdroj papíru"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4612
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4677
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4585
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4650
|
||||
msgctxt "printing option"
|
||||
msgid "Output Tray"
|
||||
msgstr "Výstupní zásobník"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4613
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4586
|
||||
msgctxt "printing option"
|
||||
msgid "Resolution"
|
||||
msgstr "Rozlišení"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4614
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4587
|
||||
msgctxt "printing option"
|
||||
msgid "GhostScript pre-filtering"
|
||||
msgstr "Předběžné filtrování GhostScript"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4623
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4596
|
||||
msgctxt "printing option value"
|
||||
msgid "One Sided"
|
||||
msgstr "Jednostranný"
|
||||
|
||||
#. Translators: this is an option of "Two Sided"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4625
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4598
|
||||
msgctxt "printing option value"
|
||||
msgid "Long Edge (Standard)"
|
||||
msgstr "Delší okraj (standardní)"
|
||||
|
||||
#. Translators: this is an option of "Two Sided"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4627
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4600
|
||||
msgctxt "printing option value"
|
||||
msgid "Short Edge (Flip)"
|
||||
msgstr "Kratší okraj (otočené)"
|
||||
|
||||
#. Translators: this is an option of "Paper Source"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4629
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4631
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4639
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4602
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4604
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4612
|
||||
msgctxt "printing option value"
|
||||
msgid "Auto Select"
|
||||
msgstr "Automatický výběr"
|
||||
|
||||
#. Translators: this is an option of "Paper Source"
|
||||
#. Translators: this is an option of "Resolution"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4633
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4635
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4637
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4641
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4606
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4608
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4610
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4614
|
||||
msgctxt "printing option value"
|
||||
msgid "Printer Default"
|
||||
msgstr "Výchozí podle tiskárny"
|
||||
|
||||
#. Translators: this is an option of "GhostScript"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4643
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4616
|
||||
msgctxt "printing option value"
|
||||
msgid "Embed GhostScript fonts only"
|
||||
msgstr "Vložit pouze fonty GhostScript"
|
||||
|
||||
#. Translators: this is an option of "GhostScript"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4645
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4618
|
||||
msgctxt "printing option value"
|
||||
msgid "Convert to PS level 1"
|
||||
msgstr "Převést na PS, úroveň 1"
|
||||
|
||||
#. Translators: this is an option of "GhostScript"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4647
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4620
|
||||
msgctxt "printing option value"
|
||||
msgid "Convert to PS level 2"
|
||||
msgstr "Převést na PS, úroveň 2"
|
||||
|
||||
#. Translators: this is an option of "GhostScript"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4649
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4622
|
||||
msgctxt "printing option value"
|
||||
msgid "No pre-filtering"
|
||||
msgstr "Bez předběžného filtrování"
|
||||
|
||||
#. Translators: "Miscellaneous" is the label for a button, that opens
|
||||
#. up an extra panel of settings in a print dialog.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4658
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4631
|
||||
msgctxt "printing option group"
|
||||
msgid "Miscellaneous"
|
||||
msgstr "Různé"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4685
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4658
|
||||
msgctxt "sides"
|
||||
msgid "One Sided"
|
||||
msgstr "Jednostranný"
|
||||
|
||||
#. Translators: this is an option of "Two Sided"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4687
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4660
|
||||
msgctxt "sides"
|
||||
msgid "Long Edge (Standard)"
|
||||
msgstr "Delší okraj (standardní)"
|
||||
|
||||
#. Translators: this is an option of "Two Sided"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4689
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4662
|
||||
msgctxt "sides"
|
||||
msgid "Short Edge (Flip)"
|
||||
msgstr "Kratší okraj (otočení)"
|
||||
|
||||
#. Translators: Top output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4692
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4665
|
||||
msgctxt "output-bin"
|
||||
msgid "Top Bin"
|
||||
msgstr "Horní zásobník"
|
||||
|
||||
#. Translators: Middle output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4694
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4667
|
||||
msgctxt "output-bin"
|
||||
msgid "Middle Bin"
|
||||
msgstr "Prostřední zásobník"
|
||||
|
||||
#. Translators: Bottom output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4696
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4669
|
||||
msgctxt "output-bin"
|
||||
msgid "Bottom Bin"
|
||||
msgstr "Spodní zásobník"
|
||||
|
||||
#. Translators: Side output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4698
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4671
|
||||
msgctxt "output-bin"
|
||||
msgid "Side Bin"
|
||||
msgstr "Boční zásobník"
|
||||
|
||||
#. Translators: Left output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4700
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4673
|
||||
msgctxt "output-bin"
|
||||
msgid "Left Bin"
|
||||
msgstr "Levý zásobník"
|
||||
|
||||
#. Translators: Right output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4702
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4675
|
||||
msgctxt "output-bin"
|
||||
msgid "Right Bin"
|
||||
msgstr "Pravý zásobník"
|
||||
|
||||
#. Translators: Center output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4704
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4677
|
||||
msgctxt "output-bin"
|
||||
msgid "Center Bin"
|
||||
msgstr "Středový zásobník"
|
||||
|
||||
#. Translators: Rear output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4706
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4679
|
||||
msgctxt "output-bin"
|
||||
msgid "Rear Bin"
|
||||
msgstr "Zadní zásobník"
|
||||
|
||||
#. Translators: Output bin where one sided output is oriented in the face-up position
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4708
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4681
|
||||
msgctxt "output-bin"
|
||||
msgid "Face Up Bin"
|
||||
msgstr "Zásobník lícem nahoru"
|
||||
|
||||
#. Translators: Output bin where one sided output is oriented in the face-down position
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4710
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4683
|
||||
msgctxt "output-bin"
|
||||
msgid "Face Down Bin"
|
||||
msgstr "Zásobník lícem dolů"
|
||||
|
||||
#. Translators: Large capacity output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4712
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4685
|
||||
msgctxt "output-bin"
|
||||
msgid "Large Capacity Bin"
|
||||
msgstr "Vysokokapacitní zásobník"
|
||||
|
||||
#. Translators: Output stacker number %d
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4734
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4707
|
||||
#, c-format
|
||||
msgctxt "output-bin"
|
||||
msgid "Stacker %d"
|
||||
msgstr "Třídička %d"
|
||||
|
||||
#. Translators: Output mailbox number %d
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4738
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4711
|
||||
#, c-format
|
||||
msgctxt "output-bin"
|
||||
msgid "Mailbox %d"
|
||||
msgstr "Poštovní schránka %d"
|
||||
|
||||
#. Translators: Private mailbox
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4742
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4715
|
||||
msgctxt "output-bin"
|
||||
msgid "My Mailbox"
|
||||
msgstr "Moje poštovní schránka"
|
||||
|
||||
#. Translators: Output tray number %d
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4746
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4719
|
||||
#, c-format
|
||||
msgctxt "output-bin"
|
||||
msgid "Tray %d"
|
||||
msgstr "Zásobník %d"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5223
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5196
|
||||
msgid "Printer Default"
|
||||
msgstr "Výchozí pro tiskárnu"
|
||||
|
||||
#. Translators, this string is used to label the job priority option
|
||||
#. * in the print dialog
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5697
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5670
|
||||
msgid "Job Priority"
|
||||
msgstr "Priorita úlohy"
|
||||
|
||||
#. Translators, this string is used to label the billing info entry
|
||||
#. * in the print dialog
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5708
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5681
|
||||
msgid "Billing Info"
|
||||
msgstr "Účtovací informace"
|
||||
|
||||
#. Translators, these strings are names for various 'standard' cover
|
||||
#. * pages that the printing system may support.
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5732
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5705
|
||||
msgctxt "cover page"
|
||||
msgid "None"
|
||||
msgstr "Žádná"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5733
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5706
|
||||
msgctxt "cover page"
|
||||
msgid "Classified"
|
||||
msgstr "Utajované"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5734
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5707
|
||||
msgctxt "cover page"
|
||||
msgid "Confidential"
|
||||
msgstr "Důvěrné"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5735
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5708
|
||||
msgctxt "cover page"
|
||||
msgid "Secret"
|
||||
msgstr "Tajné"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5736
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5709
|
||||
msgctxt "cover page"
|
||||
msgid "Standard"
|
||||
msgstr "Standardní"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5737
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5710
|
||||
msgctxt "cover page"
|
||||
msgid "Top Secret"
|
||||
msgstr "Přísně tajné"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5738
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5711
|
||||
msgctxt "cover page"
|
||||
msgid "Unclassified"
|
||||
msgstr "Neutajované"
|
||||
@@ -7069,7 +7069,7 @@ msgstr "Neutajované"
|
||||
#. Translators, this string is used to label the pages-per-sheet option
|
||||
#. * in the print dialog
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5750
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5723
|
||||
msgctxt "printer option"
|
||||
msgid "Pages per Sheet"
|
||||
msgstr "Stránek na list"
|
||||
@@ -7077,7 +7077,7 @@ msgstr "Stránek na list"
|
||||
#. Translators, this string is used to label the option in the print
|
||||
#. * dialog that controls in what order multiple pages are arranged
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5767
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5740
|
||||
msgctxt "printer option"
|
||||
msgid "Page Ordering"
|
||||
msgstr "Řazení stránek"
|
||||
@@ -7086,7 +7086,7 @@ msgstr "Řazení stránek"
|
||||
#. * a print job is printed. Possible values are 'now', a specified time,
|
||||
#. * or 'on hold'
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5844
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5817
|
||||
msgctxt "printer option"
|
||||
msgid "Print at"
|
||||
msgstr "Vytisknout"
|
||||
@@ -7094,7 +7094,7 @@ msgstr "Vytisknout"
|
||||
#. Translators: this is the name of the option that allows the user
|
||||
#. * to specify a time when a print job will be printed.
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5855
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5828
|
||||
msgctxt "printer option"
|
||||
msgid "Print at time"
|
||||
msgstr "Vytisknout v určený čas"
|
||||
@@ -7104,19 +7104,19 @@ msgstr "Vytisknout v určený čas"
|
||||
#. * the width and height in points. E.g: "Custom
|
||||
#. * 230.4x142.9"
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5902
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5875
|
||||
#, c-format
|
||||
msgid "Custom %s×%s"
|
||||
msgstr "Vlastní %s×%s"
|
||||
|
||||
#. TRANSLATORS: this is the ICC color profile to use for this job
|
||||
#: modules/printbackends/gtkprintbackendcups.c:6013
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5986
|
||||
msgctxt "printer option"
|
||||
msgid "Printer Profile"
|
||||
msgstr "Profil tiskárny"
|
||||
|
||||
#. TRANSLATORS: this is when color profile information is unavailable
|
||||
#: modules/printbackends/gtkprintbackendcups.c:6020
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5993
|
||||
msgctxt "printer option value"
|
||||
msgid "Unavailable"
|
||||
msgstr "Není k dispozici"
|
||||
@@ -7612,12 +7612,16 @@ msgid "Stroke the path"
|
||||
msgstr "Obtáhnout cestu"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:119 tools/gtk-path-tool-show.c:142
|
||||
#, fuzzy
|
||||
#| msgid "Show points"
|
||||
msgid "Show path points"
|
||||
msgstr "Zobrazit body cesty"
|
||||
msgstr "Zobrazit body"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:120 tools/gtk-path-tool-show.c:143
|
||||
#, fuzzy
|
||||
#| msgid "Show controls"
|
||||
msgid "Show control points"
|
||||
msgstr "Zobrazit body ovládání"
|
||||
msgstr "Zobrazit ovládání"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:121
|
||||
msgid "The output file"
|
||||
@@ -7800,7 +7804,18 @@ msgid "Failed to parse '%s' as number"
|
||||
msgstr "Nezdařilo se zpracování '%s' jako čísla"
|
||||
|
||||
#: tools/gtk-rendernode-tool.c:35
|
||||
#, c-format
|
||||
#, fuzzy, c-format
|
||||
#| msgid ""
|
||||
#| "Usage:\n"
|
||||
#| " gtk4-rendernode-tool [COMMAND] [OPTION…] FILE\n"
|
||||
#| "\n"
|
||||
#| "Perform various tasks on GTK render nodes.\n"
|
||||
#| "\n"
|
||||
#| "Commands:\n"
|
||||
#| " info Provide information about the node\n"
|
||||
#| " show Show the node\n"
|
||||
#| " render Take a screenshot of the node\n"
|
||||
#| "\n"
|
||||
msgid ""
|
||||
"Usage:\n"
|
||||
" gtk4-rendernode-tool [COMMAND] [OPTION…] FILE\n"
|
||||
@@ -7821,16 +7836,16 @@ msgstr ""
|
||||
"Provádí různé úkoly s uzly vykreslení GTK.\n"
|
||||
"\n"
|
||||
"Příkazy:\n"
|
||||
" benchmark Spustit benchmark vykreslení uzlu\n"
|
||||
" compare Porovnat uzly nebo obrázky\n"
|
||||
" info Poskytnout informace o uzlu\n"
|
||||
" show Zobrazit uzel\n"
|
||||
" render Pořídit snímek obrazovky uzlu\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:94
|
||||
#, fuzzy
|
||||
#| msgid "Renderer to use"
|
||||
msgid "Add renderer to benchmark"
|
||||
msgstr "Přidat do benchmarku vykreslování"
|
||||
msgstr "Jaké vykreslování použít"
|
||||
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:94
|
||||
#: tools/gtk-rendernode-tool-compare.c:65
|
||||
@@ -7840,19 +7855,19 @@ msgstr "VYKRESLOVÁNÍ"
|
||||
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:95
|
||||
msgid "Number of runs with each renderer"
|
||||
msgstr "Počet běhů s každým vykreslováním"
|
||||
msgstr ""
|
||||
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:95
|
||||
msgid "RUNS"
|
||||
msgstr "BĚHY"
|
||||
msgstr ""
|
||||
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:96
|
||||
msgid "Don’t download result/wait for GPU to finish"
|
||||
msgstr "Nestahovat výsledek/počkat, až GPU skončí"
|
||||
msgstr ""
|
||||
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:114
|
||||
msgid "Benchmark rendering of a .node file."
|
||||
msgstr "Benchmark vykreslování souboru .node"
|
||||
msgstr ""
|
||||
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:127
|
||||
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:224
|
||||
@@ -7862,9 +7877,10 @@ msgid "No .node file specified\n"
|
||||
msgstr "Není uveden žádný soubor .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:133
|
||||
#, c-format
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Can only accept a single .node file\n"
|
||||
msgid "Can only benchmark a single .node file\n"
|
||||
msgstr "Je možné spustit benchmark pouze pro jeden soubor .node\n"
|
||||
msgstr "Je možné přijmout pouze jeden soubor .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-compare.c:65
|
||||
#: tools/gtk-rendernode-tool-render.c:195
|
||||
@@ -7890,9 +7906,10 @@ msgstr "Musí být určeny dva soubory\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-compare.c:102
|
||||
#: tools/gtk-rendernode-tool-render.c:150
|
||||
#, c-format
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Failed to rewrite header\n"
|
||||
msgid "Failed to create renderer: %s\n"
|
||||
msgstr "Nezdařilo se vytvořit vykreslování: %s\n"
|
||||
msgstr "Nezdařil se přepis záhlaví\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-compare.c:111
|
||||
#, c-format
|
||||
@@ -7900,9 +7917,10 @@ msgid "Failed to load %s: %s\n"
|
||||
msgstr "Nezdařilo se načtení %s: %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-compare.c:122
|
||||
#, c-format
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Could not rename %s back to %s: %s.\n"
|
||||
msgid "Could not save diff image to %s\n"
|
||||
msgstr "Nezdařilo se uložit obrázek rozdílu do %s\n"
|
||||
msgstr "%s nelze přejmenovat zpět na %s: %s.\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-compare.c:132
|
||||
#, c-format
|
||||
|
||||
@@ -23,8 +23,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-03-16 23:08+0000\n"
|
||||
"PO-Revision-Date: 2024-03-19 14:05+0100\n"
|
||||
"POT-Creation-Date: 2024-03-05 13:23+0000\n"
|
||||
"PO-Revision-Date: 2024-03-05 20:44+0100\n"
|
||||
"Last-Translator: Guillaume Bernard <associations@guillaume-bernard.fr>\n"
|
||||
"Language-Team: GNOME French Team <gnomefr@traduc.org>\n"
|
||||
"Language: fr\n"
|
||||
@@ -62,11 +62,11 @@ 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:176 gdk/gdkglcontext.c:463
|
||||
#: gdk/gdkdisplay.c:176 gdk/gdkglcontext.c:459
|
||||
msgid "The current backend does not support OpenGL"
|
||||
msgstr "Le moteur actuel ne gère pas OpenGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1315 gdk/gdkvulkancontext.c:1600
|
||||
#: gdk/gdkdisplay.c:1315 gdk/gdkvulkancontext.c:1601
|
||||
msgid "Vulkan support disabled via GDK_DEBUG"
|
||||
msgstr "Prise en charge de Vulkan désactivée via GDK_DEBUG"
|
||||
|
||||
@@ -74,47 +74,47 @@ msgstr "Prise en charge de Vulkan désactivée via GDK_DEBUG"
|
||||
msgid "GL support disabled via GDK_DEBUG"
|
||||
msgstr "Prise en charge de GL désactivée via GDK_DEBUG"
|
||||
|
||||
#: gdk/gdkdisplay.c:1674
|
||||
#: gdk/gdkdisplay.c:1665
|
||||
msgid "No EGL configuration available"
|
||||
msgstr "Aucune configuration EGL disponible"
|
||||
|
||||
#: gdk/gdkdisplay.c:1682
|
||||
#: gdk/gdkdisplay.c:1673
|
||||
msgid "Failed to get EGL configurations"
|
||||
msgstr "Impossible d’obtenir les configurations EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1712
|
||||
#: gdk/gdkdisplay.c:1703
|
||||
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:1719
|
||||
#: gdk/gdkdisplay.c:1710
|
||||
msgid "No perfect EGL configuration found"
|
||||
msgstr "Aucune configuration EGL idéale trouvée"
|
||||
|
||||
#: gdk/gdkdisplay.c:1761
|
||||
#: gdk/gdkdisplay.c:1752
|
||||
#, 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:1810
|
||||
#: gdk/gdkdisplay.c:1801
|
||||
msgid "libEGL not available in this sandbox"
|
||||
msgstr "libEGL n’est pas disponible dans ce bac à sable"
|
||||
|
||||
#: gdk/gdkdisplay.c:1811
|
||||
#: gdk/gdkdisplay.c:1802
|
||||
msgid "libEGL not available"
|
||||
msgstr "libEGL non disponible"
|
||||
|
||||
#: gdk/gdkdisplay.c:1821
|
||||
#: gdk/gdkdisplay.c:1812
|
||||
msgid "Failed to create EGL display"
|
||||
msgstr "Impossible de créer l’affichage EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1830
|
||||
#: gdk/gdkdisplay.c:1821
|
||||
msgid "Could not initialize EGL display"
|
||||
msgstr "Impossible d’initialiser l’affichage EGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1840
|
||||
#: gdk/gdkdisplay.c:1831
|
||||
#, 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"
|
||||
@@ -128,32 +128,32 @@ msgstr ""
|
||||
msgid "No compatible formats to transfer contents."
|
||||
msgstr "Aucun format compatible pour le transfert du contenu."
|
||||
|
||||
#: gdk/gdkglcontext.c:423 gdk/x11/gdkglcontext-glx.c:645
|
||||
#: gdk/gdkglcontext.c:419 gdk/x11/gdkglcontext-glx.c:645
|
||||
msgid "No GL API allowed."
|
||||
msgstr "Aucune API GL autorisée."
|
||||
|
||||
#: gdk/gdkglcontext.c:446 gdk/win32/gdkglcontext-win32-wgl.c:395
|
||||
#: gdk/gdkglcontext.c:442 gdk/win32/gdkglcontext-win32-wgl.c:395
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:538
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:582 gdk/x11/gdkglcontext-glx.c:691
|
||||
msgid "Unable to create a GL context"
|
||||
msgstr "Impossible de créer un contexte GL"
|
||||
|
||||
#: gdk/gdkglcontext.c:1309
|
||||
#: gdk/gdkglcontext.c:1304
|
||||
msgid "OpenGL ES disabled via GDK_DEBUG"
|
||||
msgstr "OpenGL ES désactivé via GTK_DEBUG"
|
||||
|
||||
#: gdk/gdkglcontext.c:1321
|
||||
#: gdk/gdkglcontext.c:1316
|
||||
msgid "OpenGL disabled via GDK_DEBUG"
|
||||
msgstr "OpenGL désactivé via GTK_DEBUG"
|
||||
|
||||
#: gdk/gdkglcontext.c:1332
|
||||
#: gdk/gdkglcontext.c:1327
|
||||
#, 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:2117
|
||||
#: gdk/gdkglcontext.c:2113
|
||||
#, 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é"
|
||||
@@ -2386,7 +2386,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:1188 gtk/gtkfilechooserwidget.c:1786
|
||||
#: gtk/gtklabel.c:5712 gtk/gtktext.c:6194 gtk/gtktextview.c:9099
|
||||
#: gtk/gtklabel.c:5711 gtk/gtktext.c:6193 gtk/gtktextview.c:9079
|
||||
msgid "_Delete"
|
||||
msgstr "_Supprimer"
|
||||
|
||||
@@ -2595,7 +2595,7 @@ msgid "_Time"
|
||||
msgstr "D_ate"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:7375 gtk/gtkplacessidebar.c:2306
|
||||
#: gtk/inspector/a11y.ui:43 gtk/inspector/actions.ui:18
|
||||
#: gtk/inspector/a11y.ui:43 gtk/inspector/actions.ui:19
|
||||
#: gtk/inspector/css-node-tree.ui:22 gtk/inspector/prop-list.ui:24
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:385 gtk/print/ui/gtkprintunixdialog.ui:80
|
||||
msgid "Name"
|
||||
@@ -2724,31 +2724,31 @@ msgstr "Fermer"
|
||||
msgid "Close the infobar"
|
||||
msgstr "Fermer la barre d’information"
|
||||
|
||||
#: gtk/gtklabel.c:5709 gtk/gtktext.c:6182 gtk/gtktextview.c:9087
|
||||
#: gtk/gtklabel.c:5708 gtk/gtktext.c:6181 gtk/gtktextview.c:9067
|
||||
msgid "Cu_t"
|
||||
msgstr "Co_uper"
|
||||
|
||||
#: gtk/gtklabel.c:5710 gtk/gtktext.c:6186 gtk/gtktextview.c:9091
|
||||
#: gtk/gtklabel.c:5709 gtk/gtktext.c:6185 gtk/gtktextview.c:9071
|
||||
msgid "_Copy"
|
||||
msgstr "_Copier"
|
||||
|
||||
#: gtk/gtklabel.c:5711 gtk/gtktext.c:6190 gtk/gtktextview.c:9095
|
||||
#: gtk/gtklabel.c:5710 gtk/gtktext.c:6189 gtk/gtktextview.c:9075
|
||||
msgid "_Paste"
|
||||
msgstr "C_oller"
|
||||
|
||||
#: gtk/gtklabel.c:5717 gtk/gtktext.c:6203 gtk/gtktextview.c:9120
|
||||
#: gtk/gtklabel.c:5716 gtk/gtktext.c:6202 gtk/gtktextview.c:9100
|
||||
msgid "Select _All"
|
||||
msgstr "_Tout sélectionner"
|
||||
|
||||
#: gtk/gtklabel.c:5722
|
||||
#: gtk/gtklabel.c:5721
|
||||
msgid "_Open Link"
|
||||
msgstr "_Ouvrir le lien"
|
||||
|
||||
#: gtk/gtklabel.c:5726
|
||||
#: gtk/gtklabel.c:5725
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "Copier l’_adresse du lien"
|
||||
|
||||
#: gtk/gtklabel.c:5770 gtk/gtktext.c:2723 gtk/gtktextview.c:9169
|
||||
#: gtk/gtklabel.c:5769 gtk/gtktext.c:2724 gtk/gtktextview.c:9149
|
||||
msgid "Context menu"
|
||||
msgstr "Menu contextuel"
|
||||
|
||||
@@ -3516,42 +3516,42 @@ msgstr "Récupération des informations sur l’imprimante…"
|
||||
#. * multiple pages on a sheet when printing
|
||||
#.
|
||||
#: gtk/print/gtkprintunixdialog.c:2753
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5672
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5645
|
||||
msgid "Left to right, top to bottom"
|
||||
msgstr "De gauche à droite, du haut vers le bas"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2753
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5672
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5645
|
||||
msgid "Left to right, bottom to top"
|
||||
msgstr "De gauche à droite, du bas vers le haut"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2754
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5673
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5646
|
||||
msgid "Right to left, top to bottom"
|
||||
msgstr "De droite à gauche, du haut vers le bas"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2754
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5673
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5646
|
||||
msgid "Right to left, bottom to top"
|
||||
msgstr "De droite à gauche, du bas vers le haut"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2755
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5674
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5647
|
||||
msgid "Top to bottom, left to right"
|
||||
msgstr "Du haut vers le bas, de gauche à droite"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2755
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5674
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5647
|
||||
msgid "Top to bottom, right to left"
|
||||
msgstr "Du haut vers le bas, de droite à gauche"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2756
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5675
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5648
|
||||
msgid "Bottom to top, left to right"
|
||||
msgstr "Du bas vers le haut, de gauche à droite"
|
||||
|
||||
#: gtk/print/gtkprintunixdialog.c:2756
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5675
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5648
|
||||
msgid "Bottom to top, right to left"
|
||||
msgstr "Du bas vers le haut, de droite à gauche"
|
||||
|
||||
@@ -3691,15 +3691,15 @@ msgctxt "accessibility"
|
||||
msgid "Sidebar"
|
||||
msgstr "Panneau latéral"
|
||||
|
||||
#: gtk/gtktext.c:6208 gtk/gtktextview.c:9125
|
||||
#: gtk/gtktext.c:6207 gtk/gtktextview.c:9105
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "Insérer un _émoji"
|
||||
|
||||
#: gtk/gtktextview.c:9107
|
||||
#: gtk/gtktextview.c:9087
|
||||
msgid "_Undo"
|
||||
msgstr "Ann_uler"
|
||||
|
||||
#: gtk/gtktextview.c:9111
|
||||
#: gtk/gtktextview.c:9091
|
||||
msgid "_Redo"
|
||||
msgstr "_Rétablir"
|
||||
|
||||
@@ -3929,7 +3929,7 @@ msgctxt "Vulkan version"
|
||||
msgid "None"
|
||||
msgstr "Aucune"
|
||||
|
||||
#: gtk/inspector/general.c:923
|
||||
#: gtk/inspector/general.c:922
|
||||
msgid "IM Context is hardcoded by GTK_IM_MODULE"
|
||||
msgstr "Le contexte de méthode de saisie est fixé par GTK_IM_MODULE"
|
||||
|
||||
@@ -4300,27 +4300,27 @@ msgstr "Taille :"
|
||||
msgid "Trigger"
|
||||
msgstr "Déclencher"
|
||||
|
||||
#: gtk/inspector/size-groups.c:228
|
||||
#: gtk/inspector/size-groups.c:225
|
||||
msgctxt "sizegroup mode"
|
||||
msgid "None"
|
||||
msgstr "Aucun"
|
||||
|
||||
#: gtk/inspector/size-groups.c:229
|
||||
#: gtk/inspector/size-groups.c:226
|
||||
msgctxt "sizegroup mode"
|
||||
msgid "Horizontal"
|
||||
msgstr "Horizontal"
|
||||
|
||||
#: gtk/inspector/size-groups.c:230
|
||||
#: gtk/inspector/size-groups.c:227
|
||||
msgctxt "sizegroup mode"
|
||||
msgid "Vertical"
|
||||
msgstr "Vertical"
|
||||
|
||||
#: gtk/inspector/size-groups.c:231
|
||||
#: gtk/inspector/size-groups.c:228
|
||||
msgctxt "sizegroup mode"
|
||||
msgid "Both"
|
||||
msgstr "Les deux"
|
||||
|
||||
#: gtk/inspector/size-groups.c:243
|
||||
#: gtk/inspector/size-groups.c:240
|
||||
msgid "Mode"
|
||||
msgstr "Mode"
|
||||
|
||||
@@ -4377,10 +4377,14 @@ msgstr "Hiérarchie"
|
||||
msgid "Implements"
|
||||
msgstr "Implémente"
|
||||
|
||||
#: gtk/inspector/visual.c:672 gtk/inspector/visual.c:691
|
||||
#: gtk/inspector/visual.c:674 gtk/inspector/visual.c:693
|
||||
msgid "Theme is hardcoded by GTK_THEME"
|
||||
msgstr "Le thème est figé par GTK_THEME"
|
||||
|
||||
#: gtk/inspector/visual.c:942
|
||||
msgid "Backend does not support window scaling"
|
||||
msgstr "Le moteur ne gère pas la mise à l’échelle des fenêtres"
|
||||
|
||||
#: gtk/inspector/visual.ui:34
|
||||
msgid "GTK Theme"
|
||||
msgstr "Thème GTK"
|
||||
@@ -4401,39 +4405,43 @@ msgstr "Taille de curseur"
|
||||
msgid "Icon Theme"
|
||||
msgstr "Thème d’icônes"
|
||||
|
||||
#: gtk/inspector/visual.ui:199
|
||||
#: gtk/inspector/visual.ui:194
|
||||
msgid "Font Scale"
|
||||
msgstr "Mise à l’échelle des polices"
|
||||
|
||||
#: gtk/inspector/visual.ui:244
|
||||
#: gtk/inspector/visual.ui:239
|
||||
msgid "Text Direction"
|
||||
msgstr "Direction du texte"
|
||||
|
||||
#: gtk/inspector/visual.ui:259
|
||||
#: gtk/inspector/visual.ui:254
|
||||
msgid "Left-to-Right"
|
||||
msgstr "De gauche à droite"
|
||||
|
||||
#: gtk/inspector/visual.ui:260
|
||||
#: gtk/inspector/visual.ui:255
|
||||
msgid "Right-to-Left"
|
||||
msgstr "De droite à gauche"
|
||||
|
||||
#: gtk/inspector/visual.ui:277
|
||||
#: gtk/inspector/visual.ui:273
|
||||
msgid "Window Scaling"
|
||||
msgstr "Mise à l’échelle des fenêtres"
|
||||
|
||||
#: gtk/inspector/visual.ui:306
|
||||
msgid "Animations"
|
||||
msgstr "Animations"
|
||||
|
||||
#: gtk/inspector/visual.ui:302
|
||||
#: gtk/inspector/visual.ui:331
|
||||
msgid "Slowdown"
|
||||
msgstr "Ralenti"
|
||||
|
||||
#: gtk/inspector/visual.ui:356
|
||||
#: gtk/inspector/visual.ui:385
|
||||
msgid "Show Framerate"
|
||||
msgstr "Afficher la fréquence d’image"
|
||||
|
||||
#: gtk/inspector/visual.ui:381
|
||||
#: gtk/inspector/visual.ui:410
|
||||
msgid "Show Graphic Updates"
|
||||
msgstr "Afficher les mises à jour graphiques"
|
||||
|
||||
#: gtk/inspector/visual.ui:401
|
||||
#: gtk/inspector/visual.ui:430
|
||||
msgid ""
|
||||
"Tints all the places where the current renderer uses Cairo instead of the "
|
||||
"GPU."
|
||||
@@ -4441,47 +4449,47 @@ msgstr ""
|
||||
"Colore tous les endroits où le moteur de rendu actuel utilise Cairo au lieu "
|
||||
"du GPU."
|
||||
|
||||
#: gtk/inspector/visual.ui:407
|
||||
#: gtk/inspector/visual.ui:436
|
||||
msgid "Show Cairo Rendering"
|
||||
msgstr "Afficher le rendu de Cairo"
|
||||
|
||||
#: gtk/inspector/visual.ui:432
|
||||
#: gtk/inspector/visual.ui:461
|
||||
msgid "Show Baselines"
|
||||
msgstr "Afficher les lignes de base"
|
||||
|
||||
#: gtk/inspector/visual.ui:460
|
||||
#: gtk/inspector/visual.ui:489
|
||||
msgid "Show Layout Borders"
|
||||
msgstr "Afficher les bords de l’agencement"
|
||||
|
||||
#: gtk/inspector/visual.ui:517
|
||||
#: gtk/inspector/visual.ui:546
|
||||
msgid "CSS Padding"
|
||||
msgstr "Remplissage CSS"
|
||||
|
||||
#: gtk/inspector/visual.ui:527
|
||||
#: gtk/inspector/visual.ui:556
|
||||
msgid "CSS Border"
|
||||
msgstr "Bordure CSS"
|
||||
|
||||
#: gtk/inspector/visual.ui:537
|
||||
#: gtk/inspector/visual.ui:566
|
||||
msgid "CSS Margin"
|
||||
msgstr "Marge CSS"
|
||||
|
||||
#: gtk/inspector/visual.ui:547
|
||||
#: gtk/inspector/visual.ui:576
|
||||
msgid "Widget Margin"
|
||||
msgstr "Marge du composant graphique"
|
||||
|
||||
#: gtk/inspector/visual.ui:582
|
||||
#: gtk/inspector/visual.ui:611
|
||||
msgid "Show Focus"
|
||||
msgstr "Montrer le focus"
|
||||
|
||||
#: gtk/inspector/visual.ui:607
|
||||
#: gtk/inspector/visual.ui:636
|
||||
msgid "Show Accessibility warnings"
|
||||
msgstr "Afficher les avertissements d’accessibilité"
|
||||
|
||||
#: gtk/inspector/visual.ui:632
|
||||
#: gtk/inspector/visual.ui:661
|
||||
msgid "Show Graphics Offload"
|
||||
msgstr "Afficher le déchargement graphique"
|
||||
|
||||
#: gtk/inspector/visual.ui:664
|
||||
#: gtk/inspector/visual.ui:693
|
||||
msgid "Inspect Inspector"
|
||||
msgstr "Inspecter l’inspecteur"
|
||||
|
||||
@@ -4511,7 +4519,7 @@ msgstr "Objets"
|
||||
|
||||
#: gtk/inspector/window.ui:231
|
||||
msgid "Toggle Sidebar"
|
||||
msgstr "Bascule du panneau latéral"
|
||||
msgstr "Bascule de la barre latérale"
|
||||
|
||||
#: gtk/inspector/window.ui:253
|
||||
msgid "Refresh action state"
|
||||
@@ -6613,22 +6621,22 @@ msgstr "Certains paramètres dans la boîte de dialogue sont en conflit"
|
||||
#. * job priority option in the print dialog
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:541
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5667
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5640
|
||||
msgid "Urgent"
|
||||
msgstr "Urgent"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:541
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5667
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5640
|
||||
msgid "High"
|
||||
msgstr "Haute"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:541
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5667
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5640
|
||||
msgid "Medium"
|
||||
msgstr "Moyenne"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:541
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5667
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5640
|
||||
msgid "Low"
|
||||
msgstr "Basse"
|
||||
|
||||
@@ -6636,7 +6644,7 @@ msgstr "Basse"
|
||||
#. * dialog that controls the front cover page.
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:562
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5809
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5782
|
||||
msgctxt "printer option"
|
||||
msgid "Before"
|
||||
msgstr "Avant"
|
||||
@@ -6645,7 +6653,7 @@ msgstr "Avant"
|
||||
#. * dialog that controls the back cover page.
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcpdb.c:569
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5824
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5797
|
||||
msgctxt "printer option"
|
||||
msgid "After"
|
||||
msgstr "Après"
|
||||
@@ -6830,266 +6838,266 @@ msgstr "Il y a un problème avec l’imprimante « %s »."
|
||||
msgid "; "
|
||||
msgstr " ; "
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4609
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4676
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4582
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4649
|
||||
msgctxt "printing option"
|
||||
msgid "Two Sided"
|
||||
msgstr "Recto verso"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4610
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4583
|
||||
msgctxt "printing option"
|
||||
msgid "Paper Type"
|
||||
msgstr "Type de papier"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4611
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4584
|
||||
msgctxt "printing option"
|
||||
msgid "Paper Source"
|
||||
msgstr "Source du papier"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4612
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4677
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4585
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4650
|
||||
msgctxt "printing option"
|
||||
msgid "Output Tray"
|
||||
msgstr "Bac de sortie"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4613
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4586
|
||||
msgctxt "printing option"
|
||||
msgid "Resolution"
|
||||
msgstr "Résolution"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4614
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4587
|
||||
msgctxt "printing option"
|
||||
msgid "GhostScript pre-filtering"
|
||||
msgstr "Pré-filtrage GhostScript"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4623
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4596
|
||||
msgctxt "printing option value"
|
||||
msgid "One Sided"
|
||||
msgstr "Recto"
|
||||
|
||||
#. Translators: this is an option of "Two Sided"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4625
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4598
|
||||
msgctxt "printing option value"
|
||||
msgid "Long Edge (Standard)"
|
||||
msgstr "Bord long (standard)"
|
||||
|
||||
#. Translators: this is an option of "Two Sided"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4627
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4600
|
||||
msgctxt "printing option value"
|
||||
msgid "Short Edge (Flip)"
|
||||
msgstr "Bord court (retourné)"
|
||||
|
||||
#. Translators: this is an option of "Paper Source"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4629
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4631
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4639
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4602
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4604
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4612
|
||||
msgctxt "printing option value"
|
||||
msgid "Auto Select"
|
||||
msgstr "Sélection automatique"
|
||||
|
||||
#. Translators: this is an option of "Paper Source"
|
||||
#. Translators: this is an option of "Resolution"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4633
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4635
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4637
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4641
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4606
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4608
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4610
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4614
|
||||
msgctxt "printing option value"
|
||||
msgid "Printer Default"
|
||||
msgstr "Selon l’imprimante"
|
||||
|
||||
#. Translators: this is an option of "GhostScript"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4643
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4616
|
||||
msgctxt "printing option value"
|
||||
msgid "Embed GhostScript fonts only"
|
||||
msgstr "Inclure uniquement les polices GhostScript"
|
||||
|
||||
#. Translators: this is an option of "GhostScript"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4645
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4618
|
||||
msgctxt "printing option value"
|
||||
msgid "Convert to PS level 1"
|
||||
msgstr "Convertir en PS niveau 1"
|
||||
|
||||
#. Translators: this is an option of "GhostScript"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4647
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4620
|
||||
msgctxt "printing option value"
|
||||
msgid "Convert to PS level 2"
|
||||
msgstr "Convertir en PS niveau 2"
|
||||
|
||||
#. Translators: this is an option of "GhostScript"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4649
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4622
|
||||
msgctxt "printing option value"
|
||||
msgid "No pre-filtering"
|
||||
msgstr "Pas de pré-filtrage"
|
||||
|
||||
#. Translators: "Miscellaneous" is the label for a button, that opens
|
||||
#. up an extra panel of settings in a print dialog.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4658
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4631
|
||||
msgctxt "printing option group"
|
||||
msgid "Miscellaneous"
|
||||
msgstr "Divers"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4685
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4658
|
||||
msgctxt "sides"
|
||||
msgid "One Sided"
|
||||
msgstr "Recto"
|
||||
|
||||
#. Translators: this is an option of "Two Sided"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4687
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4660
|
||||
msgctxt "sides"
|
||||
msgid "Long Edge (Standard)"
|
||||
msgstr "Bord long (standard)"
|
||||
|
||||
#. Translators: this is an option of "Two Sided"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4689
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4662
|
||||
msgctxt "sides"
|
||||
msgid "Short Edge (Flip)"
|
||||
msgstr "Bord court (retourné)"
|
||||
|
||||
#. Translators: Top output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4692
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4665
|
||||
msgctxt "output-bin"
|
||||
msgid "Top Bin"
|
||||
msgstr "Bac supérieur"
|
||||
|
||||
#. Translators: Middle output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4694
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4667
|
||||
msgctxt "output-bin"
|
||||
msgid "Middle Bin"
|
||||
msgstr "Bac intermédiaire"
|
||||
|
||||
#. Translators: Bottom output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4696
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4669
|
||||
msgctxt "output-bin"
|
||||
msgid "Bottom Bin"
|
||||
msgstr "Bac inférieur"
|
||||
|
||||
#. Translators: Side output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4698
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4671
|
||||
msgctxt "output-bin"
|
||||
msgid "Side Bin"
|
||||
msgstr "Bac latéral"
|
||||
|
||||
#. Translators: Left output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4700
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4673
|
||||
msgctxt "output-bin"
|
||||
msgid "Left Bin"
|
||||
msgstr "Bac de gauche"
|
||||
|
||||
#. Translators: Right output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4702
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4675
|
||||
msgctxt "output-bin"
|
||||
msgid "Right Bin"
|
||||
msgstr "Bac de droite"
|
||||
|
||||
#. Translators: Center output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4704
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4677
|
||||
msgctxt "output-bin"
|
||||
msgid "Center Bin"
|
||||
msgstr "Bac central"
|
||||
|
||||
#. Translators: Rear output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4706
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4679
|
||||
msgctxt "output-bin"
|
||||
msgid "Rear Bin"
|
||||
msgstr "Bac arrière"
|
||||
|
||||
#. Translators: Output bin where one sided output is oriented in the face-up position
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4708
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4681
|
||||
msgctxt "output-bin"
|
||||
msgid "Face Up Bin"
|
||||
msgstr "Bac à face vers le haut"
|
||||
|
||||
#. Translators: Output bin where one sided output is oriented in the face-down position
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4710
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4683
|
||||
msgctxt "output-bin"
|
||||
msgid "Face Down Bin"
|
||||
msgstr "Bac à face vers le bas"
|
||||
|
||||
#. Translators: Large capacity output bin
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4712
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4685
|
||||
msgctxt "output-bin"
|
||||
msgid "Large Capacity Bin"
|
||||
msgstr "Bac de grande capacité"
|
||||
|
||||
#. Translators: Output stacker number %d
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4734
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4707
|
||||
#, c-format
|
||||
msgctxt "output-bin"
|
||||
msgid "Stacker %d"
|
||||
msgstr "Empileur %d"
|
||||
|
||||
#. Translators: Output mailbox number %d
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4738
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4711
|
||||
#, c-format
|
||||
msgctxt "output-bin"
|
||||
msgid "Mailbox %d"
|
||||
msgstr "Boîte de messagerie %d"
|
||||
|
||||
#. Translators: Private mailbox
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4742
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4715
|
||||
msgctxt "output-bin"
|
||||
msgid "My Mailbox"
|
||||
msgstr "Ma boîte de messagerie"
|
||||
|
||||
#. Translators: Output tray number %d
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4746
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4719
|
||||
#, c-format
|
||||
msgctxt "output-bin"
|
||||
msgid "Tray %d"
|
||||
msgstr "Plateau %d"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5223
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5196
|
||||
msgid "Printer Default"
|
||||
msgstr "Selon l’imprimante"
|
||||
|
||||
#. Translators, this string is used to label the job priority option
|
||||
#. * in the print dialog
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5697
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5670
|
||||
msgid "Job Priority"
|
||||
msgstr "Priorité de la tâche"
|
||||
|
||||
#. Translators, this string is used to label the billing info entry
|
||||
#. * in the print dialog
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5708
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5681
|
||||
msgid "Billing Info"
|
||||
msgstr "Informations de facturation"
|
||||
|
||||
#. Translators, these strings are names for various 'standard' cover
|
||||
#. * pages that the printing system may support.
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5732
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5705
|
||||
msgctxt "cover page"
|
||||
msgid "None"
|
||||
msgstr "Aucune"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5733
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5706
|
||||
msgctxt "cover page"
|
||||
msgid "Classified"
|
||||
msgstr "Classifié"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5734
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5707
|
||||
msgctxt "cover page"
|
||||
msgid "Confidential"
|
||||
msgstr "Confidentiel"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5735
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5708
|
||||
msgctxt "cover page"
|
||||
msgid "Secret"
|
||||
msgstr "Secret"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5736
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5709
|
||||
msgctxt "cover page"
|
||||
msgid "Standard"
|
||||
msgstr "Standard"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5737
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5710
|
||||
msgctxt "cover page"
|
||||
msgid "Top Secret"
|
||||
msgstr "Top secret"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5738
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5711
|
||||
msgctxt "cover page"
|
||||
msgid "Unclassified"
|
||||
msgstr "Non classifié"
|
||||
@@ -7097,7 +7105,7 @@ msgstr "Non classifié"
|
||||
#. Translators, this string is used to label the pages-per-sheet option
|
||||
#. * in the print dialog
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5750
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5723
|
||||
msgctxt "printer option"
|
||||
msgid "Pages per Sheet"
|
||||
msgstr "Pages par feuille"
|
||||
@@ -7105,7 +7113,7 @@ msgstr "Pages par feuille"
|
||||
#. Translators, this string is used to label the option in the print
|
||||
#. * dialog that controls in what order multiple pages are arranged
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5767
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5740
|
||||
msgctxt "printer option"
|
||||
msgid "Page Ordering"
|
||||
msgstr "Ordre des pages"
|
||||
@@ -7114,7 +7122,7 @@ msgstr "Ordre des pages"
|
||||
#. * a print job is printed. Possible values are 'now', a specified time,
|
||||
#. * or 'on hold'
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5844
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5817
|
||||
msgctxt "printer option"
|
||||
msgid "Print at"
|
||||
msgstr "Imprimer à"
|
||||
@@ -7122,7 +7130,7 @@ msgstr "Imprimer à"
|
||||
#. Translators: this is the name of the option that allows the user
|
||||
#. * to specify a time when a print job will be printed.
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5855
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5828
|
||||
msgctxt "printer option"
|
||||
msgid "Print at time"
|
||||
msgstr "Imprimer à l’heure"
|
||||
@@ -7132,19 +7140,19 @@ msgstr "Imprimer à l’heure"
|
||||
#. * the width and height in points. E.g: "Custom
|
||||
#. * 230.4x142.9"
|
||||
#.
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5902
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5875
|
||||
#, c-format
|
||||
msgid "Custom %s×%s"
|
||||
msgstr "Personnalisé %s×%s"
|
||||
|
||||
#. TRANSLATORS: this is the ICC color profile to use for this job
|
||||
#: modules/printbackends/gtkprintbackendcups.c:6013
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5986
|
||||
msgctxt "printer option"
|
||||
msgid "Printer Profile"
|
||||
msgstr "Profil d’imprimante"
|
||||
|
||||
#. TRANSLATORS: this is when color profile information is unavailable
|
||||
#: modules/printbackends/gtkprintbackendcups.c:6020
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5993
|
||||
msgctxt "printer option value"
|
||||
msgid "Unavailable"
|
||||
msgstr "Non disponible"
|
||||
@@ -8133,12 +8141,6 @@ msgstr ""
|
||||
"Si vous souhaitez vraiment créer un cache d’icônes ici, utilisez --ignore-"
|
||||
"theme-index.\n"
|
||||
|
||||
#~ msgid "Backend does not support window scaling"
|
||||
#~ msgstr "Le moteur ne gère pas la mise à l’échelle des fenêtres"
|
||||
|
||||
#~ msgid "Window Scaling"
|
||||
#~ msgstr "Mise à l’échelle des fenêtres"
|
||||
|
||||
#~ msgid "Show _Size Column"
|
||||
#~ msgstr "Afficher la colonne _Taille"
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
id = make_gl_texture (context, surface);
|
||||
|
||||
if (gdk_gl_context_has_feature (context, GDK_GL_FEATURE_SYNC))
|
||||
if (gdk_gl_context_has_sync (context))
|
||||
sync = glFenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||
else
|
||||
sync = NULL;
|
||||
|
||||
@@ -339,9 +339,6 @@ main (int argc, char **argv)
|
||||
|
||||
g_option_context_free (context);
|
||||
|
||||
if (!plain && !flip && !rotate && !repeat && !mask && !replay && !clip && !colorflip)
|
||||
plain = TRUE;
|
||||
|
||||
gtk_init ();
|
||||
|
||||
node_file = argv[1];
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
clip {
|
||||
clip: 0 0 12 8;
|
||||
child: color-matrix "node1" {
|
||||
matrix: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 255);
|
||||
child: shadow "node2" {
|
||||
shadows: rgb(255,0,0) 0 0 10;
|
||||
child: texture "node3" {
|
||||
bounds: 0 0 20 20;
|
||||
texture: "texture1" url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAOUlEQVRIiWNk+M/wn4HGgInWFoxa\
|
||||
QjJgwSrKyMBItolYEtLwCa5RS0YtGbVk1JKhaAnjaB0/Mi0BALtiBi9IMFUcAAAAAElFTkSuQmCC\
|
||||
\
|
||||
");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
clip {
|
||||
clip: 0 8 8 12;
|
||||
child: "node1";
|
||||
}
|
||||
clip {
|
||||
clip: 8 12 12 8;
|
||||
child: "node1";
|
||||
}
|
||||
clip {
|
||||
clip: 12 0 8 12;
|
||||
child: "node1";
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 118 B |
@@ -136,7 +136,6 @@ compare_render_tests = [
|
||||
'repeat-scaling',
|
||||
'repeat-texture',
|
||||
'repeating-gradient-scaled',
|
||||
'reuse-of-texture-nested-in-offscreens',
|
||||
'rounded-clip-with-huge-bounds-nogl',
|
||||
'scale-textures-negative-ngl',
|
||||
'scale-up-down',
|
||||
@@ -226,7 +225,6 @@ compare_xfails = {
|
||||
'conic-gradient-with-64-colorstops': ['clipped', 'colorflipped'],
|
||||
'blur-child-bounds-oversize-nogl': ['clipped'], # 6450
|
||||
'rounded-clip-with-huge-bounds-nogl': ['plain','flipped','rotated','repeated','masked','replayed','clipped','colorflipped'], # 6532
|
||||
'big-checkerboard': ['clipped'], # 6444
|
||||
},
|
||||
'vulkan': {
|
||||
'radial-gradient-with-64-colorstops': ['clipped', 'colorflipped'],
|
||||
@@ -235,7 +233,6 @@ compare_xfails = {
|
||||
'repeat-repeats-nested-nogl': ['clipped'], # 6522
|
||||
'repeating-radial-gradient-edge-colors': ['colorflipped'],
|
||||
'rounded-clip-with-huge-bounds-nogl': ['plain','flipped','rotated','repeated','masked','replayed','clipped','colorflipped'], # 6532
|
||||
'big-checkerboard': ['clipped'], # 6444
|
||||
},
|
||||
'gl': {
|
||||
# 6525
|
||||
|
||||
@@ -73,10 +73,9 @@ test_textview_surrounding (void)
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
GtkTextIter start, end;
|
||||
GtkTextIter bound, insert;
|
||||
gboolean ret;
|
||||
char *text;
|
||||
int anchor_pos, cursor_pos;
|
||||
int cursor_pos, selection_bound;
|
||||
|
||||
widget = gtk_text_view_new ();
|
||||
controller = gtk_text_view_get_key_controller (GTK_TEXT_VIEW (widget));
|
||||
@@ -90,12 +89,12 @@ test_textview_surrounding (void)
|
||||
ret = gtk_im_context_get_surrounding_with_selection (context,
|
||||
&text,
|
||||
&cursor_pos,
|
||||
&anchor_pos);
|
||||
&selection_bound);
|
||||
|
||||
g_assert_true (ret);
|
||||
g_assert_cmpstr (text, ==, "abcd\nefgh\nijkl");
|
||||
g_assert_cmpint (cursor_pos, ==, 7);
|
||||
g_assert_cmpint (anchor_pos, ==, 7);
|
||||
g_assert_cmpint (selection_bound, ==, 7);
|
||||
|
||||
g_free (text);
|
||||
|
||||
@@ -123,19 +122,19 @@ test_textview_surrounding (void)
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
|
||||
gtk_text_buffer_set_text (buffer, "ab cd\nef gh\nijkl", -1);
|
||||
gtk_text_buffer_get_iter_at_line_offset (buffer, &bound, 1, 4);
|
||||
gtk_text_buffer_get_iter_at_line_offset (buffer, &insert, 2, 2);
|
||||
gtk_text_buffer_select_range (buffer, &insert, &bound);
|
||||
gtk_text_buffer_get_iter_at_line_offset (buffer, &start, 1, 4);
|
||||
gtk_text_buffer_get_iter_at_line_offset (buffer, &end, 2, 2);
|
||||
gtk_text_buffer_select_range (buffer, &start, &end);
|
||||
|
||||
ret = gtk_im_context_get_surrounding_with_selection (context,
|
||||
&text,
|
||||
&cursor_pos,
|
||||
&anchor_pos);
|
||||
&selection_bound);
|
||||
|
||||
g_assert_true (ret);
|
||||
g_assert_cmpstr (text, ==, "cd\nef gh\nijkl");
|
||||
g_assert_cmpint (anchor_pos, ==, 7);
|
||||
g_assert_cmpint (cursor_pos, ==, 11);
|
||||
g_assert_cmpint (selection_bound, ==, 7);
|
||||
|
||||
g_free (text);
|
||||
|
||||
|
||||
@@ -4,9 +4,6 @@ GTK_BUILDER_TOOL=${GTK_BUILDER_TOOL:-gtk4-builder-tool}
|
||||
TEST_DATA_DIR=${G_TEST_SRCDIR:-.}/validate-data
|
||||
TEST_RESULT_DIR=${TEST_RESULT_DIR:-/tmp}/validate
|
||||
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/10293
|
||||
export LIBGL_ALWAYS_SOFTWARE=true
|
||||
|
||||
mkdir -p "$TEST_RESULT_DIR"
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
Reference in New Issue
Block a user