mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
offscreen-effect: Add private API for getting the target size
Since the FBO target might have a different size than the mere paint box of the actor, we need API to get it out of the ClutterOffscreenEffect private data structure and on to sub-classes. Since we cannot add new API in a stable cycle, we need a private function; we'll leave it there even when opening 1.7, since it's useful for internal purposes.
This commit is contained in:
parent
82c68c5887
commit
20f19fe06c
@ -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 \
|
||||
|
14
clutter/clutter-offscreen-effect-private.h
Normal file
14
clutter/clutter-offscreen-effect-private.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef __CLUTTER_OFFSCREEN_EFFECT_PRIVATE_H__
|
||||
#define __CLUTTER_OFFSCREEN_EFFECT_PRIVATE_H__
|
||||
|
||||
#include <clutter/clutter-offscreen-effect.h>
|
||||
|
||||
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__ */
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user