[Cogl] [PATCH] framebuffer: Take const pointers for the matrix setters

Robert Bragg robert at sixbynine.org
Wed Aug 15 08:36:49 PDT 2012


This looks good to land to me,

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
- Robert

On Tue, Aug 14, 2012 at 5:53 PM, Neil Roberts <neil at linux.intel.com> wrote:
> cogl_framebuffer_set_{projection,modelview}_matrix don't need to read
> from the matrix argument so they should probably take a const pointer.
> ---
>  cogl/cogl-framebuffer.c | 4 ++--
>  cogl/cogl-framebuffer.h | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
> index 6933357..c34bc80 100644
> --- a/cogl/cogl-framebuffer.c
> +++ b/cogl/cogl-framebuffer.c
> @@ -2792,7 +2792,7 @@ cogl_framebuffer_get_modelview_matrix (CoglFramebuffer *framebuffer,
>
>  void
>  cogl_framebuffer_set_modelview_matrix (CoglFramebuffer *framebuffer,
> -                                       CoglMatrix *matrix)
> +                                       const CoglMatrix *matrix)
>  {
>    CoglMatrixStack *modelview_stack =
>      _cogl_framebuffer_get_modelview_stack (framebuffer);
> @@ -2817,7 +2817,7 @@ cogl_framebuffer_get_projection_matrix (CoglFramebuffer *framebuffer,
>
>  void
>  cogl_framebuffer_set_projection_matrix (CoglFramebuffer *framebuffer,
> -                                        CoglMatrix *matrix)
> +                                        const CoglMatrix *matrix)
>  {
>    CoglMatrixStack *projection_stack =
>      _cogl_framebuffer_get_projection_stack (framebuffer);
> diff --git a/cogl/cogl-framebuffer.h b/cogl/cogl-framebuffer.h
> index f00e996..43fc8d5 100644
> --- a/cogl/cogl-framebuffer.h
> +++ b/cogl/cogl-framebuffer.h
> @@ -420,7 +420,7 @@ cogl_framebuffer_get_modelview_matrix (CoglFramebuffer *framebuffer,
>   */
>  void
>  cogl_framebuffer_set_modelview_matrix (CoglFramebuffer *framebuffer,
> -                                       CoglMatrix *matrix);
> +                                       const CoglMatrix *matrix);
>
>  /**
>   * cogl_framebuffer_perspective:
> @@ -534,7 +534,7 @@ cogl_framebuffer_get_projection_matrix (CoglFramebuffer *framebuffer,
>   */
>  void
>  cogl_framebuffer_set_projection_matrix (CoglFramebuffer *framebuffer,
> -                                        CoglMatrix *matrix);
> +                                        const CoglMatrix *matrix);
>
>  /**
>   * cogl_framebuffer_push_scissor_clip:
> --
> 1.7.11.3.g3c3efa5
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list