mirror of
https://github.com/reactos/wine.git
synced 2025-02-14 17:49:51 +00:00
wined3d: Remove redundant state restoration from read_from_framebuffer.
This commit is contained in:
parent
6907faf805
commit
e8c774e486
@ -3450,9 +3450,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface, UINT pitch)
|
||||
int i;
|
||||
BOOL bpp;
|
||||
BOOL srcIsUpsideDown;
|
||||
GLint rowLen = 0;
|
||||
GLint skipPix = 0;
|
||||
GLint skipRow = 0;
|
||||
struct wined3d_bo_address data;
|
||||
|
||||
surface_get_memory(surface, &data);
|
||||
@ -3535,21 +3532,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, UINT pitch)
|
||||
ERR("mem not null for pbo -- unexpected\n");
|
||||
}
|
||||
|
||||
/* Save old pixel store pack state */
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PACK_ROW_LENGTH, &rowLen);
|
||||
checkGLcall("glGetIntegerv");
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PACK_SKIP_PIXELS, &skipPix);
|
||||
checkGLcall("glGetIntegerv");
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PACK_SKIP_ROWS, &skipRow);
|
||||
checkGLcall("glGetIntegerv");
|
||||
|
||||
/* Setup pixel store pack state -- to glReadPixels into the correct place */
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_ROW_LENGTH, surface->resource.width);
|
||||
checkGLcall("glPixelStorei");
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
|
||||
checkGLcall("glPixelStorei");
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_SKIP_ROWS, 0);
|
||||
checkGLcall("glPixelStorei");
|
||||
|
||||
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
|
||||
surface->resource.width, surface->resource.height,
|
||||
@ -3557,11 +3542,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, UINT pitch)
|
||||
checkGLcall("glReadPixels");
|
||||
|
||||
/* Reset previous pixel store pack state */
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_ROW_LENGTH, rowLen);
|
||||
checkGLcall("glPixelStorei");
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_SKIP_PIXELS, skipPix);
|
||||
checkGLcall("glPixelStorei");
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_SKIP_ROWS, skipRow);
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_ROW_LENGTH, 0);
|
||||
checkGLcall("glPixelStorei");
|
||||
|
||||
if (data.buffer_object && !srcIsUpsideDown)
|
||||
|
Loading…
x
Reference in New Issue
Block a user