diff options
author | Eric Anholt <[email protected]> | 2013-06-20 09:39:11 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-06-25 19:19:20 -0700 |
commit | bab755ad1b8cc5560c7d92e21b1fb1c3bebd43ae (patch) | |
tree | 1c5f9bc939cc4569a292dd18a7fc2c3681a8f174 /src/mesa/main/context.c | |
parent | 61bfed2d0998065bdb20f3f67e1591f8d5005ba6 (diff) |
mesa: Remove Driver.GetBufferSize and its callers.
Only the GDI driver set it to non-NULL any more, and that driver has a
Viewport hook that should keep it limping along as well as it ever has.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index c59f755c687..5ad04cc9988 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1388,25 +1388,6 @@ check_compatible(const struct gl_context *ctx, /** - * Do one-time initialization for the given framebuffer. Specifically, - * ask the driver for the window's current size and update the framebuffer - * object to match. - * Really, the device driver should totally take care of this. - */ -static void -initialize_framebuffer_size(struct gl_context *ctx, struct gl_framebuffer *fb) -{ - GLuint width, height; - if (ctx->Driver.GetBufferSize) { - ctx->Driver.GetBufferSize(fb, &width, &height); - if (ctx->Driver.ResizeBuffers) - ctx->Driver.ResizeBuffers(ctx, fb, width, height); - fb->Initialized = GL_TRUE; - } -} - - -/** * Check if the viewport/scissor size has not yet been initialized. * Initialize the size if the given width and height are non-zero. */ @@ -1508,32 +1489,6 @@ _mesa_make_current( struct gl_context *newCtx, */ newCtx->NewState |= _NEW_BUFFERS; -#if 1 - /* We want to get rid of these lines: */ - if (!drawBuffer->Initialized) { - initialize_framebuffer_size(newCtx, drawBuffer); - } - if (readBuffer != drawBuffer && !readBuffer->Initialized) { - initialize_framebuffer_size(newCtx, readBuffer); - } - - _mesa_resizebuffers(newCtx); -#else - /* We want the drawBuffer and readBuffer to be initialized by - * the driver. - * This generally means the Width and Height match the actual - * window size and the renderbuffers (both hardware and software - * based) are allocated to match. The later can generally be - * done with a call to _mesa_resize_framebuffer(). - * - * It's theoretically possible for a buffer to have zero width - * or height, but for now, assert check that the driver did what's - * expected of it. - */ - ASSERT(drawBuffer->Width > 0); - ASSERT(drawBuffer->Height > 0); -#endif - if (drawBuffer) { _mesa_check_init_viewport(newCtx, drawBuffer->Width, drawBuffer->Height); |