mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -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,
|
||||
TRUE, priv->width, priv->height,
|
||||
priv->rowstride,
|
||||
4, CLUTTER_TEXTURE_RGB_FLAG_PREMULT, NULL);
|
||||
4, CLUTTER_TEXTURE_RGB_FLAG_PREMULT,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -446,13 +447,10 @@ clutter_cairo_texture_context_destroy (void *data)
|
||||
{
|
||||
ClutterCairoTextureContext *ctxt = data;
|
||||
ClutterCairoTexture *cairo = ctxt->cairo;
|
||||
ClutterCairoTexturePrivate *priv;
|
||||
|
||||
gint cairo_width, cairo_height, cairo_rowstride;
|
||||
gint surface_width, surface_height;
|
||||
ClutterCairoTexturePrivate *priv = cairo->priv;
|
||||
guchar *cairo_data;
|
||||
|
||||
priv = CLUTTER_CAIRO_TEXTURE_GET_PRIVATE (cairo);
|
||||
gint cairo_width, cairo_height;
|
||||
gint surface_width, surface_height;
|
||||
|
||||
if (!priv->cr_surface)
|
||||
return;
|
||||
@ -466,13 +464,13 @@ clutter_cairo_texture_context_destroy (void *data)
|
||||
if (!cairo_width || !cairo_height)
|
||||
{
|
||||
g_free (ctxt);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
cairo_rowstride = priv->rowstride;
|
||||
cairo_data = (priv->cr_surface_data
|
||||
+ ctxt->rect.y * cairo_rowstride
|
||||
+ ctxt->rect.x * 4);
|
||||
+ (ctxt->rect.y * priv->rowstride)
|
||||
+ (ctxt->rect.x * 4));
|
||||
|
||||
clutter_texture_set_area_from_rgb_data (CLUTTER_TEXTURE (cairo),
|
||||
cairo_data,
|
||||
@ -480,12 +478,12 @@ clutter_cairo_texture_context_destroy (void *data)
|
||||
ctxt->rect.x,
|
||||
ctxt->rect.y,
|
||||
cairo_width, cairo_height,
|
||||
cairo_rowstride,
|
||||
4, CLUTTER_TEXTURE_RGB_FLAG_PREMULT, NULL);
|
||||
priv->rowstride,
|
||||
4, CLUTTER_TEXTURE_RGB_FLAG_PREMULT,
|
||||
NULL);
|
||||
|
||||
g_free (ctxt);
|
||||
|
||||
if (CLUTTER_ACTOR_IS_VISIBLE (cairo))
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (cairo));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user