[mutter/wip/texture-purge-on-nvidia: 8/17] shaped-texture: Add priv pointer to _get_image()
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/texture-purge-on-nvidia: 8/17] shaped-texture: Add priv pointer to _get_image()
- Date: Fri, 11 Jan 2019 23:50:59 +0000 (UTC)
commit eeec47cf5634cbf1c58e3442cdd0687453d7e9f1
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Dec 20 17:22:37 2018 +0100
shaped-texture: Add priv pointer to _get_image()
The MetaShapedTexturePrivate is accessed more than once, so keep a
pointer to it.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
src/compositor/meta-shaped-texture.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 0236eeae5..563cce1aa 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -924,13 +924,14 @@ cairo_surface_t *
meta_shaped_texture_get_image (MetaShapedTexture *stex,
cairo_rectangle_int_t *clip)
{
+ MetaShapedTexturePrivate *priv = stex->priv;
CoglTexture *texture, *mask_texture;
cairo_rectangle_int_t texture_rect = { 0, 0, 0, 0 };
cairo_surface_t *surface;
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
- texture = COGL_TEXTURE (stex->priv->texture);
+ texture = COGL_TEXTURE (priv->texture);
if (texture == NULL)
return NULL;
@@ -964,7 +965,7 @@ meta_shaped_texture_get_image (MetaShapedTexture *stex,
if (clip != NULL)
cogl_object_unref (texture);
- mask_texture = stex->priv->mask_texture;
+ mask_texture = priv->mask_texture;
if (mask_texture != NULL)
{
cairo_t *cr;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]