Henri Verbeet : wined3d: Get rid of the SFLAG_INTEXTURE / SFLAG_INSRGBTEX check in surface_set_texture_name().
Alexandre Julliard
julliard at winehq.org
Fri Sep 6 12:39:51 CDT 2013
Module: wine
Branch: master
Commit: 7859509f5b09ee2184c8c9e971ebeb92eec80fca
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7859509f5b09ee2184c8c9e971ebeb92eec80fca
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Fri Sep 6 09:57:40 2013 +0200
wined3d: Get rid of the SFLAG_INTEXTURE / SFLAG_INSRGBTEX check in surface_set_texture_name().
---
dlls/wined3d/surface.c | 31 +++++--------------------------
1 files changed, 5 insertions(+), 26 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e36f61d..011be7a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1709,36 +1709,15 @@ static const struct wined3d_surface_ops gdi_surface_ops =
gdi_surface_unmap,
};
-void surface_set_texture_name(struct wined3d_surface *surface, GLuint new_name, BOOL srgb)
+void surface_set_texture_name(struct wined3d_surface *surface, GLuint name, BOOL srgb)
{
- GLuint *name;
- DWORD flag;
+ TRACE("surface %p, name %u, srgb %#x.\n", surface, name, srgb);
- TRACE("surface %p, new_name %u, srgb %#x.\n", surface, new_name, srgb);
-
- if(srgb)
- {
- name = &surface->texture_name_srgb;
- flag = SFLAG_INSRGBTEX;
- }
+ if (srgb)
+ surface->texture_name_srgb = name;
else
- {
- name = &surface->texture_name;
- flag = SFLAG_INTEXTURE;
- }
-
- if (!*name && new_name)
- {
- /* FIXME: We shouldn't need to remove SFLAG_INTEXTURE if the
- * surface has no texture name yet. See if we can get rid of this. */
- if (surface->flags & flag)
- {
- ERR("Surface has %s set, but no texture name.\n", debug_surflocation(flag));
- surface_modify_location(surface, flag, FALSE);
- }
- }
+ surface->texture_name = name;
- *name = new_name;
surface_force_reload(surface);
}
More information about the wine-cvs
mailing list