[Mesa-dev] [PATCH 5/9] mesa: make _mesa_read_buffer() static

Rob Clark robdclark at gmail.com
Wed Feb 24 00:50:01 UTC 2016


On Tue, Feb 23, 2016 at 6:45 PM, Brian Paul <brianp at vmware.com> wrote:
> Not called from any other file.  Remove _mesa_ prefix and update comments.

Reviewed-by: Rob Clark <robdclark at gmail.com>

> ---
>  src/mesa/main/buffers.c | 13 +++++++------
>  src/mesa/main/buffers.h |  4 ----
>  2 files changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
> index 2c4a138..031b395 100644
> --- a/src/mesa/main/buffers.c
> +++ b/src/mesa/main/buffers.c
> @@ -693,12 +693,13 @@ _mesa_readbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
>
>
>  /**
> - * Called by glReadBuffer to set the source renderbuffer for reading pixels.
> + * Called by glReadBuffer and glNamedFramebufferReadBuffer to set the source
> + * renderbuffer for reading pixels.
>   * \param mode color buffer such as GL_FRONT, GL_BACK, etc.
>   */
> -void
> -_mesa_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
> -                  GLenum buffer, const char *caller)
> +static void
> +read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
> +            GLenum buffer, const char *caller)
>  {
>     GLbitfield supportedMask;
>     gl_buffer_index srcBuffer;
> @@ -746,7 +747,7 @@ void GLAPIENTRY
>  _mesa_ReadBuffer(GLenum buffer)
>  {
>     GET_CURRENT_CONTEXT(ctx);
> -   _mesa_read_buffer(ctx, ctx->ReadBuffer, buffer, "glReadBuffer");
> +   read_buffer(ctx, ctx->ReadBuffer, buffer, "glReadBuffer");
>  }
>
>
> @@ -765,5 +766,5 @@ _mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
>     else
>        fb = ctx->WinSysReadBuffer;
>
> -   _mesa_read_buffer(ctx, fb, src, "glNamedFramebufferReadBuffer");
> +   read_buffer(ctx, fb, src, "glNamedFramebufferReadBuffer");
>  }
> diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h
> index c30cb75..a57bd15 100644
> --- a/src/mesa/main/buffers.h
> +++ b/src/mesa/main/buffers.h
> @@ -73,10 +73,6 @@ extern void
>  _mesa_update_draw_buffers(struct gl_context *ctx);
>
>
> -extern void
> -_mesa_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
> -                  GLenum buffer, const char *caller);
> -
>  extern void GLAPIENTRY
>  _mesa_ReadBuffer( GLenum mode );
>
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list