diff --git a/clutter/Makefile.am b/clutter/Makefile.am index 0a05f280d..8c89acdc4 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -239,6 +239,7 @@ source_h_priv = \ $(srcdir)/clutter-keysyms-table.h \ $(srcdir)/clutter-master-clock.h \ $(srcdir)/clutter-model-private.h \ + $(srcdir)/clutter-offscreen-effect-private.h \ $(srcdir)/clutter-paint-volume-private.h \ $(srcdir)/clutter-private.h \ $(srcdir)/clutter-profile.h \ diff --git a/clutter/clutter-offscreen-effect-private.h b/clutter/clutter-offscreen-effect-private.h new file mode 100644 index 000000000..6a9137bff --- /dev/null +++ b/clutter/clutter-offscreen-effect-private.h @@ -0,0 +1,14 @@ +#ifndef __CLUTTER_OFFSCREEN_EFFECT_PRIVATE_H__ +#define __CLUTTER_OFFSCREEN_EFFECT_PRIVATE_H__ + +#include + +G_BEGIN_DECLS + +gboolean _clutter_offscreen_effect_get_target_size (ClutterOffscreenEffect *effect, + gfloat *width, + gfloat *height); + +G_END_DECLS + +#endif /* __CLUTTER_OFFSCREEN_EFFECT_PRIVATE_H__ */ diff --git a/clutter/clutter-offscreen-effect.c b/clutter/clutter-offscreen-effect.c index 1fbb17e95..269640847 100644 --- a/clutter/clutter-offscreen-effect.c +++ b/clutter/clutter-offscreen-effect.c @@ -475,3 +475,22 @@ clutter_offscreen_effect_create_texture (ClutterOffscreenEffect *effect, width, height); } + +gboolean +_clutter_offscreen_effect_get_target_size (ClutterOffscreenEffect *effect, + gfloat *width, + gfloat *height) +{ + ClutterOffscreenEffectPrivate *priv = effect->priv; + + if (priv->target == NULL) + return FALSE; + + if (width) + *width = priv->target_width; + + if (height) + *height = priv->target_height; + + return TRUE; +}