clutter: Make paint volume argument const on queue_redraw*()

The given paint volume is actually unmodified, there is no need to
require non-const arguments when some getters actually give const
paint volumes.
This commit is contained in:
Carlos Garnacho 2018-08-15 01:12:49 +02:00 committed by Georges Basile Stavracas Neto
parent 9004253c4e
commit 9a843857b3
4 changed files with 21 additions and 28 deletions

View File

@ -275,13 +275,13 @@ void _clutter_actor_set_enable_paint_unmapped
void _clutter_actor_set_has_pointer (ClutterActor *self,
gboolean has_pointer);
void _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *clip_volume);
void _clutter_actor_queue_redraw_full (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *volume,
ClutterEffect *effect);
void _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
ClutterRedrawFlags flags,
const ClutterPaintVolume *clip_volume);
void _clutter_actor_queue_redraw_full (ClutterActor *self,
ClutterRedrawFlags flags,
const ClutterPaintVolume *volume,
ClutterEffect *effect);
ClutterPaintVolume * _clutter_actor_get_queue_redraw_clip (ClutterActor *self);
void _clutter_actor_set_queue_redraw_clip (ClutterActor *self,

View File

@ -8744,15 +8744,14 @@ _clutter_actor_get_allocation_clip (ClutterActor *self,
}
void
_clutter_actor_queue_redraw_full (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *volume,
ClutterEffect *effect)
_clutter_actor_queue_redraw_full (ClutterActor *self,
ClutterRedrawFlags flags,
const ClutterPaintVolume *volume,
ClutterEffect *effect)
{
ClutterActorPrivate *priv = self->priv;
ClutterPaintVolume allocation_pv;
ClutterPaintVolume *pv;
gboolean should_free_pv;
ClutterPaintVolume *pv = NULL;
ClutterActor *stage;
/* Here's an outline of the actor queue redraw mechanism:
@ -8894,21 +8893,15 @@ _clutter_actor_queue_redraw_full (ClutterActor *self,
clutter_paint_volume_set_height (pv,
allocation_clip.y2 -
allocation_clip.y1);
should_free_pv = TRUE;
}
else
{
pv = volume;
should_free_pv = FALSE;
}
self->priv->queue_redraw_entry =
_clutter_stage_queue_actor_redraw (CLUTTER_STAGE (stage),
priv->queue_redraw_entry,
self,
pv);
pv ? pv : volume);
if (should_free_pv)
if (pv)
clutter_paint_volume_free (pv);
/* If this is the first redraw queued then we can directly use the
@ -9022,9 +9015,9 @@ clutter_actor_queue_redraw (ClutterActor *self)
* picking of your actor.
*/
void
_clutter_actor_queue_redraw_with_clip (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *volume)
_clutter_actor_queue_redraw_with_clip (ClutterActor *self,
ClutterRedrawFlags flags,
const ClutterPaintVolume *volume)
{
_clutter_actor_queue_redraw_full (self,
flags, /* flags */

View File

@ -87,7 +87,7 @@ const ClutterPlane *_clutter_stage_get_clip (ClutterStage *stage);
ClutterStageQueueRedrawEntry *_clutter_stage_queue_actor_redraw (ClutterStage *stage,
ClutterStageQueueRedrawEntry *entry,
ClutterActor *actor,
ClutterPaintVolume *clip);
const ClutterPaintVolume *clip);
void _clutter_stage_queue_redraw_entry_invalidate (ClutterStageQueueRedrawEntry *entry);
CoglFramebuffer *_clutter_stage_get_active_framebuffer (ClutterStage *stage);

View File

@ -4145,10 +4145,10 @@ _clutter_stage_get_clip (ClutterStage *stage)
* didn't explicitly do so.
*/
ClutterStageQueueRedrawEntry *
_clutter_stage_queue_actor_redraw (ClutterStage *stage,
_clutter_stage_queue_actor_redraw (ClutterStage *stage,
ClutterStageQueueRedrawEntry *entry,
ClutterActor *actor,
ClutterPaintVolume *clip)
ClutterActor *actor,
const ClutterPaintVolume *clip)
{
ClutterStagePrivate *priv = stage->priv;