mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
shaped-texture: Move variable declaration on top
Related: https://gitlab.gnome.org/GNOME/mutter/issues/300
This commit is contained in:
parent
b5a0068091
commit
556ed7b937
@ -417,6 +417,7 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
MetaShapedTexture *stex = (MetaShapedTexture *) actor;
|
MetaShapedTexture *stex = (MetaShapedTexture *) actor;
|
||||||
MetaShapedTexturePrivate *priv = stex->priv;
|
MetaShapedTexturePrivate *priv = stex->priv;
|
||||||
int tex_width, tex_height;
|
int tex_width, tex_height;
|
||||||
|
cairo_rectangle_int_t tex_rect;
|
||||||
guchar opacity;
|
guchar opacity;
|
||||||
CoglContext *ctx;
|
CoglContext *ctx;
|
||||||
CoglFramebuffer *fb;
|
CoglFramebuffer *fb;
|
||||||
@ -481,7 +482,7 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cairo_rectangle_int_t tex_rect = { 0, 0, tex_width, tex_height };
|
tex_rect = (cairo_rectangle_int_t) { 0, 0, tex_width, tex_height };
|
||||||
|
|
||||||
/* Use nearest-pixel interpolation if the texture is unscaled. This
|
/* Use nearest-pixel interpolation if the texture is unscaled. This
|
||||||
* improves performance, especially with software rendering.
|
* improves performance, especially with software rendering.
|
||||||
|
Loading…
Reference in New Issue
Block a user