shaped-texture: Use ints for sizes
They were int before entering MetaShapedTexture, used as ints in the cairo regions and rectangles, so there is no reason they should be stored as unsigned. Related: https://gitlab.gnome.org/GNOME/mutter/issues/300
This commit is contained in:
parent
a3d826c54b
commit
b5a0068091
@ -37,8 +37,8 @@ void meta_shaped_texture_set_is_y_inverted (MetaShapedTexture *stex,
|
|||||||
void meta_shaped_texture_set_snippet (MetaShapedTexture *stex,
|
void meta_shaped_texture_set_snippet (MetaShapedTexture *stex,
|
||||||
CoglSnippet *snippet);
|
CoglSnippet *snippet);
|
||||||
void meta_shaped_texture_set_fallback_size (MetaShapedTexture *stex,
|
void meta_shaped_texture_set_fallback_size (MetaShapedTexture *stex,
|
||||||
guint fallback_width,
|
int fallback_width,
|
||||||
guint fallback_height);
|
int fallback_height);
|
||||||
gboolean meta_shaped_texture_is_obscured (MetaShapedTexture *self);
|
gboolean meta_shaped_texture_is_obscured (MetaShapedTexture *self);
|
||||||
cairo_region_t * meta_shaped_texture_get_opaque_region (MetaShapedTexture *stex);
|
cairo_region_t * meta_shaped_texture_get_opaque_region (MetaShapedTexture *stex);
|
||||||
|
|
||||||
|
@ -103,8 +103,8 @@ struct _MetaShapedTexturePrivate
|
|||||||
cairo_region_t *clip_region;
|
cairo_region_t *clip_region;
|
||||||
cairo_region_t *unobscured_region;
|
cairo_region_t *unobscured_region;
|
||||||
|
|
||||||
guint tex_width, tex_height;
|
int tex_width, tex_height;
|
||||||
guint fallback_width, fallback_height;
|
int fallback_width, fallback_height;
|
||||||
|
|
||||||
gint64 prev_invalidation, last_invalidation;
|
gint64 prev_invalidation, last_invalidation;
|
||||||
guint fast_updates;
|
guint fast_updates;
|
||||||
@ -163,7 +163,7 @@ set_unobscured_region (MetaShapedTexture *self,
|
|||||||
g_clear_pointer (&priv->unobscured_region, cairo_region_destroy);
|
g_clear_pointer (&priv->unobscured_region, cairo_region_destroy);
|
||||||
if (unobscured_region)
|
if (unobscured_region)
|
||||||
{
|
{
|
||||||
guint width, height;
|
int width, height;
|
||||||
|
|
||||||
if (priv->texture)
|
if (priv->texture)
|
||||||
{
|
{
|
||||||
@ -354,7 +354,7 @@ set_cogl_texture (MetaShapedTexture *stex,
|
|||||||
CoglTexture *cogl_tex)
|
CoglTexture *cogl_tex)
|
||||||
{
|
{
|
||||||
MetaShapedTexturePrivate *priv;
|
MetaShapedTexturePrivate *priv;
|
||||||
guint width, height;
|
int width, height;
|
||||||
|
|
||||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||||
|
|
||||||
@ -416,7 +416,7 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
{
|
{
|
||||||
MetaShapedTexture *stex = (MetaShapedTexture *) actor;
|
MetaShapedTexture *stex = (MetaShapedTexture *) actor;
|
||||||
MetaShapedTexturePrivate *priv = stex->priv;
|
MetaShapedTexturePrivate *priv = stex->priv;
|
||||||
guint tex_width, tex_height;
|
int tex_width, tex_height;
|
||||||
guchar opacity;
|
guchar opacity;
|
||||||
CoglContext *ctx;
|
CoglContext *ctx;
|
||||||
CoglFramebuffer *fb;
|
CoglFramebuffer *fb;
|
||||||
@ -641,7 +641,7 @@ meta_shaped_texture_get_preferred_width (ClutterActor *self,
|
|||||||
gfloat *natural_width_p)
|
gfloat *natural_width_p)
|
||||||
{
|
{
|
||||||
MetaShapedTexturePrivate *priv = META_SHAPED_TEXTURE (self)->priv;
|
MetaShapedTexturePrivate *priv = META_SHAPED_TEXTURE (self)->priv;
|
||||||
guint width;
|
int width;
|
||||||
|
|
||||||
if (priv->texture)
|
if (priv->texture)
|
||||||
width = priv->tex_width;
|
width = priv->tex_width;
|
||||||
@ -661,7 +661,7 @@ meta_shaped_texture_get_preferred_height (ClutterActor *self,
|
|||||||
gfloat *natural_height_p)
|
gfloat *natural_height_p)
|
||||||
{
|
{
|
||||||
MetaShapedTexturePrivate *priv = META_SHAPED_TEXTURE (self)->priv;
|
MetaShapedTexturePrivate *priv = META_SHAPED_TEXTURE (self)->priv;
|
||||||
guint height;
|
int height;
|
||||||
|
|
||||||
if (priv->texture)
|
if (priv->texture)
|
||||||
height = priv->tex_height;
|
height = priv->tex_height;
|
||||||
@ -1028,8 +1028,8 @@ meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
|||||||
|
|
||||||
void
|
void
|
||||||
meta_shaped_texture_set_fallback_size (MetaShapedTexture *self,
|
meta_shaped_texture_set_fallback_size (MetaShapedTexture *self,
|
||||||
guint fallback_width,
|
int fallback_width,
|
||||||
guint fallback_height)
|
int fallback_height)
|
||||||
{
|
{
|
||||||
MetaShapedTexturePrivate *priv = self->priv;
|
MetaShapedTexturePrivate *priv = self->priv;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user