summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorMathias Froehlich <Mathias.Froehlich@web.de>2015-03-29 18:57:46 +0200
committerMathias Froehlich <Mathias.Froehlich@gmx.net>2015-04-05 08:01:47 +0200
commit107ae27e57dc2a1ddc6bbb7ea101c1c60794423f (patch)
treed6dcd260f55507336ec4b7f869251a51c9e1ba22 /src/mesa/main/context.c
parent29e6c7dbc5bacf4f2b741333ac56469a00164e65 (diff)
downloadexternal_mesa3d-107ae27e57dc2a1ddc6bbb7ea101c1c60794423f.zip
external_mesa3d-107ae27e57dc2a1ddc6bbb7ea101c1c60794423f.tar.gz
external_mesa3d-107ae27e57dc2a1ddc6bbb7ea101c1c60794423f.tar.bz2
mesa: Remove the _WindowMap from gl_viewport_attrib.
The _WindowMap can be dropped from gl_viewport_attrib now. Simplify gl_viewport_attrib handling where possible. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index c1acda9..adf6497 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1288,7 +1288,6 @@ _mesa_free_context_data( struct gl_context *ctx )
_mesa_free_eval_data( ctx );
_mesa_free_texture_data( ctx );
_mesa_free_matrix_data( ctx );
- _mesa_free_viewport_data( ctx );
_mesa_free_pipeline_data(ctx);
_mesa_free_program_data(ctx);
_mesa_free_shader_state(ctx);
@@ -1449,17 +1448,10 @@ _mesa_copy_context( const struct gl_context *src, struct gl_context *dst,
dst->Transform = src->Transform;
}
if (mask & GL_VIEWPORT_BIT) {
- /* Cannot use memcpy, because of pointers in GLmatrix _WindowMap */
unsigned i;
for (i = 0; i < src->Const.MaxViewports; i++) {
- dst->ViewportArray[i].X = src->ViewportArray[i].X;
- dst->ViewportArray[i].Y = src->ViewportArray[i].Y;
- dst->ViewportArray[i].Width = src->ViewportArray[i].Width;
- dst->ViewportArray[i].Height = src->ViewportArray[i].Height;
- dst->ViewportArray[i].Near = src->ViewportArray[i].Near;
- dst->ViewportArray[i].Far = src->ViewportArray[i].Far;
- _math_matrix_copy(&dst->ViewportArray[i]._WindowMap,
- &src->ViewportArray[i]._WindowMap);
+ /* OK to memcpy */
+ dst->ViewportArray[i] = src->ViewportArray[i];
}
}