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

@ -277,10 +277,10 @@ void _clutter_actor_set_has_pointer
void _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *clip_volume);
const ClutterPaintVolume *clip_volume);
void _clutter_actor_queue_redraw_full (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *volume,
const ClutterPaintVolume *volume,
ClutterEffect *effect);
ClutterPaintVolume * _clutter_actor_get_queue_redraw_clip (ClutterActor *self);

View File

@ -8746,13 +8746,12 @@ _clutter_actor_get_allocation_clip (ClutterActor *self,
void
_clutter_actor_queue_redraw_full (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *volume,
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
@ -9024,7 +9017,7 @@ clutter_actor_queue_redraw (ClutterActor *self)
void
_clutter_actor_queue_redraw_with_clip (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *volume)
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

@ -4148,7 +4148,7 @@ ClutterStageQueueRedrawEntry *
_clutter_stage_queue_actor_redraw (ClutterStage *stage,
ClutterStageQueueRedrawEntry *entry,
ClutterActor *actor,
ClutterPaintVolume *clip)
const ClutterPaintVolume *clip)
{
ClutterStagePrivate *priv = stage->priv;