From 556ed7b93753439b09f85c86ce81e205ee1c20de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 14 Sep 2018 18:46:40 +0200 Subject: [PATCH] shaped-texture: Move variable declaration on top Related: https://gitlab.gnome.org/GNOME/mutter/issues/300 --- src/compositor/meta-shaped-texture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index ca6b39225..5378b6c75 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -417,6 +417,7 @@ meta_shaped_texture_paint (ClutterActor *actor) MetaShapedTexture *stex = (MetaShapedTexture *) actor; MetaShapedTexturePrivate *priv = stex->priv; int tex_width, tex_height; + cairo_rectangle_int_t tex_rect; guchar opacity; CoglContext *ctx; CoglFramebuffer *fb; @@ -481,7 +482,7 @@ meta_shaped_texture_paint (ClutterActor *actor) if (tex_width == 0 || tex_height == 0) /* no contents yet */ 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 * improves performance, especially with software rendering.