Compare commits

..

1 Commits

Author SHA1 Message Date
Benjamin Berg
422f6f52b4 ci: Always generate a machine ID
At least the F30 base image does not seem to ship with a machine-id.
This causes tests that require DBus to fail as the dbus daemon cannot be
started.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/967
2019-12-11 16:20:33 +01:00
47 changed files with 1686 additions and 551 deletions

View File

@@ -1,8 +1,8 @@
# Rebuild and push with
#
# cd .gitlab-ci/
# podman build --format docker --no-cache -t registry.gitlab.gnome.org/gnome/mutter/master:v3 .
# podman push registry.gitlab.gnome.org/gnome/mutter/master:v3
# docker build --no-cache -t registry.gitlab.gnome.org/gnome/mutter/master:v3 .
# docker push registry.gitlab.gnome.org/gnome/mutter/master:v3
#
FROM fedora:31
@@ -27,3 +27,7 @@ RUN dnf -y update && dnf -y upgrade && \
dnf remove -y --noautoremove mutter mutter-devel && \
dnf clean all
# Add a machine-id as specified in the freedesktop spec:
# https://www.freedesktop.org/software/systemd/man/machine-id.html
RUN cat /dev/urandom | tr -dc a-f0-9 | head -c32 > /etc/machine-id && echo "" >> /etc/machine-id

65
NEWS
View File

@@ -1,68 +1,3 @@
3.35.3
======
* backends/native: Correct dy value in pinch gesture event [Yariv; !974]
* Upload clipping rectangles in parallel [Daniel; !969]
* More cogl API cleanups [Adam; !978, !977, !973]
* Fix window recording on HiDPI [Pascal; !976]
* Fix top-left pixel being insensitive to clicks [Sebastian; #893]
* Misc. bug fixes and cleanups [Daniel, Adam; !979, !980]
Contributors:
Yariv Barkan, Adam Jackson, Sebastian Keller, Pascal Nowack, Daniel van Vugt
Translators:
Fran Dieguez [gl], Dz Chen [zh_CN]
3.35.2
======
* Don't emit focus event after destruction [Marco; gnome-shell#1704, !860]
* Add a notion of pixel format planes [Niels; !858]
* Replace various Cogl/Clutter types with Graphene [Georges; !458]
* Improve CoglJournal [Georges, Jasper; !402]
* Split pick and paint [Georges; !865]
* Remove deprecated/unused cogl/clutter APIs [Adam; !866, !878, !879, !880,
!885, !900, !902, !904, !896, !913, !922, !883, !903, !921, !933, !819]
* Fix hang when opening not-responding dialog on Xorg [Carlos; !876]
* Allow changing Clutter debug flags at runtime [Georges; !862]
* Fix frozen grabs on Xorg after weeks of inactivity [Jonas; !886]
* Fix triggering popups from stylus devices o wayland [Carlos; #886]
* Fix fallback to GLES2 [Adam; #635]
* Fix buffer age checks on multiple monitors [Carlos; !906]
* Adjust to Sysprof API change [Christian; !908]
* Improve support for (X11) fullscreen games under wayland [Hans; !739]
* Support shadow framebuffers for offscreen rendering [Olivier; !877]
* Fix hang after interacting with desktop icons on X11 [Marco; !909]
* Don't double scale when getting absolute surface coordinates [Xiang; !915]
* Respect NET_WM_TRANSIENT_FOR for override-redirect windows [Marco; !920]
* Kill window effects on destroy [Robert; !924]
* Remove deprecated ClutterTexture [Jonas; !932]
* Use regions instead of bounding box for clipping and culling [Carlos; !867]
* Use partial damage for dma-buf and EGLImage buffers on wayland [Robert; #947]
* Do not stack transients underneath their always-on-top parent [Florian; #587]
* Add explicit paint/pick contexts [Jonas; !935]
* Fix KMS freeze after pageflip fallback [Pekka; !953]
* Fixed crashes [Robert, Carlos, Jonas, Marco, Hans, Tim; !856, !869, !912,
!895, !928, #591, !823, !960]
* Plugged memory leaks [Niels, Robert, Carlos, Marco; !847, !868, !873, #908]
* Misc. bug fixes and cleanups [Niels, Robert, Jonas, Marco, Carlos, Daniel,
Jan, Adam, Cosimo, Florian, Thomas, Georges, Hans, Corentin, Christian,
Benjamin; !853, !822, !451, !854, !816, !857, !859, !734, !844, !851, #876,
!874, !673, !692, !888, !889, !894, !901, !905, !872, !898, !911, !918, !863,
#878, !811, !893, !925, !926, !890, !931, !927, !934, !938, !940, !947, !941,
!929, !949, !952, !871, !955, !956, !958, !907, !965, !964, !966]
Contributors:
Marco Trevisan (Treviño), Jan Alexander Steffens (heftig),
Thomas Hindoe Paaboel Andersen, Benjamin Berg, Cosimo Cecchi, Tim Crawford,
Piotr Drąg, Xiang Fan, Olivier Fourdan, Carlos Garnacho, Hans de Goede,
Niels De Graef, Christian Hergert, Adam Jackson, Robert Mader,
Florian Müllner, Georges Basile Stavracas Neto, Bastien Nocera, Corentin Noël,
Pekka Paalanen, Jasper St. Pierre, Christian Rauch, Daniel van Vugt,
Jonas Ådahl
Translators:
Bruce Cowan [en_GB]
3.35.1
======
* Fix immediate screen blank after releaseing inhibitor [Tim; #573]

View File

@@ -121,12 +121,12 @@ G_DEFINE_TYPE (ClutterBrightnessContrastEffect,
static gboolean
will_have_no_effect (ClutterBrightnessContrastEffect *self)
{
return (G_APPROX_VALUE (self->brightness_red, no_change, FLT_EPSILON) &&
G_APPROX_VALUE (self->brightness_green, no_change, FLT_EPSILON) &&
G_APPROX_VALUE (self->brightness_blue, no_change, FLT_EPSILON) &&
G_APPROX_VALUE (self->contrast_red, no_change, FLT_EPSILON) &&
G_APPROX_VALUE (self->contrast_green, no_change, FLT_EPSILON) &&
G_APPROX_VALUE (self->contrast_blue, no_change, FLT_EPSILON));
return (self->brightness_red == no_change &&
self->brightness_green == no_change &&
self->brightness_blue == no_change &&
self->contrast_red == no_change &&
self->contrast_green == no_change &&
self->contrast_blue == no_change);
}
static gboolean
@@ -497,9 +497,9 @@ clutter_brightness_contrast_effect_set_brightness_full (ClutterBrightnessContras
{
g_return_if_fail (CLUTTER_IS_BRIGHTNESS_CONTRAST_EFFECT (effect));
if (G_APPROX_VALUE (red, effect->brightness_red, FLT_EPSILON) &&
G_APPROX_VALUE (green, effect->brightness_green, FLT_EPSILON) &&
G_APPROX_VALUE (blue, effect->brightness_blue, FLT_EPSILON))
if (red == effect->brightness_red &&
green == effect->brightness_green &&
blue == effect->brightness_blue)
return;
effect->brightness_red = red;
@@ -587,9 +587,9 @@ clutter_brightness_contrast_effect_set_contrast_full (ClutterBrightnessContrastE
{
g_return_if_fail (CLUTTER_IS_BRIGHTNESS_CONTRAST_EFFECT (effect));
if (G_APPROX_VALUE (red, effect->contrast_red, FLT_EPSILON) &&
G_APPROX_VALUE (green, effect->contrast_green, FLT_EPSILON) &&
G_APPROX_VALUE (blue, effect->contrast_blue, FLT_EPSILON))
if (red == effect->contrast_red &&
green == effect->contrast_green &&
blue == effect->contrast_blue)
return;
effect->contrast_red = red;

View File

@@ -118,7 +118,11 @@ clutter_offscreen_effect_set_actor (ClutterActorMeta *meta,
meta_class->set_actor (meta, actor);
/* clear out the previous state */
g_clear_pointer (&priv->offscreen, cogl_object_unref);
if (priv->offscreen != NULL)
{
cogl_object_unref (priv->offscreen);
priv->offscreen = NULL;
}
/* we keep a back pointer here, to avoid going through the ActorMeta */
priv->actor = clutter_actor_meta_get_actor (meta);
@@ -194,8 +198,17 @@ update_fbo (ClutterEffect *effect,
ensure_pipeline_filter_for_scale (self, resource_scale);
}
g_clear_pointer (&priv->texture, cogl_object_unref);
g_clear_pointer (&priv->offscreen, cogl_object_unref);
if (priv->texture != NULL)
{
cogl_object_unref (priv->texture);
priv->texture = NULL;
}
if (priv->offscreen != NULL)
{
cogl_object_unref (priv->offscreen);
priv->offscreen = NULL;
}
priv->texture =
clutter_offscreen_effect_create_texture (self, target_width, target_height);
@@ -474,44 +487,29 @@ clutter_offscreen_effect_paint (ClutterEffect *effect,
*/
if (priv->offscreen == NULL || (flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY))
{
ClutterEffectClass *effect_class = CLUTTER_EFFECT_GET_CLASS (effect);
gboolean pre_paint_succeeded;
pre_paint_succeeded = effect_class->pre_paint (effect, paint_context);
clutter_actor_continue_paint (priv->actor, paint_context);
if (pre_paint_succeeded)
effect_class->post_paint (effect, paint_context);
else
g_clear_pointer (&priv->offscreen, cogl_object_unref);
/* Chain up to the parent paint method which will call the pre and
post paint functions to update the image */
CLUTTER_EFFECT_CLASS (clutter_offscreen_effect_parent_class)->
paint (effect, paint_context, flags);
}
else
clutter_offscreen_effect_paint_texture (self, paint_context);
}
static void
clutter_offscreen_effect_notify (GObject *gobject,
GParamSpec *pspec)
{
ClutterOffscreenEffect *offscreen_effect = CLUTTER_OFFSCREEN_EFFECT (gobject);
ClutterOffscreenEffectPrivate *priv = offscreen_effect->priv;
if (strcmp (pspec->name, "enabled") == 0)
g_clear_pointer (&priv->offscreen, cogl_object_unref);
G_OBJECT_CLASS (clutter_offscreen_effect_parent_class)->notify (gobject, pspec);
}
static void
clutter_offscreen_effect_finalize (GObject *gobject)
{
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (gobject);
ClutterOffscreenEffectPrivate *priv = self->priv;
g_clear_pointer (&priv->offscreen, cogl_object_unref);
g_clear_pointer (&priv->texture, cogl_object_unref);
g_clear_pointer (&priv->target, cogl_object_unref);
if (priv->offscreen)
cogl_object_unref (priv->offscreen);
if (priv->target)
cogl_object_unref (priv->target);
if (priv->texture)
cogl_object_unref (priv->texture);
G_OBJECT_CLASS (clutter_offscreen_effect_parent_class)->finalize (gobject);
}
@@ -533,7 +531,6 @@ clutter_offscreen_effect_class_init (ClutterOffscreenEffectClass *klass)
effect_class->paint = clutter_offscreen_effect_paint;
gobject_class->finalize = clutter_offscreen_effect_finalize;
gobject_class->notify = clutter_offscreen_effect_notify;
}
static void

View File

@@ -443,9 +443,9 @@ is_inside_axis_aligned_rectangle (const graphene_point_t *point,
const graphene_point_t *vertices)
{
float min_x = FLT_MAX;
float max_x = -FLT_MAX;
float max_x = FLT_MIN;
float min_y = FLT_MAX;
float max_y = -FLT_MAX;
float max_y = FLT_MIN;
int i;
for (i = 0; i < 3; i++)

View File

@@ -5,6 +5,12 @@
#include <clutter/clutter-backend.h>
#include <clutter/clutter-stage.h>
#ifdef COGL_HAS_X11_SUPPORT
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#endif
#include "clutter/clutter-stage-window.h"
G_BEGIN_DECLS

View File

@@ -37,6 +37,12 @@
#include <glib.h>
#ifdef COGL_HAS_XLIB_SUPPORT
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#endif
#include "clutter-egl-headers.h"
#include <clutter/clutter.h>

View File

@@ -34,6 +34,10 @@
#include "cogl-context.h"
#include "cogl-flags.h"
#ifdef COGL_HAS_XLIB_SUPPORT
#include "cogl-xlib-private.h"
#endif
#include "cogl-display-private.h"
#include "cogl-clip-stack.h"
#include "cogl-matrix-stack.h"
@@ -269,6 +273,18 @@ struct _CoglContext
CoglSamplerCache *sampler_cache;
/* FIXME: remove these when we remove the last xlib based clutter
* backend. they should be tracked as part of the renderer but e.g.
* the eglx backend doesn't yet have a corresponding Cogl winsys
* and so we wont have a renderer in that case. */
#ifdef COGL_HAS_XLIB_SUPPORT
/* List of callback functions that will be given every Xlib event */
GSList *event_filters;
/* Current top of the XError trap state stack. The actual memory for
these is expected to be allocated on the stack by the caller */
CoglXlibTrapState *trap_state;
#endif
unsigned long winsys_features
[COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_WINSYS_FEATURE_N_FEATURES)];
void *winsys;

View File

@@ -47,6 +47,8 @@
#include "cogl1-context.h"
#include "cogl-gpu-info-private.h"
#include "cogl-gtype-private.h"
#include "driver/gl/cogl-pipeline-opengl-private.h"
#include "driver/gl/cogl-util-gl-private.h"
#include "winsys/cogl-winsys-private.h"
#include <string.h>
@@ -102,12 +104,6 @@ _cogl_context_get_winsys (CoglContext *context)
return context->display->renderer->winsys_vtable;
}
static const CoglDriverVtable *
_cogl_context_get_driver (CoglContext *context)
{
return context->driver_vtable;
}
/* For reference: There was some deliberation over whether to have a
* constructor that could throw an exception but looking at standard
* practices with several high level OO languages including python, C++,
@@ -211,13 +207,6 @@ cogl_context_new (CoglDisplay *display,
return NULL;
}
if (!context->driver_vtable->context_init (context, error))
{
cogl_object_unref (display);
g_free (context);
return NULL;
}
context->attribute_name_states_hash =
g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
context->attribute_name_index_map = NULL;
@@ -254,6 +243,17 @@ cogl_context_new (CoglDisplay *display,
context->flushed_matrix_mode = COGL_MATRIX_MODELVIEW;
context->texture_units =
g_array_new (FALSE, FALSE, sizeof (CoglTextureUnit));
if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_ANY_GL))
{
/* See cogl-pipeline.c for more details about why we leave texture unit 1
* active by default... */
context->active_texture_unit = 1;
GE (context, glActiveTexture (GL_TEXTURE1));
}
context->opaque_color_pipeline = cogl_pipeline_new (context);
context->codegen_header_buffer = g_string_new ("");
@@ -328,6 +328,31 @@ cogl_context_new (CoglDisplay *display,
context->texture_download_pipeline = NULL;
context->blit_texture_pipeline = NULL;
#ifdef HAVE_COGL_GL
if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_ALPHA_TEST))
/* The default for GL_ALPHA_TEST is to always pass which is equivalent to
* the test being disabled therefore we assume that for all drivers there
* will be no performance impact if we always leave the test enabled which
* makes things a bit simpler for us. Under GLES2 the alpha test is
* implemented in the fragment shader so there is no enable for it
*/
GE (context, glEnable (GL_ALPHA_TEST));
if (context->driver == COGL_DRIVER_GL3)
{
GLuint vertex_array;
/* In a forward compatible context, GL 3 doesn't support rendering
* using the default vertex array object. Cogl doesn't use vertex
* array objects yet so for now we just create a dummy array
* object that we will use as our own default object. Eventually
* it could be good to attach the vertex array objects to
* CoglPrimitives */
context->glGenVertexArrays (1, &vertex_array);
context->glBindVertexArray (vertex_array);
}
#endif
context->current_modelview_entry = NULL;
context->current_projection_entry = NULL;
_cogl_matrix_entry_identity_init (&context->identity_entry);
@@ -349,6 +374,16 @@ cogl_context_new (CoglDisplay *display,
context->buffer_map_fallback_array = g_byte_array_new ();
context->buffer_map_fallback_in_use = FALSE;
/* As far as I can tell, GL_POINT_SPRITE doesn't have any effect
unless GL_COORD_REPLACE is enabled for an individual layer.
Therefore it seems like it should be ok to just leave it enabled
all the time instead of having to have a set property on each
pipeline to track whether any layers have point sprite coords
enabled. We don't need to do this for GL3 or GLES2 because point
sprites are handled using a builtin varying in the shader. */
if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_GL_FIXED))
GE (context, glEnable (GL_POINT_SPRITE));
_cogl_list_init (&context->fences);
return context;
@@ -358,7 +393,6 @@ static void
_cogl_context_free (CoglContext *context)
{
const CoglWinsysVtable *winsys = _cogl_context_get_winsys (context);
const CoglDriverVtable *driver = _cogl_context_get_driver (context);
winsys->context_deinit (context);
@@ -430,6 +464,8 @@ _cogl_context_free (CoglContext *context)
_cogl_sampler_cache_free (context->sampler_cache);
_cogl_destroy_texture_units ();
g_ptr_array_free (context->uniform_names, TRUE);
g_hash_table_destroy (context->uniform_name_hash);
@@ -438,8 +474,6 @@ _cogl_context_free (CoglContext *context)
g_byte_array_free (context->buffer_map_fallback_array, TRUE);
driver->context_deinit (context);
cogl_object_unref (context->display);
g_free (context);

View File

@@ -40,12 +40,6 @@ typedef struct _CoglDriverVtable CoglDriverVtable;
struct _CoglDriverVtable
{
gboolean
(* context_init) (CoglContext *context, GError **error);
void
(* context_deinit) (CoglContext *context);
/* TODO: factor this out since this is OpenGL specific and
* so can be ignored by non-OpenGL drivers. */
gboolean

View File

@@ -41,6 +41,15 @@
#include "cogl-gl-header.h"
#include "cogl-clip-stack.h"
#ifdef COGL_HAS_XLIB_SUPPORT
#include <X11/Xlib.h>
#endif
#ifdef COGL_HAS_GLX_SUPPORT
#include <GL/glx.h>
#include <GL/glxext.h>
#endif
typedef enum _CoglFramebufferType {
COGL_FRAMEBUFFER_TYPE_ONSCREEN,
COGL_FRAMEBUFFER_TYPE_OFFSCREEN

View File

@@ -76,7 +76,7 @@ G_BEGIN_DECLS
* vertices multiple times.
*
* |[
* CoglVertexP2 quad_vertices[] = {
* CoglVertex2f quad_vertices[] = {
* {x0, y0}, //0 = top left
* {x1, y1}, //1 = bottom left
* {x2, y2}, //2 = bottom right

View File

@@ -42,6 +42,10 @@
#include "cogl-poll-private.h"
#include "cogl-gtype-private.h"
#ifdef COGL_HAS_X11_SUPPORT
#include "cogl-xlib-renderer.h"
#endif
static void _cogl_onscreen_free (CoglOnscreen *onscreen);
COGL_OBJECT_DEFINE_WITH_CODE_GTYPE (Onscreen, onscreen,

View File

@@ -193,9 +193,27 @@ dump_pipeline_cb (CoglNode *node, void *user_data)
if (pipeline->differences & COGL_PIPELINE_STATE_BLEND)
{
const char *blend_enable_name;
changes = TRUE;
switch (pipeline->blend_enable)
{
case COGL_PIPELINE_BLEND_ENABLE_AUTOMATIC:
blend_enable_name = "AUTO";
break;
case COGL_PIPELINE_BLEND_ENABLE_ENABLED:
blend_enable_name = "ENABLED";
break;
case COGL_PIPELINE_BLEND_ENABLE_DISABLED:
blend_enable_name = "DISABLED";
break;
default:
blend_enable_name = "UNKNOWN";
}
g_string_append_printf (changes_label,
"\\lblend\\n");
"\\lblend=%s\\n",
blend_enable_name);
}
if (pipeline->differences & COGL_PIPELINE_STATE_LAYERS)

View File

@@ -62,6 +62,7 @@ typedef enum
{
/* sparse state */
COGL_PIPELINE_STATE_COLOR_INDEX,
COGL_PIPELINE_STATE_BLEND_ENABLE_INDEX,
COGL_PIPELINE_STATE_LAYERS_INDEX,
COGL_PIPELINE_STATE_ALPHA_FUNC_INDEX,
COGL_PIPELINE_STATE_ALPHA_FUNC_REFERENCE_INDEX,
@@ -98,6 +99,8 @@ typedef enum _CoglPipelineState
{
COGL_PIPELINE_STATE_COLOR =
1L<<COGL_PIPELINE_STATE_COLOR_INDEX,
COGL_PIPELINE_STATE_BLEND_ENABLE =
1L<<COGL_PIPELINE_STATE_BLEND_ENABLE_INDEX,
COGL_PIPELINE_STATE_LAYERS =
1L<<COGL_PIPELINE_STATE_LAYERS_INDEX,
@@ -144,6 +147,7 @@ typedef enum _CoglPipelineState
#define COGL_PIPELINE_STATE_AFFECTS_BLENDING \
(COGL_PIPELINE_STATE_COLOR | \
COGL_PIPELINE_STATE_BLEND_ENABLE | \
COGL_PIPELINE_STATE_LAYERS | \
COGL_PIPELINE_STATE_BLEND | \
COGL_PIPELINE_STATE_USER_SHADER | \
@@ -180,6 +184,15 @@ typedef struct
float alpha_func_reference;
} CoglPipelineAlphaFuncState;
typedef enum _CoglPipelineBlendEnable
{
/* XXX: we want to detect users mistakenly using TRUE or FALSE
* so start the enum at 2. */
COGL_PIPELINE_BLEND_ENABLE_ENABLED = 2,
COGL_PIPELINE_BLEND_ENABLE_DISABLED,
COGL_PIPELINE_BLEND_ENABLE_AUTOMATIC
} CoglPipelineBlendEnable;
typedef struct
{
/* Determines how this pipeline is blended with other primitives */
@@ -354,6 +367,13 @@ struct _CoglPipeline
/* Determines if pipeline->big_state is valid */
unsigned int has_big_state:1;
/* By default blending is enabled automatically depending on the
* unlit color, the lighting colors or the texture format. The user
* can override this to explicitly enable or disable blending.
*
* This is a sparse property */
unsigned int blend_enable:3;
/* There are many factors that can determine if we need to enable
* blending, this holds our final decision */
unsigned int real_blend_enable:1;
@@ -754,6 +774,13 @@ void
_cogl_pipeline_apply_overrides (CoglPipeline *pipeline,
CoglPipelineFlushOptions *options);
CoglPipelineBlendEnable
_cogl_pipeline_get_blend_enabled (CoglPipeline *pipeline);
void
_cogl_pipeline_set_blend_enabled (CoglPipeline *pipeline,
CoglPipelineBlendEnable enable);
#ifdef COGL_DEBUG_ENABLED
void
_cogl_pipeline_set_static_breadcrumb (CoglPipeline *pipeline,

View File

@@ -108,6 +108,10 @@ void
_cogl_pipeline_hash_color_state (CoglPipeline *authority,
CoglPipelineHashState *state);
void
_cogl_pipeline_hash_blend_enable_state (CoglPipeline *authority,
CoglPipelineHashState *state);
void
_cogl_pipeline_hash_layers_state (CoglPipeline *authority,
CoglPipelineHashState *state);

View File

@@ -407,6 +407,56 @@ cogl_pipeline_set_color4f (CoglPipeline *pipeline,
cogl_pipeline_set_color (pipeline, &color);
}
CoglPipelineBlendEnable
_cogl_pipeline_get_blend_enabled (CoglPipeline *pipeline)
{
CoglPipeline *authority;
g_return_val_if_fail (cogl_is_pipeline (pipeline), FALSE);
authority =
_cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_BLEND_ENABLE);
return authority->blend_enable;
}
static gboolean
_cogl_pipeline_blend_enable_equal (CoglPipeline *authority0,
CoglPipeline *authority1)
{
return authority0->blend_enable == authority1->blend_enable ? TRUE : FALSE;
}
void
_cogl_pipeline_set_blend_enabled (CoglPipeline *pipeline,
CoglPipelineBlendEnable enable)
{
CoglPipelineState state = COGL_PIPELINE_STATE_BLEND_ENABLE;
CoglPipeline *authority;
g_return_if_fail (cogl_is_pipeline (pipeline));
g_return_if_fail (enable > 1 &&
"don't pass TRUE or FALSE to _set_blend_enabled!");
authority = _cogl_pipeline_get_authority (pipeline, state);
if (authority->blend_enable == enable)
return;
/* - Flush journal primitives referencing the current state.
* - Make sure the pipeline has no dependants so it may be modified.
* - If the pipeline isn't currently an authority for the state being
* changed, then initialize that state from the current authority.
*/
_cogl_pipeline_pre_change_notify (pipeline, state, NULL, FALSE);
pipeline->blend_enable = enable;
_cogl_pipeline_update_authority (pipeline, authority, state,
_cogl_pipeline_blend_enable_equal);
pipeline->dirty_real_blend_enable = TRUE;
}
static void
_cogl_pipeline_set_alpha_test_function (CoglPipeline *pipeline,
CoglPipelineAlphaFunc alpha_func)
@@ -1329,6 +1379,14 @@ _cogl_pipeline_hash_color_state (CoglPipeline *authority,
_COGL_COLOR_DATA_SIZE);
}
void
_cogl_pipeline_hash_blend_enable_state (CoglPipeline *authority,
CoglPipelineHashState *state)
{
uint8_t blend_enable = authority->blend_enable;
state->hash = _cogl_util_one_at_a_time_hash (state->hash, &blend_enable, 1);
}
void
_cogl_pipeline_hash_alpha_func_state (CoglPipeline *authority,
CoglPipelineHashState *state)

View File

@@ -104,6 +104,7 @@ _cogl_pipeline_init_default_pipeline (void)
pipeline->real_blend_enable = FALSE;
pipeline->blend_enable = COGL_PIPELINE_BLEND_ENABLE_AUTOMATIC;
pipeline->layer_differences = NULL;
pipeline->n_layers = 0;
@@ -720,12 +721,24 @@ _cogl_pipeline_needs_blending_enabled (CoglPipeline *pipeline,
const CoglColor *override_color,
gboolean unknown_color_alpha)
{
CoglPipeline *enable_authority;
CoglPipeline *blend_authority;
CoglPipelineBlendState *blend_state;
CoglPipelineBlendEnable enabled;
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_BLENDING)))
return FALSE;
/* We unconditionally check the _BLEND_ENABLE state first because
* all the other changes are irrelevent if blend_enable != _AUTOMATIC
*/
enable_authority =
_cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_BLEND_ENABLE);
enabled = enable_authority->blend_enable;
if (enabled != COGL_PIPELINE_BLEND_ENABLE_AUTOMATIC)
return enabled == COGL_PIPELINE_BLEND_ENABLE_ENABLED ? TRUE : FALSE;
blend_authority =
_cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_BLEND);
@@ -813,6 +826,9 @@ _cogl_pipeline_copy_differences (CoglPipeline *dest,
if (differences & COGL_PIPELINE_STATE_COLOR)
dest->color = src->color;
if (differences & COGL_PIPELINE_STATE_BLEND_ENABLE)
dest->blend_enable = src->blend_enable;
if (differences & COGL_PIPELINE_STATE_LAYERS)
{
GList *l;
@@ -961,6 +977,7 @@ _cogl_pipeline_init_multi_property_sparse_state (CoglPipeline *pipeline,
/* XXX: avoid using a default: label so we get a warning if we
* don't explicitly handle a newly defined state-group here. */
case COGL_PIPELINE_STATE_COLOR:
case COGL_PIPELINE_STATE_BLEND_ENABLE:
case COGL_PIPELINE_STATE_ALPHA_FUNC:
case COGL_PIPELINE_STATE_ALPHA_FUNC_REFERENCE:
case COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE:
@@ -2153,6 +2170,7 @@ _cogl_pipeline_equal (CoglPipeline *pipeline0,
break;
}
case COGL_PIPELINE_STATE_BLEND_ENABLE_INDEX:
case COGL_PIPELINE_STATE_REAL_BLEND_ENABLE_INDEX:
case COGL_PIPELINE_STATE_COUNT:
g_warn_if_reached ();
@@ -2496,6 +2514,8 @@ _cogl_pipeline_init_state_hash_functions (void)
{
state_hash_functions[COGL_PIPELINE_STATE_COLOR_INDEX] =
_cogl_pipeline_hash_color_state;
state_hash_functions[COGL_PIPELINE_STATE_BLEND_ENABLE_INDEX] =
_cogl_pipeline_hash_blend_enable_state;
state_hash_functions[COGL_PIPELINE_STATE_LAYERS_INDEX] =
_cogl_pipeline_hash_layers_state;
state_hash_functions[COGL_PIPELINE_STATE_ALPHA_FUNC_INDEX] =
@@ -2525,7 +2545,7 @@ _cogl_pipeline_init_state_hash_functions (void)
{
/* So we get a big error if we forget to update this code! */
_COGL_STATIC_ASSERT (COGL_PIPELINE_STATE_SPARSE_COUNT == 14,
_COGL_STATIC_ASSERT (COGL_PIPELINE_STATE_SPARSE_COUNT == 15,
"Make sure to install a hash function for "
"newly added pipeline state and update assert "
"in _cogl_pipeline_init_state_hash_functions");

View File

@@ -47,13 +47,6 @@ _cogl_rectangle_immediate (CoglFramebuffer *framebuffer,
float x_2,
float y_2);
void
cogl_2d_primitives_immediate (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
CoglVerticesMode mode,
const CoglVertexP2 *vertices,
unsigned int n_vertices);
typedef struct _CoglMultiTexturedRect
{
const float *position; /* x0,y0,x1,y1 */

View File

@@ -708,31 +708,42 @@ _cogl_framebuffer_draw_multitextured_rectangles (
}
void
cogl_2d_primitives_immediate (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
CoglVerticesMode mode,
const CoglVertexP2 *vertices,
unsigned int n_vertices)
_cogl_rectangle_immediate (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
float x_1,
float y_1,
float x_2,
float y_2)
{
/* Draw a rectangle using the vertex array API to avoid going
through the journal. This should only be used in cases where the
code might be called while the journal is already being flushed
such as when flushing the clip state */
CoglContext *ctx = framebuffer->context;
float vertices[8] =
{
x_1, y_1,
x_1, y_2,
x_2, y_1,
x_2, y_2
};
CoglAttributeBuffer *attribute_buffer;
CoglAttribute *attributes[1];
size_t vertices_size = sizeof (CoglVertexP2) * n_vertices;
attribute_buffer =
cogl_attribute_buffer_new (ctx, vertices_size, vertices);
cogl_attribute_buffer_new (ctx, sizeof (vertices), vertices);
attributes[0] = cogl_attribute_new (attribute_buffer,
"cogl_position_in",
sizeof (CoglVertexP2), /* stride */
sizeof (float) * 2, /* stride */
0, /* offset */
2, /* n_components */
COGL_ATTRIBUTE_TYPE_FLOAT);
_cogl_framebuffer_draw_attributes (framebuffer,
pipeline,
mode,
COGL_VERTICES_MODE_TRIANGLE_STRIP,
0, /* first_index */
n_vertices,
4, /* n_vertices */
attributes,
1,
COGL_DRAW_SKIP_JOURNAL_FLUSH |
@@ -743,26 +754,3 @@ cogl_2d_primitives_immediate (CoglFramebuffer *framebuffer,
cogl_object_unref (attributes[0]);
cogl_object_unref (attribute_buffer);
}
void
_cogl_rectangle_immediate (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
float x_1,
float y_1,
float x_2,
float y_2)
{
CoglVertexP2 vertices[4] =
{
{x_1, y_1},
{x_1, y_2},
{x_2, y_1},
{x_2, y_2}
};
cogl_2d_primitives_immediate (framebuffer,
pipeline,
COGL_VERTICES_MODE_TRIANGLE_STRIP,
vertices,
4);
}

View File

@@ -64,10 +64,14 @@ typedef enum
* is first allocated or when it is shown or resized */
COGL_PRIVATE_FEATURE_DIRTY_EVENTS,
COGL_PRIVATE_FEATURE_ENABLE_PROGRAM_POINT_SIZE,
/* This feature allows for explicitly selecting a GL-based backend,
* as opposed to nop or (in the future) Vulkan.
*/
/* These features let us avoid conditioning code based on the exact
* driver being used and instead check for broad opengl feature
* sets that can be shared by several GL apis */
COGL_PRIVATE_FEATURE_ANY_GL,
COGL_PRIVATE_FEATURE_GL_FIXED,
COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
COGL_PRIVATE_FEATURE_GL_EMBEDDED,
COGL_PRIVATE_FEATURE_GL_WEB,
COGL_N_PRIVATE_FEATURES
} CoglPrivateFeature;

View File

@@ -40,6 +40,10 @@
#include "cogl-closure-list-private.h"
#include "winsys/cogl-winsys-private.h"
#ifdef COGL_HAS_XLIB_SUPPORT
#include <X11/Xlib.h>
#endif
typedef const CoglWinsysVtable *(*CoglCustomWinsysVtableGetter) (CoglRenderer *renderer);
struct _CoglRenderer

View File

@@ -91,6 +91,8 @@ static CoglDriverDescription _cogl_drivers[] =
COGL_DRIVER_GL,
"gl",
{ COGL_PRIVATE_FEATURE_ANY_GL,
COGL_PRIVATE_FEATURE_GL_FIXED,
COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
-1 },
&_cogl_driver_gl,
&_cogl_texture_driver_gl,
@@ -100,6 +102,7 @@ static CoglDriverDescription _cogl_drivers[] =
COGL_DRIVER_GL3,
"gl3",
{ COGL_PRIVATE_FEATURE_ANY_GL,
COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
-1 },
&_cogl_driver_gl,
&_cogl_texture_driver_gl,
@@ -111,6 +114,8 @@ static CoglDriverDescription _cogl_drivers[] =
COGL_DRIVER_GLES2,
"gles2",
{ COGL_PRIVATE_FEATURE_ANY_GL,
COGL_PRIVATE_FEATURE_GL_EMBEDDED,
COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
-1 },
&_cogl_driver_gles,
&_cogl_texture_driver_gles,

View File

@@ -59,7 +59,8 @@ toggle_builtin_attribute_enabled_cb (int bit_num, void *user_data)
ForeachChangedBitState *state = user_data;
CoglContext *context = state->context;
g_return_val_if_fail (context->driver == COGL_DRIVER_GL,
g_return_val_if_fail (_cogl_has_private_feature
(context, COGL_PRIVATE_FEATURE_GL_FIXED),
FALSE);
#ifdef HAVE_COGL_GL
@@ -97,7 +98,8 @@ toggle_texcood_attribute_enabled_cb (int bit_num, void *user_data)
ForeachChangedBitState *state = user_data;
CoglContext *context = state->context;
g_return_val_if_fail (context->driver == COGL_DRIVER_GL,
g_return_val_if_fail (_cogl_has_private_feature
(context, COGL_PRIVATE_FEATURE_GL_FIXED),
FALSE);
#ifdef HAVE_COGL_GL

View File

@@ -124,7 +124,6 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
CoglMatrix matrix;
int num_rectangles = cairo_region_num_rectangles (region);
int i;
CoglVertexP2 *vertices;
/* NB: This can be called while flushing the journal so we need
* to be very conservative with what state we change.
@@ -168,50 +167,31 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
GE( ctx, glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE) );
}
vertices = g_alloca (sizeof (CoglVertexP2) * num_rectangles * 6);
for (i = 0; i < num_rectangles; i++)
{
cairo_rectangle_int_t rect;
float x1, y1, z1, w1;
float x2, y2, z2, w2;
CoglVertexP2 *v = vertices + i * 6;
float tl[4], br[4];
cairo_region_get_rectangle (region, i, &rect);
x1 = rect.x;
y1 = rect.y;
z1 = 0.f;
w1 = 1.f;
tl[0] = rect.x;
tl[1] = rect.y;
tl[2] = 0.;
tl[3] = 1.;
x2 = rect.x + rect.width;
y2 = rect.y + rect.height;
z2 = 0.f;
w2 = 1.f;
br[0] = rect.x + rect.width;
br[1] = rect.y + rect.height;
br[2] = 0.;
br[3] = 1.;
cogl_matrix_transform_point (&matrix, &x1, &y1, &z1, &w1);
cogl_matrix_transform_point (&matrix, &x2, &y2, &z2, &w2);
cogl_matrix_transform_point (&matrix, &tl[0], &tl[1], &tl[2], &tl[3]);
cogl_matrix_transform_point (&matrix, &br[0], &br[1], &br[2], &br[3]);
v[0].x = x1;
v[0].y = y1;
v[1].x = x1;
v[1].y = y2;
v[2].x = x2;
v[2].y = y1;
v[3].x = x1;
v[3].y = y2;
v[4].x = x2;
v[4].y = y2;
v[5].x = x2;
v[5].y = y1;
_cogl_rectangle_immediate (framebuffer,
ctx->stencil_pipeline,
tl[0], tl[1], br[0], br[1]);
}
cogl_2d_primitives_immediate (framebuffer,
ctx->stencil_pipeline,
COGL_VERTICES_MODE_TRIANGLES,
vertices,
6 * num_rectangles);
if (merge)
{
/* Subtract one from all pixels in the stencil buffer so that

View File

@@ -106,9 +106,6 @@
#ifndef GL_PACK_INVERT_MESA
#define GL_PACK_INVERT_MESA 0x8758
#endif
#ifndef GL_PACK_REVERSE_ROW_ORDER_ANGLE
#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
#endif
#ifndef GL_BACK_LEFT
#define GL_BACK_LEFT 0x0402
#endif
@@ -1193,7 +1190,6 @@ _cogl_framebuffer_gl_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
GLenum gl_intformat;
GLenum gl_format;
GLenum gl_type;
GLenum gl_pack_enum = GL_FALSE;
gboolean pack_invert_set;
int status = FALSE;
@@ -1224,12 +1220,7 @@ _cogl_framebuffer_gl_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
(source & COGL_READ_PIXELS_NO_FLIP) == 0 &&
!cogl_is_offscreen (framebuffer))
{
if (ctx->driver == COGL_DRIVER_GLES2)
gl_pack_enum = GL_PACK_REVERSE_ROW_ORDER_ANGLE;
else
gl_pack_enum = GL_PACK_INVERT_MESA;
GE (ctx, glPixelStorei (gl_pack_enum, TRUE));
GE (ctx, glPixelStorei (GL_PACK_INVERT_MESA, TRUE));
pack_invert_set = TRUE;
}
else
@@ -1423,7 +1414,7 @@ EXIT:
* to interfere with other Cogl components so all other code can assume that
* we leave the pack_invert state off. */
if (pack_invert_set)
GE (ctx, glPixelStorei (gl_pack_enum, FALSE));
GE (ctx, glPixelStorei (GL_PACK_INVERT_MESA, FALSE));
return status;
}

View File

@@ -127,7 +127,7 @@ CoglTextureUnit *
_cogl_get_texture_unit (int index_);
void
_cogl_destroy_texture_units (CoglContext *ctx);
_cogl_destroy_texture_units (void);
void
_cogl_set_active_texture_unit (int unit_index);

View File

@@ -116,10 +116,12 @@ _cogl_get_texture_unit (int index_)
}
void
_cogl_destroy_texture_units (CoglContext *ctx)
_cogl_destroy_texture_units (void)
{
int i;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
for (i = 0; i < ctx->texture_units->len; i++)
{
CoglTextureUnit *unit =
@@ -307,7 +309,7 @@ flush_depth_state (CoglContext *ctx,
if ((ctx->depth_range_near_cache != depth_state->range_near ||
ctx->depth_range_far_cache != depth_state->range_far))
{
if (ctx->driver == COGL_DRIVER_GLES2)
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
GE (ctx, glDepthRangef (depth_state->range_near,
depth_state->range_far));
else
@@ -360,7 +362,8 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state (
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
/* On GLES2 we'll flush the color later */
if (ctx->driver == COGL_DRIVER_GL && !with_color_attrib)
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED) &&
!with_color_attrib)
{
if ((pipelines_difference & COGL_PIPELINE_STATE_COLOR) ||
/* Assume if we were previously told to skip the color, then
@@ -535,7 +538,7 @@ get_max_activateable_texture_units (void)
int i;
#ifdef HAVE_COGL_GL
if (ctx->driver != COGL_DRIVER_GLES2)
if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
{
/* GL_MAX_TEXTURE_COORDS defines the number of texture coordinates
* that can be uploaded (but doesn't necessarily relate to how many
@@ -548,7 +551,8 @@ get_max_activateable_texture_units (void)
#endif /* HAVE_COGL_GL */
#ifdef HAVE_COGL_GLES2
if (ctx->driver == COGL_DRIVER_GLES2)
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED) &&
_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE))
{
GE (ctx, glGetIntegerv (GL_MAX_VERTEX_ATTRIBS, values + n_values));
/* Two of the vertex attribs need to be used for the position
@@ -561,7 +565,7 @@ get_max_activateable_texture_units (void)
#endif
#ifdef HAVE_COGL_GL
if (ctx->driver == COGL_DRIVER_GL)
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED))
{
/* GL_MAX_TEXTURE_UNITS defines the number of units that are
usable from the fixed function pipeline, therefore it isn't
@@ -693,7 +697,7 @@ flush_layers_common_gl_state_cb (CoglPipelineLayer *layer, void *user_data)
* glsl progend.
*/
#ifdef HAVE_COGL_GL
if (ctx->driver == COGL_DRIVER_GL &&
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED) &&
(layers_difference & COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS))
{
CoglPipelineState change = COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS;

View File

@@ -76,13 +76,6 @@ _cogl_gl_error_to_string (GLenum error_code);
#endif /* COGL_GL_DEBUG */
gboolean
_cogl_driver_gl_context_init (CoglContext *context,
GError **error);
void
_cogl_driver_gl_context_deinit (CoglContext *context);
GLenum
_cogl_gl_util_get_error (CoglContext *ctx);

View File

@@ -42,61 +42,6 @@
#include "driver/gl/cogl-attribute-gl-private.h"
#include "driver/gl/cogl-clip-stack-gl-private.h"
#include "driver/gl/cogl-buffer-gl-private.h"
#include "driver/gl/cogl-pipeline-opengl-private.h"
gboolean
_cogl_driver_gl_context_init (CoglContext *context,
GError **error)
{
context->texture_units =
g_array_new (FALSE, FALSE, sizeof (CoglTextureUnit));
/* See cogl-pipeline.c for more details about why we leave texture unit 1
* active by default... */
context->active_texture_unit = 1;
GE (context, glActiveTexture (GL_TEXTURE1));
if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_ALPHA_TEST))
/* The default for GL_ALPHA_TEST is to always pass which is equivalent to
* the test being disabled therefore we assume that for all drivers there
* will be no performance impact if we always leave the test enabled which
* makes things a bit simpler for us. Under GLES2 the alpha test is
* implemented in the fragment shader so there is no enable for it
*/
GE (context, glEnable (GL_ALPHA_TEST));
if ((context->driver == COGL_DRIVER_GL3))
{
GLuint vertex_array;
/* In a forward compatible context, GL 3 doesn't support rendering
* using the default vertex array object. Cogl doesn't use vertex
* array objects yet so for now we just create a dummy array
* object that we will use as our own default object. Eventually
* it could be good to attach the vertex array objects to
* CoglPrimitives */
context->glGenVertexArrays (1, &vertex_array);
context->glBindVertexArray (vertex_array);
}
/* As far as I can tell, GL_POINT_SPRITE doesn't have any effect
unless GL_COORD_REPLACE is enabled for an individual layer.
Therefore it seems like it should be ok to just leave it enabled
all the time instead of having to have a set property on each
pipeline to track whether any layers have point sprite coords
enabled. We don't need to do this for GL3 or GLES2 because point
sprites are handled using a builtin varying in the shader. */
if (context->driver == COGL_DRIVER_GL)
GE (context, glEnable (GL_POINT_SPRITE));
return TRUE;
}
void
_cogl_driver_gl_context_deinit (CoglContext *context)
{
_cogl_destroy_texture_units (context);
}
static gboolean
_cogl_driver_pixel_format_from_gl_internal (CoglContext *context,
@@ -504,6 +449,7 @@ _cogl_driver_update_features (CoglContext *ctx,
if (ctx->driver == COGL_DRIVER_GL)
{
/* Features which are not available in GL 3 */
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_GL_FIXED, TRUE);
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ALPHA_TEST, TRUE);
COGL_FLAGS_SET (private_features,
COGL_PRIVATE_FEATURE_ALPHA_TEXTURES, TRUE);
@@ -553,8 +499,6 @@ _cogl_driver_update_features (CoglContext *ctx,
const CoglDriverVtable
_cogl_driver_gl =
{
_cogl_driver_gl_context_init,
_cogl_driver_gl_context_deinit,
_cogl_driver_pixel_format_from_gl_internal,
_cogl_driver_pixel_format_to_gl,
_cogl_driver_update_features,

View File

@@ -300,10 +300,6 @@ _cogl_driver_update_features (CoglContext *context,
gl_minor,
gl_extensions);
if (_cogl_check_extension ("GL_ANGLE_pack_reverse_row_order", gl_extensions))
COGL_FLAGS_SET (private_features,
COGL_PRIVATE_FEATURE_MESA_PACK_INVERT, TRUE);
/* Note GLES 2 core doesn't support mipmaps for npot textures or
* repeat modes other than CLAMP_TO_EDGE. */
@@ -382,8 +378,6 @@ _cogl_driver_texture_2d_is_get_data_supported (CoglTexture2D *tex_2d)
const CoglDriverVtable
_cogl_driver_gles =
{
_cogl_driver_gl_context_init,
_cogl_driver_gl_context_deinit,
_cogl_driver_pixel_format_from_gl_internal,
_cogl_driver_pixel_format_to_gl,
_cogl_driver_update_features,

View File

@@ -52,23 +52,9 @@ _cogl_driver_update_features (CoglContext *ctx,
return TRUE;
}
static gboolean
_cogl_driver_nop_context_init( CoglContext *context,
GError **error)
{
return TRUE;
}
static void
_cogl_driver_nop_context_deinit (CoglContext *context)
{
}
const CoglDriverVtable
_cogl_driver_nop =
{
_cogl_driver_nop_context_init,
_cogl_driver_nop_context_deinit,
NULL, /* pixel_format_from_gl_internal */
NULL, /* pixel_format_to_gl */
_cogl_driver_update_features,

View File

@@ -376,11 +376,11 @@ endif
if have_glx
cogl_nonintrospected_headers += [
'winsys/cogl-glx.h',
'cogl-glx.h',
]
cogl_sources += [
'winsys/cogl-glx-display-private.h',
'winsys/cogl-glx-renderer-private.h',
'cogl-glx-display-private.h',
'cogl-glx-renderer-private.h',
'winsys/cogl-winsys-glx-feature-functions.h',
'winsys/cogl-winsys-glx-private.h',
'winsys/cogl-winsys-glx.c',

View File

@@ -1,5 +1,5 @@
project('mutter', 'c',
version: '3.35.3',
version: '3.35.1',
meson_version: '>= 0.50.0',
license: 'GPLv2+'
)

1277
po/gl.po

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
# Simplified Chinese translation of mutter.
# Copyright (C) 2012-2019 mutter's COPYRIGHT HOLDER
# Copyright (C) 2012-2018 mutter's COPYRIGHT HOLDER
# This file is distributed under the same license as the mutter package.
# Sun G11n <gnome_int_l10n@ireland.sun.com>, 2002.
# He Qiangqiang <carton@linux.net.cn>, 2002
@@ -13,15 +13,14 @@
# Tong Hui <tonghuix@gmail.com>, 2014.
# Mandy Wang <wangmychn@gmail.com>, 2017.
# Mingcong Bai <jeffbai@aosc.xyz>, 2017.
# liushuyu <liushuyu011@gmail.com>, 2018.
# Dingzhong Chen <wsxy162@gmail.com>, 2017-2019.
# Dingzhong Chen <wsxy162@gmail.com>, 2017, 2018.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-08-31 12:39+0000\n"
"PO-Revision-Date: 2019-09-11 00:10+0800\n"
"POT-Creation-Date: 2018-02-09 13:01+0000\n"
"PO-Revision-Date: 2018-02-16 22:22+0800\n"
"Last-Translator: Dingzhong Chen <wsxy162@gmail.com>\n"
"Language-Team: Chinese (China) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
@@ -29,7 +28,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Gtranslator 3.32.1\n"
"X-Generator: Gtranslator 2.91.7\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -366,7 +365,7 @@ msgstr "自动最大化接近显示器大小的窗口"
msgid ""
"If enabled, new windows that are initially the size of the monitor "
"automatically get maximized."
msgstr "如果启用,初始时为显示器大小的新窗口将自动最大化"
msgstr "如果启用,初始时为显示器大小的新窗口将自动最大化"
#: data/org.gnome.mutter.gschema.xml.in:98
msgid "Place new windows in the center"
@@ -380,7 +379,7 @@ msgstr "为 true 时,新窗口将总是置于此显示器已激活屏幕的中
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "开启实验性功能"
msgstr "开启实验性特性"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
@@ -391,40 +390,34 @@ msgid ""
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart. • “rt-scheduler” — makes "
"mutter request a low priority real-time scheduling. The executable or user "
"must have CAP_SYS_NICE. Requires a restart. • “autostart-xwayland” — "
"initializes Xwayland lazily if there are X11 clients. Requires restart."
"manage HiDPI monitors. Does not require a restart. • “remote-desktop” — "
"enables remote desktop support. To support remote desktop with screen "
"sharing, “screen-cast” must also be enabled. • “screen-cast” — enables "
"screen cast support."
msgstr ""
"要启用实验性功能,请将如下功能关键字添加到列表中。功能是否要重启合成器取决"
"功能本身。任何实验性功能都不一定仍旧可用和可配置。请不要期望此设置中的实验性"
"功能将来有所保障。当前可用的关键字:•“scale-monitor-framebuffer”——让 Mutter "
"默认基于逻辑像素座标排布多屏幕,并同时缩放监视器帧缓冲器而不是窗口内容,以便"
"管理 HiDPI 监视器。该功能不需要重启来生效。•“rt-scheduler”——让 Mutter 请求低"
"优先级的实时调度。可执行文件或用户必须有 CAP_SYS_NICE。需要重启。•“autostart-"
"xwayland”——如果存在 X11 客户端则延迟初始化 Xwayland。需要重启。"
"要启用实验性特性,请将如下特性关键字添加到列表中。特性是否要重启合成器取决"
"于特性本身。实验性特性不需启用即可配置和使用。请不要将实验性特性作为未来保障"
"的基础。当前可用的关键字:• “monitor-config-manager” — 使用新的监视器配置系"
"统,用于替代老的系统。启用此特性将打开一个上级配置 API 以用于配置应用程序,并"
"可提供基于每屏幕的逻辑缩放功能。• “scale-monitor-framebuffer” — 让 Mutter "
"认基于像素座标排布多屏幕,并同时缩放监视器帧缓冲器而不是窗口内容,以便管理 "
"HiDPI 监视器。该特性不需要重启来生效。• “remote-desktop” — 启用远程桌面支持。"
"要支持远程桌面共享还需要设置“screen-cast”。 • “screen-cast” — 启用屏幕广播"
"支持。"
#: data/org.gnome.mutter.gschema.xml.in:134
msgid "Modifier to use to locate the pointer"
msgstr "用来定位指针的修饰键"
#: data/org.gnome.mutter.gschema.xml.in:135
msgid "This key will initiate the “locate pointer” action."
msgstr "此按键将启动“定位指针”操作。"
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:145
msgid "Select window from tab popup"
msgstr "从 Tab 轮换弹出界面选择窗口"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:150
msgid "Cancel tab popup"
msgstr "取消 Tab 轮换弹出"
#: data/org.gnome.mutter.gschema.xml.in:165
#: data/org.gnome.mutter.gschema.xml.in:155
msgid "Switch monitor configurations"
msgstr "切换显示器配置"
#: data/org.gnome.mutter.gschema.xml.in:170
#: data/org.gnome.mutter.gschema.xml.in:160
msgid "Rotates the built-in monitor configuration"
msgstr "旋转内置显示器配置"
@@ -481,33 +474,26 @@ msgid "Re-enable shortcuts"
msgstr "重新启用快捷键"
#: data/org.gnome.mutter.wayland.gschema.xml.in:64
msgid "Allow X11 grabs to lock keyboard focus with Xwayland"
msgstr "允许 X11 捕获以锁定 Xwayland 的键盘焦点"
msgid "Allow grabs with Xwayland"
msgstr "允许 Xwayland 捕获"
#: data/org.gnome.mutter.wayland.gschema.xml.in:65
msgid ""
"Allow all keyboard events to be routed to X11 “override redirect” windows "
"with a grab when running in Xwayland. This option is to support X11 clients "
"which map an “override redirect” window (which do not receive keyboard "
"focus) and issue a keyboard grab to force all keyboard events to that "
"window. This option is seldom used and has no effect on regular X11 windows "
"which can receive keyboard focus under normal circumstances. For a X11 grab "
"to be taken into account under Wayland, the client must also either send a "
"specific X11 ClientMessage to the root window or be among the applications "
"white-listed in key “xwayland-grab-access-rules”."
"Allow keyboard grabs issued by X11 applications running in Xwayland to be "
"taken into account. For a X11 grab to be taken into account under Wayland, "
"the client must also either send a specific X11 ClientMessage to the root "
"window or be among the applications white-listed in key “xwayland-grab-"
"access-rules”."
msgstr ""
"运行在 Xwayland 下时,允许通过捕获,发送所有的键盘事件到 X11“覆盖重定向”窗"
"口。此选项是为了支持(收不到键盘焦点的)“覆盖重定向”窗口所映射的 X11 客户端"
"并发起键盘捕获强制所有键盘事件进到那个窗口。此选项比较少用,并且对常规 X11 窗"
"口没有影响,这些窗口在正常情况下可以收到键盘焦点。在 Wayland 下,为了 X11 捕"
"获能够工作,客户端也必须发送一个指定的 X11 ClientMessage 到根窗口,或是包含"
"进“xwayland-grab-access-rules”键成为其中一个白名单应用程序。"
"允许考虑运行在 Xwayland 中的 X11 应用程序发起的键盘捕获。在 Wayland 下,为了"
"将 X11 捕获考虑在内,客户端也必须发送一个指定的 X11 ClientMessage 到根窗口"
"或是包含进“xwayland-grab-access-rules”键成为其中一个白名单应用程序。"
#: data/org.gnome.mutter.wayland.gschema.xml.in:84
#: data/org.gnome.mutter.wayland.gschema.xml.in:77
msgid "Xwayland applications allowed to issue keyboard grabs"
msgstr "允许发起键盘捕获的 Xwayland 应用程序"
#: data/org.gnome.mutter.wayland.gschema.xml.in:85
#: data/org.gnome.mutter.wayland.gschema.xml.in:78
msgid ""
"List the resource names or resource class of X11 windows either allowed or "
"not allowed to issue X11 keyboard grabs under Xwayland. The resource name or "
@@ -530,7 +516,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2260
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "模式切换(组别 %d"
@@ -538,127 +524,116 @@ msgstr "模式切换(组别 %d"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2283
msgid "Switch monitor"
msgstr "切换显示器"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2285
msgid "Show on-screen help"
msgstr "显示在屏帮助"
#: src/backends/meta-monitor.c:223
#: src/backends/meta-monitor-manager.c:900
msgid "Built-in display"
msgstr "内置显示器"
#: src/backends/meta-monitor.c:252
#: src/backends/meta-monitor-manager.c:923
msgid "Unknown"
msgstr "未知"
#: src/backends/meta-monitor.c:254
#: src/backends/meta-monitor-manager.c:925
msgid "Unknown Display"
msgstr "未知的 Display"
#: src/backends/meta-monitor.c:262
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:933
#, c-format
msgctxt ""
"This is a monitor vendor name, followed by a size in inches, like 'Dell 15\"'"
msgid "%s %s"
msgstr "%s %s"
#: src/backends/meta-monitor.c:270
#, c-format
msgctxt ""
"This is a monitor vendor name followed by product/model name where size in "
"inches could not be calculated, e.g. Dell U2414H"
msgid "%s %s"
msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
msgid "Compositor"
msgstr "合成器"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:509
#: src/compositor/compositor.c:481
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
msgstr "显示器 %2$s 的屏幕 %1$i 上已有另外一个混成窗口管理器正在运行。"
#: src/core/bell.c:192
#: src/core/bell.c:194
msgid "Bell event"
msgstr "响铃事件"
#: src/core/main.c:186
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "无法打开 X Window System 显示器“%s”\n"
#: src/core/main.c:190
msgid "Disable connection to session manager"
msgstr "禁止连接到会话管理器"
#: src/core/main.c:192
#: src/core/main.c:196
msgid "Replace the running window manager"
msgstr "替换正在运行的窗口管理器"
#: src/core/main.c:198
#: src/core/main.c:202
msgid "Specify session management ID"
msgstr "指定会话管理 ID"
#: src/core/main.c:203
#: src/core/main.c:207
msgid "X Display to use"
msgstr "要使用的 X Display"
#: src/core/main.c:209
#: src/core/main.c:213
msgid "Initialize session from savefile"
msgstr "从保存文件中初始化会话"
#: src/core/main.c:215
#: src/core/main.c:219
msgid "Make X calls synchronous"
msgstr "使 X 调用同步"
#: src/core/main.c:222
#: src/core/main.c:226
msgid "Run as a wayland compositor"
msgstr " wayland 合成器运行"
msgstr "作为 wayland 混成管理器运行"
#: src/core/main.c:228
#: src/core/main.c:232
msgid "Run as a nested compositor"
msgstr "嵌套成器运行"
msgstr "作为嵌套成器运行"
#: src/core/main.c:234
msgid "Run wayland compositor without starting Xwayland"
msgstr "运行 wayland 合成器但不启动 Xwayland"
#: src/core/main.c:242
#: src/core/main.c:240
msgid "Run as a full display server, rather than nested"
msgstr "以完整显示服务器方式运行,而不是以嵌套方式"
#: src/core/main.c:248
#: src/core/main.c:246
msgid "Run with X11 backend"
msgstr "以 X11 后端运行"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:151
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” 未响应。"
#: src/core/meta-close-dialog-default.c:153
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "应用程序未响应。"
#: src/core/meta-close-dialog-default.c:158
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr "您可以选择稍等一会儿,或者强制退出该应用程序。"
#: src/core/meta-close-dialog-default.c:165
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "强制退出(_F)"
#: src/core/meta-close-dialog-default.c:165
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "等待(_W)"
#: src/core/mutter.c:38
#: src/core/mutter.c:39
#, c-format
msgid ""
"mutter %s\n"
@@ -672,29 +647,20 @@ msgstr ""
"本软件为自由软件;版权条款请参见源码\n"
"不存在任何保证;即便是对商业性或者特定目的的适应性也不作保证。\n"
#: src/core/mutter.c:52
#: src/core/mutter.c:53
msgid "Print version"
msgstr "打印版本"
#: src/core/mutter.c:58
#: src/core/mutter.c:59
msgid "Mutter plugin to use"
msgstr "要使用的 Mutter 插件"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "工作区 %d"
#: src/core/util.c:122
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter 编译的时候没有加入详细模式的支持\n"
#: src/wayland/meta-wayland-tablet-pad.c:568
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "模式切换:%d 模式"
#: src/x11/meta-x11-display.c:679
#: src/core/screen.c:583
#, c-format
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
@@ -703,32 +669,27 @@ msgstr ""
"Display“%s”已经有一个窗口管理器请尝试使用 --replace 选项替换当前的窗口管理"
"器。"
#: src/x11/meta-x11-display.c:1040
msgid "Failed to initialize GDK\n"
msgstr "初始化 GDK 失败\n"
#: src/x11/meta-x11-display.c:1064
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "无法打开 X Window System 显示器“%s”\n"
#: src/x11/meta-x11-display.c:1147
#: src/core/screen.c:668
#, c-format
msgid "Screen %d on display “%s” is invalid\n"
msgstr "显示“%2$s”上的屏幕 %1$d 无效\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#, c-format
msgid "Format %s not supported"
msgstr "不支持 %s 格式"
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter 编译的时候没有加入详细模式的支持\n"
#: src/x11/session.c:1821
#: src/wayland/meta-wayland-tablet-pad.c:567
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "模式切换:%d 模式"
#: src/x11/session.c:1818
msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."
msgstr "这些窗口不支持“保存当前设置”,并且在您下次登录时,必须手动重启它们。"
#: src/x11/window-props.c:569
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s于 %s"
@@ -1958,6 +1919,9 @@ msgstr "%s于 %s"
#~ msgid "Commands to run in response to keybindings"
#~ msgstr "按键组合对应的执行命令"
#~ msgid "Compositing Manager"
#~ msgstr "复合管理器"
#~ msgid "Control how new windows get focus"
#~ msgstr "控制新窗口如何获得窗口"

View File

@@ -517,33 +517,6 @@ update_touchpad_disable_while_typing (MetaInputSettings *input_settings,
}
}
static gboolean
device_is_tablet_touchpad (MetaInputSettings *input_settings,
ClutterInputDevice *device)
{
#ifdef HAVE_LIBWACOM
WacomIntegrationFlags flags = 0;
WacomDevice *wacom_device;
if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
return FALSE;
wacom_device =
meta_input_settings_get_tablet_wacom_device (input_settings,
device);
if (wacom_device)
{
flags = libwacom_get_integration_flags (wacom_device);
if ((flags & (WACOM_DEVICE_INTEGRATED_SYSTEM |
WACOM_DEVICE_INTEGRATED_DISPLAY)) == 0)
return TRUE;
}
#endif
return FALSE;
}
static void
update_touchpad_tap_enabled (MetaInputSettings *input_settings,
ClutterInputDevice *device)
@@ -558,8 +531,7 @@ update_touchpad_tap_enabled (MetaInputSettings *input_settings,
priv = meta_input_settings_get_instance_private (input_settings);
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
enabled = device_is_tablet_touchpad (input_settings, device) ||
g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
enabled = g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
if (device)
{
@@ -589,8 +561,7 @@ update_touchpad_tap_and_drag_enabled (MetaInputSettings *input_settings,
priv = meta_input_settings_get_instance_private (input_settings);
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
enabled = device_is_tablet_touchpad (input_settings, device) ||
g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
enabled = g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
if (device)
{

View File

@@ -225,15 +225,11 @@ meta_screen_cast_window_stream_initable_init (GInitable *initable,
G_CALLBACK (on_window_unmanaged),
window_stream);
if (meta_is_stage_views_scaled ())
scale = (int) ceilf (meta_logical_monitor_get_scale (logical_monitor));
else
scale = 1;
/* We cannot set the stream size to the exact size of the window, because
* windows can be resized, whereas streams cannot.
* So we set a size equals to the size of the logical monitor for the window.
*/
scale = (int) ceil (meta_logical_monitor_get_scale (logical_monitor));
window_stream->logical_width = logical_monitor->rect.width;
window_stream->logical_height = logical_monitor->rect.height;
window_stream->stream_width = logical_monitor->rect.width * scale;

View File

@@ -227,7 +227,6 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
{
MetaLogicalMonitor *cur = current;
float x = cur_x, y = cur_y;
float target_x = cur_x, target_y = cur_y;
float dx = *dx_inout, dy = *dy_inout;
MetaDisplayDirection direction = -1;
@@ -257,9 +256,6 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
{ cur->rect.x + cur->rect.width, cur->rect.y + cur->rect.height }
};
target_x = motion.b.x;
target_y = motion.b.y;
if (direction != META_DISPLAY_RIGHT &&
meta_line2_intersects_with (&motion, &left, &intersection))
direction = META_DISPLAY_LEFT;
@@ -273,8 +269,12 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
meta_line2_intersects_with (&motion, &bottom, &intersection))
direction = META_DISPLAY_DOWN;
else
/* We reached the dest logical monitor */
break;
{
/* We reached the dest logical monitor */
x = motion.b.x;
y = motion.b.y;
break;
}
x = intersection.x;
y = intersection.y;
@@ -285,8 +285,8 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
cur, direction);
}
*dx_inout = target_x - cur_x;
*dy_inout = target_y - cur_y;
*dx_inout = x - cur_x;
*dy_inout = y - cur_y;
}
static void

View File

@@ -1537,7 +1537,7 @@ process_device_event (MetaDeviceManagerNative *manager_evdev,
angle_delta = libinput_event_gesture_get_angle_delta (gesture_event);
scale = libinput_event_gesture_get_scale (gesture_event);
dx = libinput_event_gesture_get_dx (gesture_event);
dy = libinput_event_gesture_get_dy (gesture_event);
dy = libinput_event_gesture_get_dx (gesture_event);
notify_pinch_gesture_event (device,
CLUTTER_TOUCHPAD_GESTURE_PHASE_UPDATE,

View File

@@ -957,28 +957,20 @@ meta_window_actor_cull_out (MetaCullable *cullable,
meta_cullable_cull_out_children (cullable, unobscured_region, clip_region);
if ((unobscured_region || clip_region) && meta_window_actor_is_opaque (self))
if (unobscured_region && meta_window_actor_is_opaque (self))
{
cairo_region_t *region = meta_window_get_frame_bounds (priv->window);
if (region)
{
if (unobscured_region)
cairo_region_subtract (unobscured_region, region);
if (clip_region)
cairo_region_subtract (clip_region, region);
cairo_region_subtract (unobscured_region, region);
}
else
{
cairo_rectangle_int_t rect;
meta_window_get_frame_rect (priv->window, &rect);
rect.x = rect.y = 0;
if (unobscured_region)
cairo_region_subtract_rectangle (unobscured_region, &rect);
if (clip_region)
cairo_region_subtract_rectangle (clip_region, &rect);
cairo_region_subtract_rectangle (unobscured_region, &rect);
}
}
}

View File

@@ -712,9 +712,7 @@ if have_profiler
'backends/meta-profiler.h',
]
# sysprof does not export anything more specific than the prefix
sysprof_datadir = join_paths(sysprof_dep.get_pkgconfig_variable('prefix'), get_option('datadir'))
dbus_interfaces_dir = join_paths(sysprof_datadir, 'dbus-1', 'interfaces')
dbus_interfaces_dir = join_paths(datadir, 'dbus-1', 'interfaces')
sysprof3_dbus_file = join_paths(dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml')
dbus_sysprof3_profiler_built_sources = gnome.gdbus_codegen('meta-dbus-sysprof3-profiler',

View File

@@ -861,8 +861,8 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
if (icon_name)
{
GtkIconTheme *theme = gtk_icon_theme_get_default ();
g_autoptr (GtkIconInfo) info = NULL;
g_autoptr (GdkPixbuf) pixbuf = NULL;
GtkIconInfo *info;
GdkPixbuf *pixbuf;
info = gtk_icon_theme_lookup_icon_for_scale (theme, icon_name,
layout->icon_size, scale, 0);

View File

@@ -116,7 +116,6 @@ write_mimetypes_cb (GOutputStream *stream,
g_output_stream_write_bytes_finish (stream, res, &error);
g_output_stream_close (stream, NULL, NULL);
g_object_unref (stream);
if (error)
{