Compare commits
38 Commits
benzea/ci-
...
benzea/use
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ac8066a743 | ||
![]() |
c4fa30ac7d | ||
![]() |
84ea4ad990 | ||
![]() |
64685f4b20 | ||
![]() |
bf594e9fb6 | ||
![]() |
3958e75ed2 | ||
![]() |
802309caf9 | ||
![]() |
468b09c01e | ||
![]() |
c13ea4f48d | ||
![]() |
1e7285b2bb | ||
![]() |
a8cb84c711 | ||
![]() |
9075a5bf1e | ||
![]() |
bd4ebd23f4 | ||
![]() |
31c7bcac29 | ||
![]() |
d3b1168e26 | ||
![]() |
674f52ba74 | ||
![]() |
498264959a | ||
![]() |
e89cea8e5a | ||
![]() |
e32e20521d | ||
![]() |
9d5092cef5 | ||
![]() |
68d0c11d88 | ||
![]() |
fdf830940b | ||
![]() |
10daade1c0 | ||
![]() |
9a3a6dc212 | ||
![]() |
f9599b64d0 | ||
![]() |
a46fd33460 | ||
![]() |
d5a70c7669 | ||
![]() |
573ba108d9 | ||
![]() |
9325bd9d8e | ||
![]() |
420fb28d3f | ||
![]() |
5613f4f7f4 | ||
![]() |
02db9ee577 | ||
![]() |
4aab814c37 | ||
![]() |
a48206e827 | ||
![]() |
99cc435730 | ||
![]() |
67d9995280 | ||
![]() |
82233cce65 | ||
![]() |
2e97ba316d |
@@ -1,8 +1,8 @@
|
|||||||
# Rebuild and push with
|
# Rebuild and push with
|
||||||
#
|
#
|
||||||
# cd .gitlab-ci/
|
# cd .gitlab-ci/
|
||||||
# docker build --no-cache -t registry.gitlab.gnome.org/gnome/mutter/master:v3 .
|
# podman build --format docker --no-cache -t registry.gitlab.gnome.org/gnome/mutter/master:v3 .
|
||||||
# docker push registry.gitlab.gnome.org/gnome/mutter/master:v3
|
# podman push registry.gitlab.gnome.org/gnome/mutter/master:v3
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM fedora:31
|
FROM fedora:31
|
||||||
|
65
NEWS
65
NEWS
@@ -1,3 +1,68 @@
|
|||||||
|
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
|
3.35.1
|
||||||
======
|
======
|
||||||
* Fix immediate screen blank after releaseing inhibitor [Tim; #573]
|
* Fix immediate screen blank after releaseing inhibitor [Tim; #573]
|
||||||
|
@@ -121,12 +121,12 @@ G_DEFINE_TYPE (ClutterBrightnessContrastEffect,
|
|||||||
static gboolean
|
static gboolean
|
||||||
will_have_no_effect (ClutterBrightnessContrastEffect *self)
|
will_have_no_effect (ClutterBrightnessContrastEffect *self)
|
||||||
{
|
{
|
||||||
return (self->brightness_red == no_change &&
|
return (G_APPROX_VALUE (self->brightness_red, no_change, FLT_EPSILON) &&
|
||||||
self->brightness_green == no_change &&
|
G_APPROX_VALUE (self->brightness_green, no_change, FLT_EPSILON) &&
|
||||||
self->brightness_blue == no_change &&
|
G_APPROX_VALUE (self->brightness_blue, no_change, FLT_EPSILON) &&
|
||||||
self->contrast_red == no_change &&
|
G_APPROX_VALUE (self->contrast_red, no_change, FLT_EPSILON) &&
|
||||||
self->contrast_green == no_change &&
|
G_APPROX_VALUE (self->contrast_green, no_change, FLT_EPSILON) &&
|
||||||
self->contrast_blue == no_change);
|
G_APPROX_VALUE (self->contrast_blue, no_change, FLT_EPSILON));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -497,9 +497,9 @@ clutter_brightness_contrast_effect_set_brightness_full (ClutterBrightnessContras
|
|||||||
{
|
{
|
||||||
g_return_if_fail (CLUTTER_IS_BRIGHTNESS_CONTRAST_EFFECT (effect));
|
g_return_if_fail (CLUTTER_IS_BRIGHTNESS_CONTRAST_EFFECT (effect));
|
||||||
|
|
||||||
if (red == effect->brightness_red &&
|
if (G_APPROX_VALUE (red, effect->brightness_red, FLT_EPSILON) &&
|
||||||
green == effect->brightness_green &&
|
G_APPROX_VALUE (green, effect->brightness_green, FLT_EPSILON) &&
|
||||||
blue == effect->brightness_blue)
|
G_APPROX_VALUE (blue, effect->brightness_blue, FLT_EPSILON))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
effect->brightness_red = red;
|
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));
|
g_return_if_fail (CLUTTER_IS_BRIGHTNESS_CONTRAST_EFFECT (effect));
|
||||||
|
|
||||||
if (red == effect->contrast_red &&
|
if (G_APPROX_VALUE (red, effect->contrast_red, FLT_EPSILON) &&
|
||||||
green == effect->contrast_green &&
|
G_APPROX_VALUE (green, effect->contrast_green, FLT_EPSILON) &&
|
||||||
blue == effect->contrast_blue)
|
G_APPROX_VALUE (blue, effect->contrast_blue, FLT_EPSILON))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
effect->contrast_red = red;
|
effect->contrast_red = red;
|
||||||
|
@@ -118,11 +118,7 @@ clutter_offscreen_effect_set_actor (ClutterActorMeta *meta,
|
|||||||
meta_class->set_actor (meta, actor);
|
meta_class->set_actor (meta, actor);
|
||||||
|
|
||||||
/* clear out the previous state */
|
/* clear out the previous state */
|
||||||
if (priv->offscreen != NULL)
|
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||||
{
|
|
||||||
cogl_object_unref (priv->offscreen);
|
|
||||||
priv->offscreen = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* we keep a back pointer here, to avoid going through the ActorMeta */
|
/* we keep a back pointer here, to avoid going through the ActorMeta */
|
||||||
priv->actor = clutter_actor_meta_get_actor (meta);
|
priv->actor = clutter_actor_meta_get_actor (meta);
|
||||||
@@ -198,17 +194,8 @@ update_fbo (ClutterEffect *effect,
|
|||||||
ensure_pipeline_filter_for_scale (self, resource_scale);
|
ensure_pipeline_filter_for_scale (self, resource_scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->texture != NULL)
|
g_clear_pointer (&priv->texture, cogl_object_unref);
|
||||||
{
|
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||||
cogl_object_unref (priv->texture);
|
|
||||||
priv->texture = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (priv->offscreen != NULL)
|
|
||||||
{
|
|
||||||
cogl_object_unref (priv->offscreen);
|
|
||||||
priv->offscreen = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
priv->texture =
|
priv->texture =
|
||||||
clutter_offscreen_effect_create_texture (self, target_width, target_height);
|
clutter_offscreen_effect_create_texture (self, target_width, target_height);
|
||||||
@@ -487,29 +474,44 @@ clutter_offscreen_effect_paint (ClutterEffect *effect,
|
|||||||
*/
|
*/
|
||||||
if (priv->offscreen == NULL || (flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY))
|
if (priv->offscreen == NULL || (flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY))
|
||||||
{
|
{
|
||||||
/* Chain up to the parent paint method which will call the pre and
|
ClutterEffectClass *effect_class = CLUTTER_EFFECT_GET_CLASS (effect);
|
||||||
post paint functions to update the image */
|
gboolean pre_paint_succeeded;
|
||||||
CLUTTER_EFFECT_CLASS (clutter_offscreen_effect_parent_class)->
|
|
||||||
paint (effect, paint_context, flags);
|
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);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
clutter_offscreen_effect_paint_texture (self, paint_context);
|
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
|
static void
|
||||||
clutter_offscreen_effect_finalize (GObject *gobject)
|
clutter_offscreen_effect_finalize (GObject *gobject)
|
||||||
{
|
{
|
||||||
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (gobject);
|
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (gobject);
|
||||||
ClutterOffscreenEffectPrivate *priv = self->priv;
|
ClutterOffscreenEffectPrivate *priv = self->priv;
|
||||||
|
|
||||||
if (priv->offscreen)
|
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||||
cogl_object_unref (priv->offscreen);
|
g_clear_pointer (&priv->texture, cogl_object_unref);
|
||||||
|
g_clear_pointer (&priv->target, cogl_object_unref);
|
||||||
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);
|
G_OBJECT_CLASS (clutter_offscreen_effect_parent_class)->finalize (gobject);
|
||||||
}
|
}
|
||||||
@@ -531,6 +533,7 @@ clutter_offscreen_effect_class_init (ClutterOffscreenEffectClass *klass)
|
|||||||
effect_class->paint = clutter_offscreen_effect_paint;
|
effect_class->paint = clutter_offscreen_effect_paint;
|
||||||
|
|
||||||
gobject_class->finalize = clutter_offscreen_effect_finalize;
|
gobject_class->finalize = clutter_offscreen_effect_finalize;
|
||||||
|
gobject_class->notify = clutter_offscreen_effect_notify;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -443,9 +443,9 @@ is_inside_axis_aligned_rectangle (const graphene_point_t *point,
|
|||||||
const graphene_point_t *vertices)
|
const graphene_point_t *vertices)
|
||||||
{
|
{
|
||||||
float min_x = FLT_MAX;
|
float min_x = FLT_MAX;
|
||||||
float max_x = FLT_MIN;
|
float max_x = -FLT_MAX;
|
||||||
float min_y = FLT_MAX;
|
float min_y = FLT_MAX;
|
||||||
float max_y = FLT_MIN;
|
float max_y = -FLT_MAX;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
|
@@ -5,12 +5,6 @@
|
|||||||
#include <clutter/clutter-backend.h>
|
#include <clutter/clutter-backend.h>
|
||||||
#include <clutter/clutter-stage.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"
|
#include "clutter/clutter-stage-window.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
@@ -37,12 +37,6 @@
|
|||||||
|
|
||||||
#include <glib.h>
|
#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-egl-headers.h"
|
||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
|
|
||||||
|
@@ -34,10 +34,6 @@
|
|||||||
#include "cogl-context.h"
|
#include "cogl-context.h"
|
||||||
#include "cogl-flags.h"
|
#include "cogl-flags.h"
|
||||||
|
|
||||||
#ifdef COGL_HAS_XLIB_SUPPORT
|
|
||||||
#include "cogl-xlib-private.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "cogl-display-private.h"
|
#include "cogl-display-private.h"
|
||||||
#include "cogl-clip-stack.h"
|
#include "cogl-clip-stack.h"
|
||||||
#include "cogl-matrix-stack.h"
|
#include "cogl-matrix-stack.h"
|
||||||
@@ -273,18 +269,6 @@ struct _CoglContext
|
|||||||
|
|
||||||
CoglSamplerCache *sampler_cache;
|
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
|
unsigned long winsys_features
|
||||||
[COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_WINSYS_FEATURE_N_FEATURES)];
|
[COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_WINSYS_FEATURE_N_FEATURES)];
|
||||||
void *winsys;
|
void *winsys;
|
||||||
|
@@ -47,8 +47,6 @@
|
|||||||
#include "cogl1-context.h"
|
#include "cogl1-context.h"
|
||||||
#include "cogl-gpu-info-private.h"
|
#include "cogl-gpu-info-private.h"
|
||||||
#include "cogl-gtype-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 "winsys/cogl-winsys-private.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -104,6 +102,12 @@ _cogl_context_get_winsys (CoglContext *context)
|
|||||||
return context->display->renderer->winsys_vtable;
|
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
|
/* For reference: There was some deliberation over whether to have a
|
||||||
* constructor that could throw an exception but looking at standard
|
* constructor that could throw an exception but looking at standard
|
||||||
* practices with several high level OO languages including python, C++,
|
* practices with several high level OO languages including python, C++,
|
||||||
@@ -207,6 +211,13 @@ cogl_context_new (CoglDisplay *display,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!context->driver_vtable->context_init (context, error))
|
||||||
|
{
|
||||||
|
cogl_object_unref (display);
|
||||||
|
g_free (context);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
context->attribute_name_states_hash =
|
context->attribute_name_states_hash =
|
||||||
g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
|
g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
|
||||||
context->attribute_name_index_map = NULL;
|
context->attribute_name_index_map = NULL;
|
||||||
@@ -243,17 +254,6 @@ cogl_context_new (CoglDisplay *display,
|
|||||||
|
|
||||||
context->flushed_matrix_mode = COGL_MATRIX_MODELVIEW;
|
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->opaque_color_pipeline = cogl_pipeline_new (context);
|
||||||
|
|
||||||
context->codegen_header_buffer = g_string_new ("");
|
context->codegen_header_buffer = g_string_new ("");
|
||||||
@@ -328,31 +328,6 @@ cogl_context_new (CoglDisplay *display,
|
|||||||
context->texture_download_pipeline = NULL;
|
context->texture_download_pipeline = NULL;
|
||||||
context->blit_texture_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_modelview_entry = NULL;
|
||||||
context->current_projection_entry = NULL;
|
context->current_projection_entry = NULL;
|
||||||
_cogl_matrix_entry_identity_init (&context->identity_entry);
|
_cogl_matrix_entry_identity_init (&context->identity_entry);
|
||||||
@@ -374,16 +349,6 @@ cogl_context_new (CoglDisplay *display,
|
|||||||
context->buffer_map_fallback_array = g_byte_array_new ();
|
context->buffer_map_fallback_array = g_byte_array_new ();
|
||||||
context->buffer_map_fallback_in_use = FALSE;
|
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);
|
_cogl_list_init (&context->fences);
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
@@ -393,6 +358,7 @@ static void
|
|||||||
_cogl_context_free (CoglContext *context)
|
_cogl_context_free (CoglContext *context)
|
||||||
{
|
{
|
||||||
const CoglWinsysVtable *winsys = _cogl_context_get_winsys (context);
|
const CoglWinsysVtable *winsys = _cogl_context_get_winsys (context);
|
||||||
|
const CoglDriverVtable *driver = _cogl_context_get_driver (context);
|
||||||
|
|
||||||
winsys->context_deinit (context);
|
winsys->context_deinit (context);
|
||||||
|
|
||||||
@@ -464,8 +430,6 @@ _cogl_context_free (CoglContext *context)
|
|||||||
|
|
||||||
_cogl_sampler_cache_free (context->sampler_cache);
|
_cogl_sampler_cache_free (context->sampler_cache);
|
||||||
|
|
||||||
_cogl_destroy_texture_units ();
|
|
||||||
|
|
||||||
g_ptr_array_free (context->uniform_names, TRUE);
|
g_ptr_array_free (context->uniform_names, TRUE);
|
||||||
g_hash_table_destroy (context->uniform_name_hash);
|
g_hash_table_destroy (context->uniform_name_hash);
|
||||||
|
|
||||||
@@ -474,6 +438,8 @@ _cogl_context_free (CoglContext *context)
|
|||||||
|
|
||||||
g_byte_array_free (context->buffer_map_fallback_array, TRUE);
|
g_byte_array_free (context->buffer_map_fallback_array, TRUE);
|
||||||
|
|
||||||
|
driver->context_deinit (context);
|
||||||
|
|
||||||
cogl_object_unref (context->display);
|
cogl_object_unref (context->display);
|
||||||
|
|
||||||
g_free (context);
|
g_free (context);
|
||||||
|
@@ -40,6 +40,12 @@ typedef struct _CoglDriverVtable CoglDriverVtable;
|
|||||||
|
|
||||||
struct _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
|
/* TODO: factor this out since this is OpenGL specific and
|
||||||
* so can be ignored by non-OpenGL drivers. */
|
* so can be ignored by non-OpenGL drivers. */
|
||||||
gboolean
|
gboolean
|
||||||
|
@@ -41,15 +41,6 @@
|
|||||||
#include "cogl-gl-header.h"
|
#include "cogl-gl-header.h"
|
||||||
#include "cogl-clip-stack.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 {
|
typedef enum _CoglFramebufferType {
|
||||||
COGL_FRAMEBUFFER_TYPE_ONSCREEN,
|
COGL_FRAMEBUFFER_TYPE_ONSCREEN,
|
||||||
COGL_FRAMEBUFFER_TYPE_OFFSCREEN
|
COGL_FRAMEBUFFER_TYPE_OFFSCREEN
|
||||||
|
@@ -76,7 +76,7 @@ G_BEGIN_DECLS
|
|||||||
* vertices multiple times.
|
* vertices multiple times.
|
||||||
*
|
*
|
||||||
* |[
|
* |[
|
||||||
* CoglVertex2f quad_vertices[] = {
|
* CoglVertexP2 quad_vertices[] = {
|
||||||
* {x0, y0}, //0 = top left
|
* {x0, y0}, //0 = top left
|
||||||
* {x1, y1}, //1 = bottom left
|
* {x1, y1}, //1 = bottom left
|
||||||
* {x2, y2}, //2 = bottom right
|
* {x2, y2}, //2 = bottom right
|
||||||
|
@@ -42,10 +42,6 @@
|
|||||||
#include "cogl-poll-private.h"
|
#include "cogl-poll-private.h"
|
||||||
#include "cogl-gtype-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);
|
static void _cogl_onscreen_free (CoglOnscreen *onscreen);
|
||||||
|
|
||||||
COGL_OBJECT_DEFINE_WITH_CODE_GTYPE (Onscreen, onscreen,
|
COGL_OBJECT_DEFINE_WITH_CODE_GTYPE (Onscreen, onscreen,
|
||||||
|
@@ -193,27 +193,9 @@ dump_pipeline_cb (CoglNode *node, void *user_data)
|
|||||||
|
|
||||||
if (pipeline->differences & COGL_PIPELINE_STATE_BLEND)
|
if (pipeline->differences & COGL_PIPELINE_STATE_BLEND)
|
||||||
{
|
{
|
||||||
const char *blend_enable_name;
|
|
||||||
|
|
||||||
changes = TRUE;
|
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,
|
g_string_append_printf (changes_label,
|
||||||
"\\lblend=%s\\n",
|
"\\lblend\\n");
|
||||||
blend_enable_name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pipeline->differences & COGL_PIPELINE_STATE_LAYERS)
|
if (pipeline->differences & COGL_PIPELINE_STATE_LAYERS)
|
||||||
|
@@ -62,7 +62,6 @@ typedef enum
|
|||||||
{
|
{
|
||||||
/* sparse state */
|
/* sparse state */
|
||||||
COGL_PIPELINE_STATE_COLOR_INDEX,
|
COGL_PIPELINE_STATE_COLOR_INDEX,
|
||||||
COGL_PIPELINE_STATE_BLEND_ENABLE_INDEX,
|
|
||||||
COGL_PIPELINE_STATE_LAYERS_INDEX,
|
COGL_PIPELINE_STATE_LAYERS_INDEX,
|
||||||
COGL_PIPELINE_STATE_ALPHA_FUNC_INDEX,
|
COGL_PIPELINE_STATE_ALPHA_FUNC_INDEX,
|
||||||
COGL_PIPELINE_STATE_ALPHA_FUNC_REFERENCE_INDEX,
|
COGL_PIPELINE_STATE_ALPHA_FUNC_REFERENCE_INDEX,
|
||||||
@@ -99,8 +98,6 @@ typedef enum _CoglPipelineState
|
|||||||
{
|
{
|
||||||
COGL_PIPELINE_STATE_COLOR =
|
COGL_PIPELINE_STATE_COLOR =
|
||||||
1L<<COGL_PIPELINE_STATE_COLOR_INDEX,
|
1L<<COGL_PIPELINE_STATE_COLOR_INDEX,
|
||||||
COGL_PIPELINE_STATE_BLEND_ENABLE =
|
|
||||||
1L<<COGL_PIPELINE_STATE_BLEND_ENABLE_INDEX,
|
|
||||||
COGL_PIPELINE_STATE_LAYERS =
|
COGL_PIPELINE_STATE_LAYERS =
|
||||||
1L<<COGL_PIPELINE_STATE_LAYERS_INDEX,
|
1L<<COGL_PIPELINE_STATE_LAYERS_INDEX,
|
||||||
|
|
||||||
@@ -147,7 +144,6 @@ typedef enum _CoglPipelineState
|
|||||||
|
|
||||||
#define COGL_PIPELINE_STATE_AFFECTS_BLENDING \
|
#define COGL_PIPELINE_STATE_AFFECTS_BLENDING \
|
||||||
(COGL_PIPELINE_STATE_COLOR | \
|
(COGL_PIPELINE_STATE_COLOR | \
|
||||||
COGL_PIPELINE_STATE_BLEND_ENABLE | \
|
|
||||||
COGL_PIPELINE_STATE_LAYERS | \
|
COGL_PIPELINE_STATE_LAYERS | \
|
||||||
COGL_PIPELINE_STATE_BLEND | \
|
COGL_PIPELINE_STATE_BLEND | \
|
||||||
COGL_PIPELINE_STATE_USER_SHADER | \
|
COGL_PIPELINE_STATE_USER_SHADER | \
|
||||||
@@ -184,15 +180,6 @@ typedef struct
|
|||||||
float alpha_func_reference;
|
float alpha_func_reference;
|
||||||
} CoglPipelineAlphaFuncState;
|
} 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
|
typedef struct
|
||||||
{
|
{
|
||||||
/* Determines how this pipeline is blended with other primitives */
|
/* Determines how this pipeline is blended with other primitives */
|
||||||
@@ -367,13 +354,6 @@ struct _CoglPipeline
|
|||||||
/* Determines if pipeline->big_state is valid */
|
/* Determines if pipeline->big_state is valid */
|
||||||
unsigned int has_big_state:1;
|
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
|
/* There are many factors that can determine if we need to enable
|
||||||
* blending, this holds our final decision */
|
* blending, this holds our final decision */
|
||||||
unsigned int real_blend_enable:1;
|
unsigned int real_blend_enable:1;
|
||||||
@@ -774,13 +754,6 @@ void
|
|||||||
_cogl_pipeline_apply_overrides (CoglPipeline *pipeline,
|
_cogl_pipeline_apply_overrides (CoglPipeline *pipeline,
|
||||||
CoglPipelineFlushOptions *options);
|
CoglPipelineFlushOptions *options);
|
||||||
|
|
||||||
CoglPipelineBlendEnable
|
|
||||||
_cogl_pipeline_get_blend_enabled (CoglPipeline *pipeline);
|
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_pipeline_set_blend_enabled (CoglPipeline *pipeline,
|
|
||||||
CoglPipelineBlendEnable enable);
|
|
||||||
|
|
||||||
#ifdef COGL_DEBUG_ENABLED
|
#ifdef COGL_DEBUG_ENABLED
|
||||||
void
|
void
|
||||||
_cogl_pipeline_set_static_breadcrumb (CoglPipeline *pipeline,
|
_cogl_pipeline_set_static_breadcrumb (CoglPipeline *pipeline,
|
||||||
|
@@ -108,10 +108,6 @@ void
|
|||||||
_cogl_pipeline_hash_color_state (CoglPipeline *authority,
|
_cogl_pipeline_hash_color_state (CoglPipeline *authority,
|
||||||
CoglPipelineHashState *state);
|
CoglPipelineHashState *state);
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_pipeline_hash_blend_enable_state (CoglPipeline *authority,
|
|
||||||
CoglPipelineHashState *state);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_pipeline_hash_layers_state (CoglPipeline *authority,
|
_cogl_pipeline_hash_layers_state (CoglPipeline *authority,
|
||||||
CoglPipelineHashState *state);
|
CoglPipelineHashState *state);
|
||||||
|
@@ -407,56 +407,6 @@ cogl_pipeline_set_color4f (CoglPipeline *pipeline,
|
|||||||
cogl_pipeline_set_color (pipeline, &color);
|
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
|
static void
|
||||||
_cogl_pipeline_set_alpha_test_function (CoglPipeline *pipeline,
|
_cogl_pipeline_set_alpha_test_function (CoglPipeline *pipeline,
|
||||||
CoglPipelineAlphaFunc alpha_func)
|
CoglPipelineAlphaFunc alpha_func)
|
||||||
@@ -1379,14 +1329,6 @@ _cogl_pipeline_hash_color_state (CoglPipeline *authority,
|
|||||||
_COGL_COLOR_DATA_SIZE);
|
_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
|
void
|
||||||
_cogl_pipeline_hash_alpha_func_state (CoglPipeline *authority,
|
_cogl_pipeline_hash_alpha_func_state (CoglPipeline *authority,
|
||||||
CoglPipelineHashState *state)
|
CoglPipelineHashState *state)
|
||||||
|
@@ -104,7 +104,6 @@ _cogl_pipeline_init_default_pipeline (void)
|
|||||||
|
|
||||||
pipeline->real_blend_enable = FALSE;
|
pipeline->real_blend_enable = FALSE;
|
||||||
|
|
||||||
pipeline->blend_enable = COGL_PIPELINE_BLEND_ENABLE_AUTOMATIC;
|
|
||||||
pipeline->layer_differences = NULL;
|
pipeline->layer_differences = NULL;
|
||||||
pipeline->n_layers = 0;
|
pipeline->n_layers = 0;
|
||||||
|
|
||||||
@@ -721,24 +720,12 @@ _cogl_pipeline_needs_blending_enabled (CoglPipeline *pipeline,
|
|||||||
const CoglColor *override_color,
|
const CoglColor *override_color,
|
||||||
gboolean unknown_color_alpha)
|
gboolean unknown_color_alpha)
|
||||||
{
|
{
|
||||||
CoglPipeline *enable_authority;
|
|
||||||
CoglPipeline *blend_authority;
|
CoglPipeline *blend_authority;
|
||||||
CoglPipelineBlendState *blend_state;
|
CoglPipelineBlendState *blend_state;
|
||||||
CoglPipelineBlendEnable enabled;
|
|
||||||
|
|
||||||
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_BLENDING)))
|
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_BLENDING)))
|
||||||
return FALSE;
|
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 =
|
blend_authority =
|
||||||
_cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_BLEND);
|
_cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_BLEND);
|
||||||
|
|
||||||
@@ -826,9 +813,6 @@ _cogl_pipeline_copy_differences (CoglPipeline *dest,
|
|||||||
if (differences & COGL_PIPELINE_STATE_COLOR)
|
if (differences & COGL_PIPELINE_STATE_COLOR)
|
||||||
dest->color = src->color;
|
dest->color = src->color;
|
||||||
|
|
||||||
if (differences & COGL_PIPELINE_STATE_BLEND_ENABLE)
|
|
||||||
dest->blend_enable = src->blend_enable;
|
|
||||||
|
|
||||||
if (differences & COGL_PIPELINE_STATE_LAYERS)
|
if (differences & COGL_PIPELINE_STATE_LAYERS)
|
||||||
{
|
{
|
||||||
GList *l;
|
GList *l;
|
||||||
@@ -977,7 +961,6 @@ _cogl_pipeline_init_multi_property_sparse_state (CoglPipeline *pipeline,
|
|||||||
/* XXX: avoid using a default: label so we get a warning if we
|
/* XXX: avoid using a default: label so we get a warning if we
|
||||||
* don't explicitly handle a newly defined state-group here. */
|
* don't explicitly handle a newly defined state-group here. */
|
||||||
case COGL_PIPELINE_STATE_COLOR:
|
case COGL_PIPELINE_STATE_COLOR:
|
||||||
case COGL_PIPELINE_STATE_BLEND_ENABLE:
|
|
||||||
case COGL_PIPELINE_STATE_ALPHA_FUNC:
|
case COGL_PIPELINE_STATE_ALPHA_FUNC:
|
||||||
case COGL_PIPELINE_STATE_ALPHA_FUNC_REFERENCE:
|
case COGL_PIPELINE_STATE_ALPHA_FUNC_REFERENCE:
|
||||||
case COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE:
|
case COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE:
|
||||||
@@ -2170,7 +2153,6 @@ _cogl_pipeline_equal (CoglPipeline *pipeline0,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case COGL_PIPELINE_STATE_BLEND_ENABLE_INDEX:
|
|
||||||
case COGL_PIPELINE_STATE_REAL_BLEND_ENABLE_INDEX:
|
case COGL_PIPELINE_STATE_REAL_BLEND_ENABLE_INDEX:
|
||||||
case COGL_PIPELINE_STATE_COUNT:
|
case COGL_PIPELINE_STATE_COUNT:
|
||||||
g_warn_if_reached ();
|
g_warn_if_reached ();
|
||||||
@@ -2514,8 +2496,6 @@ _cogl_pipeline_init_state_hash_functions (void)
|
|||||||
{
|
{
|
||||||
state_hash_functions[COGL_PIPELINE_STATE_COLOR_INDEX] =
|
state_hash_functions[COGL_PIPELINE_STATE_COLOR_INDEX] =
|
||||||
_cogl_pipeline_hash_color_state;
|
_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] =
|
state_hash_functions[COGL_PIPELINE_STATE_LAYERS_INDEX] =
|
||||||
_cogl_pipeline_hash_layers_state;
|
_cogl_pipeline_hash_layers_state;
|
||||||
state_hash_functions[COGL_PIPELINE_STATE_ALPHA_FUNC_INDEX] =
|
state_hash_functions[COGL_PIPELINE_STATE_ALPHA_FUNC_INDEX] =
|
||||||
@@ -2545,7 +2525,7 @@ _cogl_pipeline_init_state_hash_functions (void)
|
|||||||
|
|
||||||
{
|
{
|
||||||
/* So we get a big error if we forget to update this code! */
|
/* So we get a big error if we forget to update this code! */
|
||||||
_COGL_STATIC_ASSERT (COGL_PIPELINE_STATE_SPARSE_COUNT == 15,
|
_COGL_STATIC_ASSERT (COGL_PIPELINE_STATE_SPARSE_COUNT == 14,
|
||||||
"Make sure to install a hash function for "
|
"Make sure to install a hash function for "
|
||||||
"newly added pipeline state and update assert "
|
"newly added pipeline state and update assert "
|
||||||
"in _cogl_pipeline_init_state_hash_functions");
|
"in _cogl_pipeline_init_state_hash_functions");
|
||||||
|
@@ -47,6 +47,13 @@ _cogl_rectangle_immediate (CoglFramebuffer *framebuffer,
|
|||||||
float x_2,
|
float x_2,
|
||||||
float y_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
|
typedef struct _CoglMultiTexturedRect
|
||||||
{
|
{
|
||||||
const float *position; /* x0,y0,x1,y1 */
|
const float *position; /* x0,y0,x1,y1 */
|
||||||
|
@@ -708,42 +708,31 @@ _cogl_framebuffer_draw_multitextured_rectangles (
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_rectangle_immediate (CoglFramebuffer *framebuffer,
|
cogl_2d_primitives_immediate (CoglFramebuffer *framebuffer,
|
||||||
CoglPipeline *pipeline,
|
CoglPipeline *pipeline,
|
||||||
float x_1,
|
CoglVerticesMode mode,
|
||||||
float y_1,
|
const CoglVertexP2 *vertices,
|
||||||
float x_2,
|
unsigned int n_vertices)
|
||||||
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;
|
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;
|
CoglAttributeBuffer *attribute_buffer;
|
||||||
CoglAttribute *attributes[1];
|
CoglAttribute *attributes[1];
|
||||||
|
size_t vertices_size = sizeof (CoglVertexP2) * n_vertices;
|
||||||
|
|
||||||
attribute_buffer =
|
attribute_buffer =
|
||||||
cogl_attribute_buffer_new (ctx, sizeof (vertices), vertices);
|
cogl_attribute_buffer_new (ctx, vertices_size, vertices);
|
||||||
attributes[0] = cogl_attribute_new (attribute_buffer,
|
attributes[0] = cogl_attribute_new (attribute_buffer,
|
||||||
"cogl_position_in",
|
"cogl_position_in",
|
||||||
sizeof (float) * 2, /* stride */
|
sizeof (CoglVertexP2), /* stride */
|
||||||
0, /* offset */
|
0, /* offset */
|
||||||
2, /* n_components */
|
2, /* n_components */
|
||||||
COGL_ATTRIBUTE_TYPE_FLOAT);
|
COGL_ATTRIBUTE_TYPE_FLOAT);
|
||||||
|
|
||||||
_cogl_framebuffer_draw_attributes (framebuffer,
|
_cogl_framebuffer_draw_attributes (framebuffer,
|
||||||
pipeline,
|
pipeline,
|
||||||
COGL_VERTICES_MODE_TRIANGLE_STRIP,
|
mode,
|
||||||
0, /* first_index */
|
0, /* first_index */
|
||||||
4, /* n_vertices */
|
n_vertices,
|
||||||
attributes,
|
attributes,
|
||||||
1,
|
1,
|
||||||
COGL_DRAW_SKIP_JOURNAL_FLUSH |
|
COGL_DRAW_SKIP_JOURNAL_FLUSH |
|
||||||
@@ -754,3 +743,26 @@ _cogl_rectangle_immediate (CoglFramebuffer *framebuffer,
|
|||||||
cogl_object_unref (attributes[0]);
|
cogl_object_unref (attributes[0]);
|
||||||
cogl_object_unref (attribute_buffer);
|
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);
|
||||||
|
}
|
||||||
|
@@ -64,14 +64,10 @@ typedef enum
|
|||||||
* is first allocated or when it is shown or resized */
|
* is first allocated or when it is shown or resized */
|
||||||
COGL_PRIVATE_FEATURE_DIRTY_EVENTS,
|
COGL_PRIVATE_FEATURE_DIRTY_EVENTS,
|
||||||
COGL_PRIVATE_FEATURE_ENABLE_PROGRAM_POINT_SIZE,
|
COGL_PRIVATE_FEATURE_ENABLE_PROGRAM_POINT_SIZE,
|
||||||
/* These features let us avoid conditioning code based on the exact
|
/* This feature allows for explicitly selecting a GL-based backend,
|
||||||
* driver being used and instead check for broad opengl feature
|
* as opposed to nop or (in the future) Vulkan.
|
||||||
* sets that can be shared by several GL apis */
|
*/
|
||||||
COGL_PRIVATE_FEATURE_ANY_GL,
|
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
|
COGL_N_PRIVATE_FEATURES
|
||||||
} CoglPrivateFeature;
|
} CoglPrivateFeature;
|
||||||
|
@@ -40,10 +40,6 @@
|
|||||||
#include "cogl-closure-list-private.h"
|
#include "cogl-closure-list-private.h"
|
||||||
#include "winsys/cogl-winsys-private.h"
|
#include "winsys/cogl-winsys-private.h"
|
||||||
|
|
||||||
#ifdef COGL_HAS_XLIB_SUPPORT
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef const CoglWinsysVtable *(*CoglCustomWinsysVtableGetter) (CoglRenderer *renderer);
|
typedef const CoglWinsysVtable *(*CoglCustomWinsysVtableGetter) (CoglRenderer *renderer);
|
||||||
|
|
||||||
struct _CoglRenderer
|
struct _CoglRenderer
|
||||||
|
@@ -91,8 +91,6 @@ static CoglDriverDescription _cogl_drivers[] =
|
|||||||
COGL_DRIVER_GL,
|
COGL_DRIVER_GL,
|
||||||
"gl",
|
"gl",
|
||||||
{ COGL_PRIVATE_FEATURE_ANY_GL,
|
{ COGL_PRIVATE_FEATURE_ANY_GL,
|
||||||
COGL_PRIVATE_FEATURE_GL_FIXED,
|
|
||||||
COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
|
|
||||||
-1 },
|
-1 },
|
||||||
&_cogl_driver_gl,
|
&_cogl_driver_gl,
|
||||||
&_cogl_texture_driver_gl,
|
&_cogl_texture_driver_gl,
|
||||||
@@ -102,7 +100,6 @@ static CoglDriverDescription _cogl_drivers[] =
|
|||||||
COGL_DRIVER_GL3,
|
COGL_DRIVER_GL3,
|
||||||
"gl3",
|
"gl3",
|
||||||
{ COGL_PRIVATE_FEATURE_ANY_GL,
|
{ COGL_PRIVATE_FEATURE_ANY_GL,
|
||||||
COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
|
|
||||||
-1 },
|
-1 },
|
||||||
&_cogl_driver_gl,
|
&_cogl_driver_gl,
|
||||||
&_cogl_texture_driver_gl,
|
&_cogl_texture_driver_gl,
|
||||||
@@ -114,8 +111,6 @@ static CoglDriverDescription _cogl_drivers[] =
|
|||||||
COGL_DRIVER_GLES2,
|
COGL_DRIVER_GLES2,
|
||||||
"gles2",
|
"gles2",
|
||||||
{ COGL_PRIVATE_FEATURE_ANY_GL,
|
{ COGL_PRIVATE_FEATURE_ANY_GL,
|
||||||
COGL_PRIVATE_FEATURE_GL_EMBEDDED,
|
|
||||||
COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
|
|
||||||
-1 },
|
-1 },
|
||||||
&_cogl_driver_gles,
|
&_cogl_driver_gles,
|
||||||
&_cogl_texture_driver_gles,
|
&_cogl_texture_driver_gles,
|
||||||
|
@@ -59,8 +59,7 @@ toggle_builtin_attribute_enabled_cb (int bit_num, void *user_data)
|
|||||||
ForeachChangedBitState *state = user_data;
|
ForeachChangedBitState *state = user_data;
|
||||||
CoglContext *context = state->context;
|
CoglContext *context = state->context;
|
||||||
|
|
||||||
g_return_val_if_fail (_cogl_has_private_feature
|
g_return_val_if_fail (context->driver == COGL_DRIVER_GL,
|
||||||
(context, COGL_PRIVATE_FEATURE_GL_FIXED),
|
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GL
|
#ifdef HAVE_COGL_GL
|
||||||
@@ -98,8 +97,7 @@ toggle_texcood_attribute_enabled_cb (int bit_num, void *user_data)
|
|||||||
ForeachChangedBitState *state = user_data;
|
ForeachChangedBitState *state = user_data;
|
||||||
CoglContext *context = state->context;
|
CoglContext *context = state->context;
|
||||||
|
|
||||||
g_return_val_if_fail (_cogl_has_private_feature
|
g_return_val_if_fail (context->driver == COGL_DRIVER_GL,
|
||||||
(context, COGL_PRIVATE_FEATURE_GL_FIXED),
|
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GL
|
#ifdef HAVE_COGL_GL
|
||||||
|
@@ -124,6 +124,7 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
|
|||||||
CoglMatrix matrix;
|
CoglMatrix matrix;
|
||||||
int num_rectangles = cairo_region_num_rectangles (region);
|
int num_rectangles = cairo_region_num_rectangles (region);
|
||||||
int i;
|
int i;
|
||||||
|
CoglVertexP2 *vertices;
|
||||||
|
|
||||||
/* NB: This can be called while flushing the journal so we need
|
/* NB: This can be called while flushing the journal so we need
|
||||||
* to be very conservative with what state we change.
|
* to be very conservative with what state we change.
|
||||||
@@ -167,31 +168,50 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
|
|||||||
GE( ctx, glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE) );
|
GE( ctx, glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vertices = g_alloca (sizeof (CoglVertexP2) * num_rectangles * 6);
|
||||||
|
|
||||||
for (i = 0; i < num_rectangles; i++)
|
for (i = 0; i < num_rectangles; i++)
|
||||||
{
|
{
|
||||||
cairo_rectangle_int_t rect;
|
cairo_rectangle_int_t rect;
|
||||||
float tl[4], br[4];
|
float x1, y1, z1, w1;
|
||||||
|
float x2, y2, z2, w2;
|
||||||
|
CoglVertexP2 *v = vertices + i * 6;
|
||||||
|
|
||||||
cairo_region_get_rectangle (region, i, &rect);
|
cairo_region_get_rectangle (region, i, &rect);
|
||||||
|
|
||||||
tl[0] = rect.x;
|
x1 = rect.x;
|
||||||
tl[1] = rect.y;
|
y1 = rect.y;
|
||||||
tl[2] = 0.;
|
z1 = 0.f;
|
||||||
tl[3] = 1.;
|
w1 = 1.f;
|
||||||
|
|
||||||
br[0] = rect.x + rect.width;
|
x2 = rect.x + rect.width;
|
||||||
br[1] = rect.y + rect.height;
|
y2 = rect.y + rect.height;
|
||||||
br[2] = 0.;
|
z2 = 0.f;
|
||||||
br[3] = 1.;
|
w2 = 1.f;
|
||||||
|
|
||||||
cogl_matrix_transform_point (&matrix, &tl[0], &tl[1], &tl[2], &tl[3]);
|
cogl_matrix_transform_point (&matrix, &x1, &y1, &z1, &w1);
|
||||||
cogl_matrix_transform_point (&matrix, &br[0], &br[1], &br[2], &br[3]);
|
cogl_matrix_transform_point (&matrix, &x2, &y2, &z2, &w2);
|
||||||
|
|
||||||
_cogl_rectangle_immediate (framebuffer,
|
v[0].x = x1;
|
||||||
ctx->stencil_pipeline,
|
v[0].y = y1;
|
||||||
tl[0], tl[1], br[0], br[1]);
|
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_2d_primitives_immediate (framebuffer,
|
||||||
|
ctx->stencil_pipeline,
|
||||||
|
COGL_VERTICES_MODE_TRIANGLES,
|
||||||
|
vertices,
|
||||||
|
6 * num_rectangles);
|
||||||
|
|
||||||
if (merge)
|
if (merge)
|
||||||
{
|
{
|
||||||
/* Subtract one from all pixels in the stencil buffer so that
|
/* Subtract one from all pixels in the stencil buffer so that
|
||||||
|
@@ -106,6 +106,9 @@
|
|||||||
#ifndef GL_PACK_INVERT_MESA
|
#ifndef GL_PACK_INVERT_MESA
|
||||||
#define GL_PACK_INVERT_MESA 0x8758
|
#define GL_PACK_INVERT_MESA 0x8758
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef GL_PACK_REVERSE_ROW_ORDER_ANGLE
|
||||||
|
#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
|
||||||
|
#endif
|
||||||
#ifndef GL_BACK_LEFT
|
#ifndef GL_BACK_LEFT
|
||||||
#define GL_BACK_LEFT 0x0402
|
#define GL_BACK_LEFT 0x0402
|
||||||
#endif
|
#endif
|
||||||
@@ -1190,6 +1193,7 @@ _cogl_framebuffer_gl_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
|||||||
GLenum gl_intformat;
|
GLenum gl_intformat;
|
||||||
GLenum gl_format;
|
GLenum gl_format;
|
||||||
GLenum gl_type;
|
GLenum gl_type;
|
||||||
|
GLenum gl_pack_enum = GL_FALSE;
|
||||||
gboolean pack_invert_set;
|
gboolean pack_invert_set;
|
||||||
int status = FALSE;
|
int status = FALSE;
|
||||||
|
|
||||||
@@ -1220,7 +1224,12 @@ _cogl_framebuffer_gl_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
|||||||
(source & COGL_READ_PIXELS_NO_FLIP) == 0 &&
|
(source & COGL_READ_PIXELS_NO_FLIP) == 0 &&
|
||||||
!cogl_is_offscreen (framebuffer))
|
!cogl_is_offscreen (framebuffer))
|
||||||
{
|
{
|
||||||
GE (ctx, glPixelStorei (GL_PACK_INVERT_MESA, TRUE));
|
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));
|
||||||
pack_invert_set = TRUE;
|
pack_invert_set = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1414,7 +1423,7 @@ EXIT:
|
|||||||
* to interfere with other Cogl components so all other code can assume that
|
* to interfere with other Cogl components so all other code can assume that
|
||||||
* we leave the pack_invert state off. */
|
* we leave the pack_invert state off. */
|
||||||
if (pack_invert_set)
|
if (pack_invert_set)
|
||||||
GE (ctx, glPixelStorei (GL_PACK_INVERT_MESA, FALSE));
|
GE (ctx, glPixelStorei (gl_pack_enum, FALSE));
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@@ -127,7 +127,7 @@ CoglTextureUnit *
|
|||||||
_cogl_get_texture_unit (int index_);
|
_cogl_get_texture_unit (int index_);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_destroy_texture_units (void);
|
_cogl_destroy_texture_units (CoglContext *ctx);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_set_active_texture_unit (int unit_index);
|
_cogl_set_active_texture_unit (int unit_index);
|
||||||
|
@@ -116,12 +116,10 @@ _cogl_get_texture_unit (int index_)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_destroy_texture_units (void)
|
_cogl_destroy_texture_units (CoglContext *ctx)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
|
||||||
|
|
||||||
for (i = 0; i < ctx->texture_units->len; i++)
|
for (i = 0; i < ctx->texture_units->len; i++)
|
||||||
{
|
{
|
||||||
CoglTextureUnit *unit =
|
CoglTextureUnit *unit =
|
||||||
@@ -309,7 +307,7 @@ flush_depth_state (CoglContext *ctx,
|
|||||||
if ((ctx->depth_range_near_cache != depth_state->range_near ||
|
if ((ctx->depth_range_near_cache != depth_state->range_near ||
|
||||||
ctx->depth_range_far_cache != depth_state->range_far))
|
ctx->depth_range_far_cache != depth_state->range_far))
|
||||||
{
|
{
|
||||||
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
|
if (ctx->driver == COGL_DRIVER_GLES2)
|
||||||
GE (ctx, glDepthRangef (depth_state->range_near,
|
GE (ctx, glDepthRangef (depth_state->range_near,
|
||||||
depth_state->range_far));
|
depth_state->range_far));
|
||||||
else
|
else
|
||||||
@@ -362,8 +360,7 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state (
|
|||||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||||
|
|
||||||
/* On GLES2 we'll flush the color later */
|
/* On GLES2 we'll flush the color later */
|
||||||
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED) &&
|
if (ctx->driver == COGL_DRIVER_GL && !with_color_attrib)
|
||||||
!with_color_attrib)
|
|
||||||
{
|
{
|
||||||
if ((pipelines_difference & COGL_PIPELINE_STATE_COLOR) ||
|
if ((pipelines_difference & COGL_PIPELINE_STATE_COLOR) ||
|
||||||
/* Assume if we were previously told to skip the color, then
|
/* Assume if we were previously told to skip the color, then
|
||||||
@@ -538,7 +535,7 @@ get_max_activateable_texture_units (void)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GL
|
#ifdef HAVE_COGL_GL
|
||||||
if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
|
if (ctx->driver != COGL_DRIVER_GLES2)
|
||||||
{
|
{
|
||||||
/* GL_MAX_TEXTURE_COORDS defines the number of texture coordinates
|
/* GL_MAX_TEXTURE_COORDS defines the number of texture coordinates
|
||||||
* that can be uploaded (but doesn't necessarily relate to how many
|
* that can be uploaded (but doesn't necessarily relate to how many
|
||||||
@@ -551,8 +548,7 @@ get_max_activateable_texture_units (void)
|
|||||||
#endif /* HAVE_COGL_GL */
|
#endif /* HAVE_COGL_GL */
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GLES2
|
#ifdef HAVE_COGL_GLES2
|
||||||
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED) &&
|
if (ctx->driver == COGL_DRIVER_GLES2)
|
||||||
_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE))
|
|
||||||
{
|
{
|
||||||
GE (ctx, glGetIntegerv (GL_MAX_VERTEX_ATTRIBS, values + n_values));
|
GE (ctx, glGetIntegerv (GL_MAX_VERTEX_ATTRIBS, values + n_values));
|
||||||
/* Two of the vertex attribs need to be used for the position
|
/* Two of the vertex attribs need to be used for the position
|
||||||
@@ -565,7 +561,7 @@ get_max_activateable_texture_units (void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GL
|
#ifdef HAVE_COGL_GL
|
||||||
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED))
|
if (ctx->driver == COGL_DRIVER_GL)
|
||||||
{
|
{
|
||||||
/* GL_MAX_TEXTURE_UNITS defines the number of units that are
|
/* GL_MAX_TEXTURE_UNITS defines the number of units that are
|
||||||
usable from the fixed function pipeline, therefore it isn't
|
usable from the fixed function pipeline, therefore it isn't
|
||||||
@@ -697,7 +693,7 @@ flush_layers_common_gl_state_cb (CoglPipelineLayer *layer, void *user_data)
|
|||||||
* glsl progend.
|
* glsl progend.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_COGL_GL
|
#ifdef HAVE_COGL_GL
|
||||||
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED) &&
|
if (ctx->driver == COGL_DRIVER_GL &&
|
||||||
(layers_difference & COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS))
|
(layers_difference & COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS))
|
||||||
{
|
{
|
||||||
CoglPipelineState change = COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS;
|
CoglPipelineState change = COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS;
|
||||||
|
@@ -76,6 +76,13 @@ _cogl_gl_error_to_string (GLenum error_code);
|
|||||||
|
|
||||||
#endif /* COGL_GL_DEBUG */
|
#endif /* COGL_GL_DEBUG */
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
_cogl_driver_gl_context_init (CoglContext *context,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_driver_gl_context_deinit (CoglContext *context);
|
||||||
|
|
||||||
GLenum
|
GLenum
|
||||||
_cogl_gl_util_get_error (CoglContext *ctx);
|
_cogl_gl_util_get_error (CoglContext *ctx);
|
||||||
|
|
||||||
|
@@ -42,6 +42,61 @@
|
|||||||
#include "driver/gl/cogl-attribute-gl-private.h"
|
#include "driver/gl/cogl-attribute-gl-private.h"
|
||||||
#include "driver/gl/cogl-clip-stack-gl-private.h"
|
#include "driver/gl/cogl-clip-stack-gl-private.h"
|
||||||
#include "driver/gl/cogl-buffer-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
|
static gboolean
|
||||||
_cogl_driver_pixel_format_from_gl_internal (CoglContext *context,
|
_cogl_driver_pixel_format_from_gl_internal (CoglContext *context,
|
||||||
@@ -449,7 +504,6 @@ _cogl_driver_update_features (CoglContext *ctx,
|
|||||||
if (ctx->driver == COGL_DRIVER_GL)
|
if (ctx->driver == COGL_DRIVER_GL)
|
||||||
{
|
{
|
||||||
/* Features which are not available in GL 3 */
|
/* 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_TEST, TRUE);
|
||||||
COGL_FLAGS_SET (private_features,
|
COGL_FLAGS_SET (private_features,
|
||||||
COGL_PRIVATE_FEATURE_ALPHA_TEXTURES, TRUE);
|
COGL_PRIVATE_FEATURE_ALPHA_TEXTURES, TRUE);
|
||||||
@@ -499,6 +553,8 @@ _cogl_driver_update_features (CoglContext *ctx,
|
|||||||
const CoglDriverVtable
|
const CoglDriverVtable
|
||||||
_cogl_driver_gl =
|
_cogl_driver_gl =
|
||||||
{
|
{
|
||||||
|
_cogl_driver_gl_context_init,
|
||||||
|
_cogl_driver_gl_context_deinit,
|
||||||
_cogl_driver_pixel_format_from_gl_internal,
|
_cogl_driver_pixel_format_from_gl_internal,
|
||||||
_cogl_driver_pixel_format_to_gl,
|
_cogl_driver_pixel_format_to_gl,
|
||||||
_cogl_driver_update_features,
|
_cogl_driver_update_features,
|
||||||
|
@@ -300,6 +300,10 @@ _cogl_driver_update_features (CoglContext *context,
|
|||||||
gl_minor,
|
gl_minor,
|
||||||
gl_extensions);
|
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
|
/* Note GLES 2 core doesn't support mipmaps for npot textures or
|
||||||
* repeat modes other than CLAMP_TO_EDGE. */
|
* repeat modes other than CLAMP_TO_EDGE. */
|
||||||
|
|
||||||
@@ -378,6 +382,8 @@ _cogl_driver_texture_2d_is_get_data_supported (CoglTexture2D *tex_2d)
|
|||||||
const CoglDriverVtable
|
const CoglDriverVtable
|
||||||
_cogl_driver_gles =
|
_cogl_driver_gles =
|
||||||
{
|
{
|
||||||
|
_cogl_driver_gl_context_init,
|
||||||
|
_cogl_driver_gl_context_deinit,
|
||||||
_cogl_driver_pixel_format_from_gl_internal,
|
_cogl_driver_pixel_format_from_gl_internal,
|
||||||
_cogl_driver_pixel_format_to_gl,
|
_cogl_driver_pixel_format_to_gl,
|
||||||
_cogl_driver_update_features,
|
_cogl_driver_update_features,
|
||||||
|
@@ -52,9 +52,23 @@ _cogl_driver_update_features (CoglContext *ctx,
|
|||||||
return TRUE;
|
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
|
const CoglDriverVtable
|
||||||
_cogl_driver_nop =
|
_cogl_driver_nop =
|
||||||
{
|
{
|
||||||
|
_cogl_driver_nop_context_init,
|
||||||
|
_cogl_driver_nop_context_deinit,
|
||||||
NULL, /* pixel_format_from_gl_internal */
|
NULL, /* pixel_format_from_gl_internal */
|
||||||
NULL, /* pixel_format_to_gl */
|
NULL, /* pixel_format_to_gl */
|
||||||
_cogl_driver_update_features,
|
_cogl_driver_update_features,
|
||||||
|
@@ -376,11 +376,11 @@ endif
|
|||||||
|
|
||||||
if have_glx
|
if have_glx
|
||||||
cogl_nonintrospected_headers += [
|
cogl_nonintrospected_headers += [
|
||||||
'cogl-glx.h',
|
'winsys/cogl-glx.h',
|
||||||
]
|
]
|
||||||
cogl_sources += [
|
cogl_sources += [
|
||||||
'cogl-glx-display-private.h',
|
'winsys/cogl-glx-display-private.h',
|
||||||
'cogl-glx-renderer-private.h',
|
'winsys/cogl-glx-renderer-private.h',
|
||||||
'winsys/cogl-winsys-glx-feature-functions.h',
|
'winsys/cogl-winsys-glx-feature-functions.h',
|
||||||
'winsys/cogl-winsys-glx-private.h',
|
'winsys/cogl-winsys-glx-private.h',
|
||||||
'winsys/cogl-winsys-glx.c',
|
'winsys/cogl-winsys-glx.c',
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
project('mutter', 'c',
|
project('mutter', 'c',
|
||||||
version: '3.35.1',
|
version: '3.35.3',
|
||||||
meson_version: '>= 0.50.0',
|
meson_version: '>= 0.50.0',
|
||||||
license: 'GPLv2+'
|
license: 'GPLv2+'
|
||||||
)
|
)
|
||||||
|
212
po/zh_CN.po
212
po/zh_CN.po
@@ -1,5 +1,5 @@
|
|||||||
# Simplified Chinese translation of mutter.
|
# Simplified Chinese translation of mutter.
|
||||||
# Copyright (C) 2012-2018 mutter's COPYRIGHT HOLDER
|
# Copyright (C) 2012-2019 mutter's COPYRIGHT HOLDER
|
||||||
# This file is distributed under the same license as the mutter package.
|
# This file is distributed under the same license as the mutter package.
|
||||||
# Sun G11n <gnome_int_l10n@ireland.sun.com>, 2002.
|
# Sun G11n <gnome_int_l10n@ireland.sun.com>, 2002.
|
||||||
# He Qiangqiang <carton@linux.net.cn>, 2002
|
# He Qiangqiang <carton@linux.net.cn>, 2002
|
||||||
@@ -13,14 +13,15 @@
|
|||||||
# Tong Hui <tonghuix@gmail.com>, 2014.
|
# Tong Hui <tonghuix@gmail.com>, 2014.
|
||||||
# Mandy Wang <wangmychn@gmail.com>, 2017.
|
# Mandy Wang <wangmychn@gmail.com>, 2017.
|
||||||
# Mingcong Bai <jeffbai@aosc.xyz>, 2017.
|
# Mingcong Bai <jeffbai@aosc.xyz>, 2017.
|
||||||
# Dingzhong Chen <wsxy162@gmail.com>, 2017, 2018.
|
# liushuyu <liushuyu011@gmail.com>, 2018.
|
||||||
|
# Dingzhong Chen <wsxy162@gmail.com>, 2017-2019.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: mutter master\n"
|
"Project-Id-Version: mutter master\n"
|
||||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
|
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
|
||||||
"POT-Creation-Date: 2018-02-09 13:01+0000\n"
|
"POT-Creation-Date: 2019-08-31 12:39+0000\n"
|
||||||
"PO-Revision-Date: 2018-02-16 22:22+0800\n"
|
"PO-Revision-Date: 2019-09-11 00:10+0800\n"
|
||||||
"Last-Translator: Dingzhong Chen <wsxy162@gmail.com>\n"
|
"Last-Translator: Dingzhong Chen <wsxy162@gmail.com>\n"
|
||||||
"Language-Team: Chinese (China) <i18n-zh@googlegroups.com>\n"
|
"Language-Team: Chinese (China) <i18n-zh@googlegroups.com>\n"
|
||||||
"Language: zh_CN\n"
|
"Language: zh_CN\n"
|
||||||
@@ -28,7 +29,7 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
"X-Generator: Gtranslator 2.91.7\n"
|
"X-Generator: Gtranslator 3.32.1\n"
|
||||||
|
|
||||||
#: data/50-mutter-navigation.xml:6
|
#: data/50-mutter-navigation.xml:6
|
||||||
msgid "Navigation"
|
msgid "Navigation"
|
||||||
@@ -365,7 +366,7 @@ msgstr "自动最大化接近显示器大小的窗口"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"If enabled, new windows that are initially the size of the monitor "
|
"If enabled, new windows that are initially the size of the monitor "
|
||||||
"automatically get maximized."
|
"automatically get maximized."
|
||||||
msgstr "如果启用,初始时为显示器大小的新窗口将自动最大化"
|
msgstr "如果启用,初始时为显示器大小的新窗口将自动最大化。"
|
||||||
|
|
||||||
#: data/org.gnome.mutter.gschema.xml.in:98
|
#: data/org.gnome.mutter.gschema.xml.in:98
|
||||||
msgid "Place new windows in the center"
|
msgid "Place new windows in the center"
|
||||||
@@ -379,7 +380,7 @@ msgstr "为 true 时,新窗口将总是置于此显示器已激活屏幕的中
|
|||||||
|
|
||||||
#: data/org.gnome.mutter.gschema.xml.in:107
|
#: data/org.gnome.mutter.gschema.xml.in:107
|
||||||
msgid "Enable experimental features"
|
msgid "Enable experimental features"
|
||||||
msgstr "开启实验性特性"
|
msgstr "开启实验性功能"
|
||||||
|
|
||||||
#: data/org.gnome.mutter.gschema.xml.in:108
|
#: data/org.gnome.mutter.gschema.xml.in:108
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -390,34 +391,40 @@ msgid ""
|
|||||||
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
|
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
|
||||||
"mutter default to layout logical monitors in a logical pixel coordinate "
|
"mutter default to layout logical monitors in a logical pixel coordinate "
|
||||||
"space, while scaling monitor framebuffers instead of window content, to "
|
"space, while scaling monitor framebuffers instead of window content, to "
|
||||||
"manage HiDPI monitors. Does not require a restart. • “remote-desktop” — "
|
"manage HiDPI monitors. Does not require a restart. • “rt-scheduler” — makes "
|
||||||
"enables remote desktop support. To support remote desktop with screen "
|
"mutter request a low priority real-time scheduling. The executable or user "
|
||||||
"sharing, “screen-cast” must also be enabled. • “screen-cast” — enables "
|
"must have CAP_SYS_NICE. Requires a restart. • “autostart-xwayland” — "
|
||||||
"screen cast support."
|
"initializes Xwayland lazily if there are X11 clients. Requires restart."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"要启用实验性特性,请将如下特性关键字添加到列表中。特性是否要求重启合成器取决"
|
"要启用实验性功能,请将如下功能关键字添加到列表中。功能是否要重启合成器取决于"
|
||||||
"于特性本身。实验性特性不需启用即可配置和使用。请不要将实验性特性作为未来保障"
|
"功能本身。任何实验性功能都不一定仍旧可用和可配置。请不要期望此设置中的实验性"
|
||||||
"的基础。当前可用的关键字:• “monitor-config-manager” — 使用新的监视器配置系"
|
"功能将来有所保障。当前可用的关键字:•“scale-monitor-framebuffer”——让 Mutter "
|
||||||
"统,用于替代老的系统。启用此特性将打开一个上级配置 API 以用于配置应用程序,并"
|
"默认基于逻辑像素座标排布多屏幕,并同时缩放监视器帧缓冲器而不是窗口内容,以便"
|
||||||
"可提供基于每屏幕的逻辑缩放功能。• “scale-monitor-framebuffer” — 让 Mutter 默"
|
"管理 HiDPI 监视器。该功能不需要重启来生效。•“rt-scheduler”——让 Mutter 请求低"
|
||||||
"认基于像素座标排布多屏幕,并同时缩放监视器帧缓冲器而不是窗口内容,以便管理 "
|
"优先级的实时调度。可执行文件或用户必须有 CAP_SYS_NICE。需要重启。•“autostart-"
|
||||||
"HiDPI 监视器。该特性不需要重启来生效。• “remote-desktop” — 启用远程桌面支持。"
|
"xwayland”——如果存在 X11 客户端则延迟初始化 Xwayland。需要重启。"
|
||||||
"要支持远程桌面共享,还需要设置“screen-cast”。 • “screen-cast” — 启用屏幕广播"
|
|
||||||
"支持。"
|
|
||||||
|
|
||||||
#: data/org.gnome.mutter.gschema.xml.in:145
|
#: 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
|
||||||
msgid "Select window from tab popup"
|
msgid "Select window from tab popup"
|
||||||
msgstr "从 Tab 轮换弹出界面选择窗口"
|
msgstr "从 Tab 轮换弹出界面选择窗口"
|
||||||
|
|
||||||
#: data/org.gnome.mutter.gschema.xml.in:150
|
#: data/org.gnome.mutter.gschema.xml.in:160
|
||||||
msgid "Cancel tab popup"
|
msgid "Cancel tab popup"
|
||||||
msgstr "取消 Tab 轮换弹出"
|
msgstr "取消 Tab 轮换弹出"
|
||||||
|
|
||||||
#: data/org.gnome.mutter.gschema.xml.in:155
|
#: data/org.gnome.mutter.gschema.xml.in:165
|
||||||
msgid "Switch monitor configurations"
|
msgid "Switch monitor configurations"
|
||||||
msgstr "切换显示器配置"
|
msgstr "切换显示器配置"
|
||||||
|
|
||||||
#: data/org.gnome.mutter.gschema.xml.in:160
|
#: data/org.gnome.mutter.gschema.xml.in:170
|
||||||
msgid "Rotates the built-in monitor configuration"
|
msgid "Rotates the built-in monitor configuration"
|
||||||
msgstr "旋转内置显示器配置"
|
msgstr "旋转内置显示器配置"
|
||||||
|
|
||||||
@@ -474,26 +481,33 @@ msgid "Re-enable shortcuts"
|
|||||||
msgstr "重新启用快捷键"
|
msgstr "重新启用快捷键"
|
||||||
|
|
||||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:64
|
#: data/org.gnome.mutter.wayland.gschema.xml.in:64
|
||||||
msgid "Allow grabs with Xwayland"
|
msgid "Allow X11 grabs to lock keyboard focus with Xwayland"
|
||||||
msgstr "允许用 Xwayland 捕获"
|
msgstr "允许 X11 捕获以锁定 Xwayland 的键盘焦点"
|
||||||
|
|
||||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:65
|
#: data/org.gnome.mutter.wayland.gschema.xml.in:65
|
||||||
msgid ""
|
msgid ""
|
||||||
"Allow keyboard grabs issued by X11 applications running in Xwayland to be "
|
"Allow all keyboard events to be routed to X11 “override redirect” windows "
|
||||||
"taken into account. For a X11 grab to be taken into account under Wayland, "
|
"with a grab when running in Xwayland. This option is to support X11 clients "
|
||||||
"the client must also either send a specific X11 ClientMessage to the root "
|
"which map an “override redirect” window (which do not receive keyboard "
|
||||||
"window or be among the applications white-listed in key “xwayland-grab-"
|
"focus) and issue a keyboard grab to force all keyboard events to that "
|
||||||
"access-rules”."
|
"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”."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"允许考虑运行在 Xwayland 中的 X11 应用程序发起的键盘捕获。在 Wayland 下,为了"
|
"当运行在 Xwayland 下时,允许通过捕获,发送所有的键盘事件到 X11“覆盖重定向”窗"
|
||||||
"将 X11 捕获考虑在内,客户端也必须发送一个指定的 X11 ClientMessage 到根窗口,"
|
"口。此选项是为了支持(收不到键盘焦点的)“覆盖重定向”窗口所映射的 X11 客户端,"
|
||||||
"或是包含进“xwayland-grab-access-rules”键成为其中一个白名单应用程序。"
|
"并发起键盘捕获强制所有键盘事件进到那个窗口。此选项比较少用,并且对常规 X11 窗"
|
||||||
|
"口没有影响,这些窗口在正常情况下可以收到键盘焦点。在 Wayland 下,为了 X11 捕"
|
||||||
|
"获能够工作,客户端也必须发送一个指定的 X11 ClientMessage 到根窗口,或是包含"
|
||||||
|
"进“xwayland-grab-access-rules”键成为其中一个白名单应用程序。"
|
||||||
|
|
||||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:77
|
#: data/org.gnome.mutter.wayland.gschema.xml.in:84
|
||||||
msgid "Xwayland applications allowed to issue keyboard grabs"
|
msgid "Xwayland applications allowed to issue keyboard grabs"
|
||||||
msgstr "允许发起键盘捕获的 Xwayland 应用程序"
|
msgstr "允许发起键盘捕获的 Xwayland 应用程序"
|
||||||
|
|
||||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:78
|
#: data/org.gnome.mutter.wayland.gschema.xml.in:85
|
||||||
msgid ""
|
msgid ""
|
||||||
"List the resource names or resource class of X11 windows either allowed or "
|
"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 "
|
"not allowed to issue X11 keyboard grabs under Xwayland. The resource name or "
|
||||||
@@ -516,7 +530,7 @@ msgstr ""
|
|||||||
#. TRANSLATORS: This string refers to a button that switches between
|
#. TRANSLATORS: This string refers to a button that switches between
|
||||||
#. * different modes.
|
#. * different modes.
|
||||||
#.
|
#.
|
||||||
#: src/backends/meta-input-settings.c:2260
|
#: src/backends/meta-input-settings.c:2531
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Mode Switch (Group %d)"
|
msgid "Mode Switch (Group %d)"
|
||||||
msgstr "模式切换(组别 %d)"
|
msgstr "模式切换(组别 %d)"
|
||||||
@@ -524,116 +538,127 @@ msgstr "模式切换(组别 %d)"
|
|||||||
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
|
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
|
||||||
#. * mapping through the available outputs.
|
#. * mapping through the available outputs.
|
||||||
#.
|
#.
|
||||||
#: src/backends/meta-input-settings.c:2283
|
#: src/backends/meta-input-settings.c:2554
|
||||||
msgid "Switch monitor"
|
msgid "Switch monitor"
|
||||||
msgstr "切换显示器"
|
msgstr "切换显示器"
|
||||||
|
|
||||||
#: src/backends/meta-input-settings.c:2285
|
#: src/backends/meta-input-settings.c:2556
|
||||||
msgid "Show on-screen help"
|
msgid "Show on-screen help"
|
||||||
msgstr "显示在屏帮助"
|
msgstr "显示在屏帮助"
|
||||||
|
|
||||||
#: src/backends/meta-monitor-manager.c:900
|
#: src/backends/meta-monitor.c:223
|
||||||
msgid "Built-in display"
|
msgid "Built-in display"
|
||||||
msgstr "内置显示器"
|
msgstr "内置显示器"
|
||||||
|
|
||||||
#: src/backends/meta-monitor-manager.c:923
|
#: src/backends/meta-monitor.c:252
|
||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr "未知"
|
msgstr "未知"
|
||||||
|
|
||||||
#: src/backends/meta-monitor-manager.c:925
|
#: src/backends/meta-monitor.c:254
|
||||||
msgid "Unknown Display"
|
msgid "Unknown Display"
|
||||||
msgstr "未知的 Display"
|
msgstr "未知的 Display"
|
||||||
|
|
||||||
#. TRANSLATORS: this is a monitor vendor name, followed by a
|
#: src/backends/meta-monitor.c:262
|
||||||
#. * size in inches, like 'Dell 15"'
|
|
||||||
#.
|
|
||||||
#: src/backends/meta-monitor-manager.c:933
|
|
||||||
#, c-format
|
#, c-format
|
||||||
|
msgctxt ""
|
||||||
|
"This is a monitor vendor name, followed by a size in inches, like 'Dell 15\"'"
|
||||||
msgid "%s %s"
|
msgid "%s %s"
|
||||||
msgstr "%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;
|
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||||
#. * we have no way to get it to exit
|
#. * we have no way to get it to exit
|
||||||
#: src/compositor/compositor.c:481
|
#: src/compositor/compositor.c:509
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Another compositing manager is already running on screen %i on display “%s”."
|
"Another compositing manager is already running on screen %i on display “%s”."
|
||||||
msgstr "显示器 %2$s 的屏幕 %1$i 上已有另外一个混成窗口管理器正在运行。"
|
msgstr "显示器 %2$s 的屏幕 %1$i 上已有另外一个混成窗口管理器正在运行。"
|
||||||
|
|
||||||
#: src/core/bell.c:194
|
#: src/core/bell.c:192
|
||||||
msgid "Bell event"
|
msgid "Bell event"
|
||||||
msgstr "响铃事件"
|
msgstr "响铃事件"
|
||||||
|
|
||||||
#: src/core/display.c:608
|
#: src/core/main.c:186
|
||||||
#, 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"
|
msgid "Disable connection to session manager"
|
||||||
msgstr "禁止连接到会话管理器"
|
msgstr "禁止连接到会话管理器"
|
||||||
|
|
||||||
#: src/core/main.c:196
|
#: src/core/main.c:192
|
||||||
msgid "Replace the running window manager"
|
msgid "Replace the running window manager"
|
||||||
msgstr "替换正在运行的窗口管理器"
|
msgstr "替换正在运行的窗口管理器"
|
||||||
|
|
||||||
#: src/core/main.c:202
|
#: src/core/main.c:198
|
||||||
msgid "Specify session management ID"
|
msgid "Specify session management ID"
|
||||||
msgstr "指定会话管理 ID"
|
msgstr "指定会话管理 ID"
|
||||||
|
|
||||||
#: src/core/main.c:207
|
#: src/core/main.c:203
|
||||||
msgid "X Display to use"
|
msgid "X Display to use"
|
||||||
msgstr "要使用的 X Display"
|
msgstr "要使用的 X Display"
|
||||||
|
|
||||||
#: src/core/main.c:213
|
#: src/core/main.c:209
|
||||||
msgid "Initialize session from savefile"
|
msgid "Initialize session from savefile"
|
||||||
msgstr "从保存文件中初始化会话"
|
msgstr "从保存文件中初始化会话"
|
||||||
|
|
||||||
#: src/core/main.c:219
|
#: src/core/main.c:215
|
||||||
msgid "Make X calls synchronous"
|
msgid "Make X calls synchronous"
|
||||||
msgstr "使 X 调用同步"
|
msgstr "使 X 调用同步"
|
||||||
|
|
||||||
#: src/core/main.c:226
|
#: src/core/main.c:222
|
||||||
msgid "Run as a wayland compositor"
|
msgid "Run as a wayland compositor"
|
||||||
msgstr "作为 wayland 混成管理器运行"
|
msgstr "以 wayland 合成器运行"
|
||||||
|
|
||||||
#: src/core/main.c:232
|
#: src/core/main.c:228
|
||||||
msgid "Run as a nested compositor"
|
msgid "Run as a nested compositor"
|
||||||
msgstr "作为嵌套混成器运行"
|
msgstr "以嵌套合成器运行"
|
||||||
|
|
||||||
#: src/core/main.c:240
|
#: src/core/main.c:234
|
||||||
|
msgid "Run wayland compositor without starting Xwayland"
|
||||||
|
msgstr "运行 wayland 合成器但不启动 Xwayland"
|
||||||
|
|
||||||
|
#: src/core/main.c:242
|
||||||
msgid "Run as a full display server, rather than nested"
|
msgid "Run as a full display server, rather than nested"
|
||||||
msgstr "以完整显示服务器方式运行,而不是以嵌套方式"
|
msgstr "以完整显示服务器方式运行,而不是以嵌套方式"
|
||||||
|
|
||||||
#: src/core/main.c:246
|
#: src/core/main.c:248
|
||||||
msgid "Run with X11 backend"
|
msgid "Run with X11 backend"
|
||||||
msgstr "以 X11 后端运行"
|
msgstr "以 X11 后端运行"
|
||||||
|
|
||||||
#. Translators: %s is a window title
|
#. Translators: %s is a window title
|
||||||
#: src/core/meta-close-dialog-default.c:147
|
#: src/core/meta-close-dialog-default.c:151
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "“%s” is not responding."
|
msgid "“%s” is not responding."
|
||||||
msgstr "“%s” 未响应。"
|
msgstr "“%s” 未响应。"
|
||||||
|
|
||||||
#: src/core/meta-close-dialog-default.c:149
|
#: src/core/meta-close-dialog-default.c:153
|
||||||
msgid "Application is not responding."
|
msgid "Application is not responding."
|
||||||
msgstr "应用程序未响应。"
|
msgstr "应用程序未响应。"
|
||||||
|
|
||||||
#: src/core/meta-close-dialog-default.c:154
|
#: src/core/meta-close-dialog-default.c:158
|
||||||
msgid ""
|
msgid ""
|
||||||
"You may choose to wait a short while for it to continue or force the "
|
"You may choose to wait a short while for it to continue or force the "
|
||||||
"application to quit entirely."
|
"application to quit entirely."
|
||||||
msgstr "您可以选择稍等一会儿,或者强制退出该应用程序。"
|
msgstr "您可以选择稍等一会儿,或者强制退出该应用程序。"
|
||||||
|
|
||||||
#: src/core/meta-close-dialog-default.c:161
|
#: src/core/meta-close-dialog-default.c:165
|
||||||
msgid "_Force Quit"
|
msgid "_Force Quit"
|
||||||
msgstr "强制退出(_F)"
|
msgstr "强制退出(_F)"
|
||||||
|
|
||||||
#: src/core/meta-close-dialog-default.c:161
|
#: src/core/meta-close-dialog-default.c:165
|
||||||
msgid "_Wait"
|
msgid "_Wait"
|
||||||
msgstr "等待(_W)"
|
msgstr "等待(_W)"
|
||||||
|
|
||||||
#: src/core/mutter.c:39
|
#: src/core/mutter.c:38
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"mutter %s\n"
|
"mutter %s\n"
|
||||||
@@ -647,20 +672,29 @@ msgstr ""
|
|||||||
"本软件为自由软件;版权条款请参见源码\n"
|
"本软件为自由软件;版权条款请参见源码\n"
|
||||||
"不存在任何保证;即便是对商业性或者特定目的的适应性也不作保证。\n"
|
"不存在任何保证;即便是对商业性或者特定目的的适应性也不作保证。\n"
|
||||||
|
|
||||||
#: src/core/mutter.c:53
|
#: src/core/mutter.c:52
|
||||||
msgid "Print version"
|
msgid "Print version"
|
||||||
msgstr "打印版本"
|
msgstr "打印版本"
|
||||||
|
|
||||||
#: src/core/mutter.c:59
|
#: src/core/mutter.c:58
|
||||||
msgid "Mutter plugin to use"
|
msgid "Mutter plugin to use"
|
||||||
msgstr "要使用的 Mutter 插件"
|
msgstr "要使用的 Mutter 插件"
|
||||||
|
|
||||||
#: src/core/prefs.c:1997
|
#: src/core/prefs.c:1849
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Workspace %d"
|
msgid "Workspace %d"
|
||||||
msgstr "工作区 %d"
|
msgstr "工作区 %d"
|
||||||
|
|
||||||
#: src/core/screen.c:583
|
#: 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
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Display “%s” already has a window manager; try using the --replace option to "
|
"Display “%s” already has a window manager; try using the --replace option to "
|
||||||
@@ -669,27 +703,32 @@ msgstr ""
|
|||||||
"Display“%s”已经有一个窗口管理器;请尝试使用 --replace 选项替换当前的窗口管理"
|
"Display“%s”已经有一个窗口管理器;请尝试使用 --replace 选项替换当前的窗口管理"
|
||||||
"器。"
|
"器。"
|
||||||
|
|
||||||
#: src/core/screen.c:668
|
#: 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
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Screen %d on display “%s” is invalid\n"
|
msgid "Screen %d on display “%s” is invalid\n"
|
||||||
msgstr "显示“%2$s”上的屏幕 %1$d 无效\n"
|
msgstr "显示“%2$s”上的屏幕 %1$d 无效\n"
|
||||||
|
|
||||||
#: src/core/util.c:120
|
#: src/x11/meta-x11-selection-input-stream.c:445
|
||||||
msgid "Mutter was compiled without support for verbose mode\n"
|
|
||||||
msgstr "Mutter 编译的时候没有加入详细模式的支持\n"
|
|
||||||
|
|
||||||
#: src/wayland/meta-wayland-tablet-pad.c:567
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Mode Switch: Mode %d"
|
msgid "Format %s not supported"
|
||||||
msgstr "模式切换:%d 模式"
|
msgstr "不支持 %s 格式"
|
||||||
|
|
||||||
#: src/x11/session.c:1818
|
#: src/x11/session.c:1821
|
||||||
msgid ""
|
msgid ""
|
||||||
"These windows do not support “save current setup” and will have to be "
|
"These windows do not support “save current setup” and will have to be "
|
||||||
"restarted manually next time you log in."
|
"restarted manually next time you log in."
|
||||||
msgstr "这些窗口不支持“保存当前设置”,并且在您下次登录时,必须手动重启它们。"
|
msgstr "这些窗口不支持“保存当前设置”,并且在您下次登录时,必须手动重启它们。"
|
||||||
|
|
||||||
#: src/x11/window-props.c:559
|
#: src/x11/window-props.c:569
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s (on %s)"
|
msgid "%s (on %s)"
|
||||||
msgstr "%s(于 %s)"
|
msgstr "%s(于 %s)"
|
||||||
@@ -1919,9 +1958,6 @@ msgstr "%s(于 %s)"
|
|||||||
#~ msgid "Commands to run in response to keybindings"
|
#~ msgid "Commands to run in response to keybindings"
|
||||||
#~ msgstr "按键组合对应的执行命令"
|
#~ msgstr "按键组合对应的执行命令"
|
||||||
|
|
||||||
#~ msgid "Compositing Manager"
|
|
||||||
#~ msgstr "复合管理器"
|
|
||||||
|
|
||||||
#~ msgid "Control how new windows get focus"
|
#~ msgid "Control how new windows get focus"
|
||||||
#~ msgstr "控制新窗口如何获得窗口"
|
#~ msgstr "控制新窗口如何获得窗口"
|
||||||
|
|
||||||
|
@@ -517,6 +517,33 @@ 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
|
static void
|
||||||
update_touchpad_tap_enabled (MetaInputSettings *input_settings,
|
update_touchpad_tap_enabled (MetaInputSettings *input_settings,
|
||||||
ClutterInputDevice *device)
|
ClutterInputDevice *device)
|
||||||
@@ -531,7 +558,8 @@ update_touchpad_tap_enabled (MetaInputSettings *input_settings,
|
|||||||
|
|
||||||
priv = meta_input_settings_get_instance_private (input_settings);
|
priv = meta_input_settings_get_instance_private (input_settings);
|
||||||
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
|
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
|
||||||
enabled = g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
|
enabled = device_is_tablet_touchpad (input_settings, device) ||
|
||||||
|
g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
|
||||||
|
|
||||||
if (device)
|
if (device)
|
||||||
{
|
{
|
||||||
@@ -561,7 +589,8 @@ update_touchpad_tap_and_drag_enabled (MetaInputSettings *input_settings,
|
|||||||
|
|
||||||
priv = meta_input_settings_get_instance_private (input_settings);
|
priv = meta_input_settings_get_instance_private (input_settings);
|
||||||
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
|
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
|
||||||
enabled = g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
|
enabled = device_is_tablet_touchpad (input_settings, device) ||
|
||||||
|
g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
|
||||||
|
|
||||||
if (device)
|
if (device)
|
||||||
{
|
{
|
||||||
|
@@ -225,11 +225,15 @@ meta_screen_cast_window_stream_initable_init (GInitable *initable,
|
|||||||
G_CALLBACK (on_window_unmanaged),
|
G_CALLBACK (on_window_unmanaged),
|
||||||
window_stream);
|
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
|
/* We cannot set the stream size to the exact size of the window, because
|
||||||
* windows can be resized, whereas streams cannot.
|
* windows can be resized, whereas streams cannot.
|
||||||
* So we set a size equals to the size of the logical monitor for the window.
|
* 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_width = logical_monitor->rect.width;
|
||||||
window_stream->logical_height = logical_monitor->rect.height;
|
window_stream->logical_height = logical_monitor->rect.height;
|
||||||
window_stream->stream_width = logical_monitor->rect.width * scale;
|
window_stream->stream_width = logical_monitor->rect.width * scale;
|
||||||
|
@@ -227,6 +227,7 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
|
|||||||
{
|
{
|
||||||
MetaLogicalMonitor *cur = current;
|
MetaLogicalMonitor *cur = current;
|
||||||
float x = cur_x, y = cur_y;
|
float x = cur_x, y = cur_y;
|
||||||
|
float target_x = cur_x, target_y = cur_y;
|
||||||
float dx = *dx_inout, dy = *dy_inout;
|
float dx = *dx_inout, dy = *dy_inout;
|
||||||
MetaDisplayDirection direction = -1;
|
MetaDisplayDirection direction = -1;
|
||||||
|
|
||||||
@@ -256,6 +257,9 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
|
|||||||
{ cur->rect.x + cur->rect.width, cur->rect.y + cur->rect.height }
|
{ 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 &&
|
if (direction != META_DISPLAY_RIGHT &&
|
||||||
meta_line2_intersects_with (&motion, &left, &intersection))
|
meta_line2_intersects_with (&motion, &left, &intersection))
|
||||||
direction = META_DISPLAY_LEFT;
|
direction = META_DISPLAY_LEFT;
|
||||||
@@ -269,12 +273,8 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
|
|||||||
meta_line2_intersects_with (&motion, &bottom, &intersection))
|
meta_line2_intersects_with (&motion, &bottom, &intersection))
|
||||||
direction = META_DISPLAY_DOWN;
|
direction = META_DISPLAY_DOWN;
|
||||||
else
|
else
|
||||||
{
|
|
||||||
/* We reached the dest logical monitor */
|
/* We reached the dest logical monitor */
|
||||||
x = motion.b.x;
|
|
||||||
y = motion.b.y;
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
x = intersection.x;
|
x = intersection.x;
|
||||||
y = intersection.y;
|
y = intersection.y;
|
||||||
@@ -285,8 +285,8 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
|
|||||||
cur, direction);
|
cur, direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
*dx_inout = x - cur_x;
|
*dx_inout = target_x - cur_x;
|
||||||
*dy_inout = y - cur_y;
|
*dy_inout = target_y - cur_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -1537,7 +1537,7 @@ process_device_event (MetaDeviceManagerNative *manager_evdev,
|
|||||||
angle_delta = libinput_event_gesture_get_angle_delta (gesture_event);
|
angle_delta = libinput_event_gesture_get_angle_delta (gesture_event);
|
||||||
scale = libinput_event_gesture_get_scale (gesture_event);
|
scale = libinput_event_gesture_get_scale (gesture_event);
|
||||||
dx = libinput_event_gesture_get_dx (gesture_event);
|
dx = libinput_event_gesture_get_dx (gesture_event);
|
||||||
dy = libinput_event_gesture_get_dx (gesture_event);
|
dy = libinput_event_gesture_get_dy (gesture_event);
|
||||||
|
|
||||||
notify_pinch_gesture_event (device,
|
notify_pinch_gesture_event (device,
|
||||||
CLUTTER_TOUCHPAD_GESTURE_PHASE_UPDATE,
|
CLUTTER_TOUCHPAD_GESTURE_PHASE_UPDATE,
|
||||||
|
@@ -957,20 +957,28 @@ meta_window_actor_cull_out (MetaCullable *cullable,
|
|||||||
|
|
||||||
meta_cullable_cull_out_children (cullable, unobscured_region, clip_region);
|
meta_cullable_cull_out_children (cullable, unobscured_region, clip_region);
|
||||||
|
|
||||||
if (unobscured_region && meta_window_actor_is_opaque (self))
|
if ((unobscured_region || clip_region) && meta_window_actor_is_opaque (self))
|
||||||
{
|
{
|
||||||
cairo_region_t *region = meta_window_get_frame_bounds (priv->window);
|
cairo_region_t *region = meta_window_get_frame_bounds (priv->window);
|
||||||
|
|
||||||
if (region)
|
if (region)
|
||||||
{
|
{
|
||||||
|
if (unobscured_region)
|
||||||
cairo_region_subtract (unobscured_region, region);
|
cairo_region_subtract (unobscured_region, region);
|
||||||
|
if (clip_region)
|
||||||
|
cairo_region_subtract (clip_region, region);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cairo_rectangle_int_t rect;
|
cairo_rectangle_int_t rect;
|
||||||
|
|
||||||
meta_window_get_frame_rect (priv->window, &rect);
|
meta_window_get_frame_rect (priv->window, &rect);
|
||||||
rect.x = rect.y = 0;
|
rect.x = rect.y = 0;
|
||||||
|
|
||||||
|
if (unobscured_region)
|
||||||
cairo_region_subtract_rectangle (unobscured_region, &rect);
|
cairo_region_subtract_rectangle (unobscured_region, &rect);
|
||||||
|
if (clip_region)
|
||||||
|
cairo_region_subtract_rectangle (clip_region, &rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -712,7 +712,9 @@ if have_profiler
|
|||||||
'backends/meta-profiler.h',
|
'backends/meta-profiler.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
dbus_interfaces_dir = join_paths(datadir, 'dbus-1', 'interfaces')
|
# 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')
|
||||||
sysprof3_dbus_file = join_paths(dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml')
|
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',
|
dbus_sysprof3_profiler_built_sources = gnome.gdbus_codegen('meta-dbus-sysprof3-profiler',
|
||||||
|
@@ -861,8 +861,8 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
|
|||||||
if (icon_name)
|
if (icon_name)
|
||||||
{
|
{
|
||||||
GtkIconTheme *theme = gtk_icon_theme_get_default ();
|
GtkIconTheme *theme = gtk_icon_theme_get_default ();
|
||||||
GtkIconInfo *info;
|
g_autoptr (GtkIconInfo) info = NULL;
|
||||||
GdkPixbuf *pixbuf;
|
g_autoptr (GdkPixbuf) pixbuf = NULL;
|
||||||
|
|
||||||
info = gtk_icon_theme_lookup_icon_for_scale (theme, icon_name,
|
info = gtk_icon_theme_lookup_icon_for_scale (theme, icon_name,
|
||||||
layout->icon_size, scale, 0);
|
layout->icon_size, scale, 0);
|
||||||
|
@@ -116,6 +116,7 @@ write_mimetypes_cb (GOutputStream *stream,
|
|||||||
|
|
||||||
g_output_stream_write_bytes_finish (stream, res, &error);
|
g_output_stream_write_bytes_finish (stream, res, &error);
|
||||||
g_output_stream_close (stream, NULL, NULL);
|
g_output_stream_close (stream, NULL, NULL);
|
||||||
|
g_object_unref (stream);
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user