Commit 640234c5 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Rename "flag" to "location" in surface_modify_location().

parent 67724d9f
......@@ -5793,20 +5793,22 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
void surface_modify_location(struct wined3d_surface *surface, DWORD flag, BOOL persistent)
void surface_modify_location(struct wined3d_surface *surface, DWORD location, BOOL persistent)
{
const struct wined3d_gl_info *gl_info = &surface->resource.device->adapter->gl_info;
struct wined3d_surface *overlay;
TRACE("surface %p, location %s, persistent %#x.\n",
surface, debug_surflocation(flag), persistent);
surface, debug_surflocation(location), persistent);
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
if (surface_is_offscreen(surface))
{
/* With ORM_FBO, SFLAG_INTEXTURE and SFLAG_INDRAWABLE are the same for offscreen targets. */
if (flag & (SFLAG_INTEXTURE | SFLAG_INDRAWABLE)) flag |= (SFLAG_INTEXTURE | SFLAG_INDRAWABLE);
/* With ORM_FBO, SFLAG_INTEXTURE and SFLAG_INDRAWABLE are the same
* for offscreen targets. */
if (location & (SFLAG_INTEXTURE | SFLAG_INDRAWABLE))
location |= (SFLAG_INTEXTURE | SFLAG_INDRAWABLE);
}
else
{
......@@ -5814,16 +5816,14 @@ void surface_modify_location(struct wined3d_surface *surface, DWORD flag, BOOL p
}
}
if (flag & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)
if (location & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)
&& gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
{
flag |= (SFLAG_INTEXTURE | SFLAG_INSRGBTEX);
}
location |= (SFLAG_INTEXTURE | SFLAG_INSRGBTEX);
if (persistent)
{
if (((surface->flags & SFLAG_INTEXTURE) && !(flag & SFLAG_INTEXTURE))
|| ((surface->flags & SFLAG_INSRGBTEX) && !(flag & SFLAG_INSRGBTEX)))
if (((surface->flags & SFLAG_INTEXTURE) && !(location & SFLAG_INTEXTURE))
|| ((surface->flags & SFLAG_INSRGBTEX) && !(location & SFLAG_INSRGBTEX)))
{
if (surface->container.type == WINED3D_CONTAINER_TEXTURE)
{
......@@ -5832,10 +5832,10 @@ void surface_modify_location(struct wined3d_surface *surface, DWORD flag, BOOL p
}
}
surface->flags &= ~SFLAG_LOCATIONS;
surface->flags |= flag;
surface->flags |= location;
/* Redraw emulated overlays, if any */
if (flag & SFLAG_INDRAWABLE && !list_empty(&surface->overlays))
if (location & SFLAG_INDRAWABLE && !list_empty(&surface->overlays))
{
LIST_FOR_EACH_ENTRY(overlay, &surface->overlays, struct wined3d_surface, overlay_entry)
{
......@@ -5845,7 +5845,7 @@ void surface_modify_location(struct wined3d_surface *surface, DWORD flag, BOOL p
}
else
{
if ((surface->flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) && (flag & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)))
if ((surface->flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) && (location & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)))
{
if (surface->container.type == WINED3D_CONTAINER_TEXTURE)
{
......@@ -5853,7 +5853,7 @@ void surface_modify_location(struct wined3d_surface *surface, DWORD flag, BOOL p
wined3d_texture_set_dirty(surface->container.u.texture, TRUE);
}
}
surface->flags &= ~flag;
surface->flags &= ~location;
}
if (!(surface->flags & SFLAG_LOCATIONS))
......
......@@ -2075,9 +2075,9 @@ BOOL surface_is_offscreen(const struct wined3d_surface *surface) DECLSPEC_HIDDEN
HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb) DECLSPEC_HIDDEN;
void surface_load_ds_location(struct wined3d_surface *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
HRESULT surface_load_location(struct wined3d_surface *surface, DWORD flag, const RECT *rect) DECLSPEC_HIDDEN;
HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location, const RECT *rect) DECLSPEC_HIDDEN;
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void surface_modify_location(struct wined3d_surface *surface, DWORD flag, BOOL persistent) DECLSPEC_HIDDEN;
void surface_modify_location(struct wined3d_surface *surface, DWORD location, BOOL persistent) DECLSPEC_HIDDEN;
void surface_prepare_texture(struct wined3d_surface *surface,
const struct wined3d_gl_info *gl_info, BOOL srgb) DECLSPEC_HIDDEN;
void surface_set_compatible_renderbuffer(struct wined3d_surface *surface, struct wined3d_surface *rt) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment