[Mesa-dev] [PATCH 21/27] dri: Stop using driUpdateFramebufferSize() wrapper function

Eric Anholt eric at anholt.net
Mon Oct 31 09:08:58 PDT 2011


On Fri, 28 Oct 2011 18:11:51 -0400, Kristian Høgsberg <krh at bitplanet.net> wrote:
> ---
>  src/mesa/drivers/dri/intel/intel_context.c         |    3 +--
>  .../drivers/dri/radeon/radeon_common_context.c     |   10 ++++++----
>  2 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
> index 6190396..476f9dc 100644
> --- a/src/mesa/drivers/dri/intel/intel_context.c
> +++ b/src/mesa/drivers/dri/intel/intel_context.c
> @@ -54,7 +54,6 @@
>  #include "intel_bufmgr.h"
>  #include "intel_screen.h"
>  
> -#include "drirenderbuffer.h"
>  #include "utils.h"
>  #include "../glsl/ralloc.h"
>  
> @@ -377,7 +376,7 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
>     if (attachments)
>        free(attachments);
>  
> -   driUpdateFramebufferSize(&intel->ctx, drawable);
> +   intel->ctx.Driver.ResizeBuffers(&intel->ctx, fb, drawable->w, drawable->h);
>  }

There's a behavior change in this patch.  Previously,
driUpdateFramebufferSize() would check for size not changing and not
call ResizeBuffers() (aka _mesa_resize_framebuffer(), which has a
comment saying "I think we should check if the size is not changing and
return early", because it does a bunch of looping over renderbuffers).
Now you're calling that function directly.

All patches until this one are

Reviewed-by: Eric Anholt <eric at anholt.net>

but I think for this one we want to fix _mesa_resize_framebuffer() to do
what the comment suggests first.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111031/40aa4381/attachment.pgp>


More information about the mesa-dev mailing list