mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
[cairo-texture] Clean up and whitespace fixes
Simple clean up of the CairoTexture to remove unneeded checks, redundant variables and white space.
This commit is contained in:
parent
9799750c03
commit
c6b4ea8b44
@ -298,7 +298,8 @@ clutter_cairo_texture_surface_resize_internal (ClutterCairoTexture *cairo)
|
|||||||
priv->cr_surface_data,
|
priv->cr_surface_data,
|
||||||
TRUE, priv->width, priv->height,
|
TRUE, priv->width, priv->height,
|
||||||
priv->rowstride,
|
priv->rowstride,
|
||||||
4, CLUTTER_TEXTURE_RGB_FLAG_PREMULT, NULL);
|
4, CLUTTER_TEXTURE_RGB_FLAG_PREMULT,
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -446,13 +447,10 @@ clutter_cairo_texture_context_destroy (void *data)
|
|||||||
{
|
{
|
||||||
ClutterCairoTextureContext *ctxt = data;
|
ClutterCairoTextureContext *ctxt = data;
|
||||||
ClutterCairoTexture *cairo = ctxt->cairo;
|
ClutterCairoTexture *cairo = ctxt->cairo;
|
||||||
ClutterCairoTexturePrivate *priv;
|
ClutterCairoTexturePrivate *priv = cairo->priv;
|
||||||
|
|
||||||
gint cairo_width, cairo_height, cairo_rowstride;
|
|
||||||
gint surface_width, surface_height;
|
|
||||||
guchar *cairo_data;
|
guchar *cairo_data;
|
||||||
|
gint cairo_width, cairo_height;
|
||||||
priv = CLUTTER_CAIRO_TEXTURE_GET_PRIVATE (cairo);
|
gint surface_width, surface_height;
|
||||||
|
|
||||||
if (!priv->cr_surface)
|
if (!priv->cr_surface)
|
||||||
return;
|
return;
|
||||||
@ -466,13 +464,13 @@ clutter_cairo_texture_context_destroy (void *data)
|
|||||||
if (!cairo_width || !cairo_height)
|
if (!cairo_width || !cairo_height)
|
||||||
{
|
{
|
||||||
g_free (ctxt);
|
g_free (ctxt);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_rowstride = priv->rowstride;
|
|
||||||
cairo_data = (priv->cr_surface_data
|
cairo_data = (priv->cr_surface_data
|
||||||
+ ctxt->rect.y * cairo_rowstride
|
+ (ctxt->rect.y * priv->rowstride)
|
||||||
+ ctxt->rect.x * 4);
|
+ (ctxt->rect.x * 4));
|
||||||
|
|
||||||
clutter_texture_set_area_from_rgb_data (CLUTTER_TEXTURE (cairo),
|
clutter_texture_set_area_from_rgb_data (CLUTTER_TEXTURE (cairo),
|
||||||
cairo_data,
|
cairo_data,
|
||||||
@ -480,12 +478,12 @@ clutter_cairo_texture_context_destroy (void *data)
|
|||||||
ctxt->rect.x,
|
ctxt->rect.x,
|
||||||
ctxt->rect.y,
|
ctxt->rect.y,
|
||||||
cairo_width, cairo_height,
|
cairo_width, cairo_height,
|
||||||
cairo_rowstride,
|
priv->rowstride,
|
||||||
4, CLUTTER_TEXTURE_RGB_FLAG_PREMULT, NULL);
|
4, CLUTTER_TEXTURE_RGB_FLAG_PREMULT,
|
||||||
|
NULL);
|
||||||
|
|
||||||
g_free (ctxt);
|
g_free (ctxt);
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (cairo))
|
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (cairo));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (cairo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user