[PATCH 2/5] wined3d: Make the context parameter to the get_drawable_size() callback const.
Henri Verbeet
hverbeet at codeweavers.com
Wed Jul 6 16:14:25 CDT 2011
---
dlls/wined3d/device.c | 6 +++---
dlls/wined3d/swapchain.c | 2 +-
dlls/wined3d/wined3d_private.h | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 514630c..b10fde6 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -6185,16 +6185,16 @@ void device_invalidate_state(const struct wined3d_device *device, DWORD state)
}
}
-void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *height)
+void get_drawable_size_fbo(const struct wined3d_context *context, UINT *width, UINT *height)
{
/* The drawable size of a fbo target is the opengl texture size, which is the power of two size. */
*width = context->current_rt->pow2Width;
*height = context->current_rt->pow2Height;
}
-void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, UINT *height)
+void get_drawable_size_backbuffer(const struct wined3d_context *context, UINT *width, UINT *height)
{
- struct wined3d_swapchain *swapchain = context->swapchain;
+ const struct wined3d_swapchain *swapchain = context->swapchain;
/* The drawable size of a backbuffer / aux buffer offscreen target is the size of the
* current context's drawable, which is the size of the back buffer of the swapchain
* the active context belongs to. */
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 5848f37..405d89f 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -1190,7 +1190,7 @@ struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchai
return swapchain_create_context(swapchain);
}
-void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, UINT *height)
+void get_drawable_size_swapchain(const struct wined3d_context *context, UINT *width, UINT *height)
{
/* The drawable size of an onscreen drawable is the surface size.
* (Actually: The window size, but the surface is created in window size) */
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7f23111..8541fcd 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2011,7 +2011,7 @@ struct wined3d_surface
UINT pow2Height;
/* A method to retrieve the drawable size. Not in the Vtable to make it changeable */
- void (*get_drawable_size)(struct wined3d_context *context, UINT *width, UINT *height);
+ void (*get_drawable_size)(const struct wined3d_context *context, UINT *width, UINT *height);
/* PBO */
GLuint pbo;
@@ -2090,9 +2090,9 @@ void surface_upload_data(struct wined3d_surface *surface, const struct wined3d_g
const struct wined3d_format *format, const RECT *src_rect, UINT src_w, const POINT *dst_point,
BOOL srgb, const struct wined3d_bo_address *data) DECLSPEC_HIDDEN;
-void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
-void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
-void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
+void get_drawable_size_swapchain(const struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
+void get_drawable_size_backbuffer(const struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
+void get_drawable_size_fbo(const struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
void draw_textured_quad(struct wined3d_surface *src_surface, const RECT *src_rect,
const RECT *dst_rect, WINED3DTEXTUREFILTERTYPE Filter) DECLSPEC_HIDDEN;
--
1.7.3.4
More information about the wine-patches
mailing list