Commit 39493b06 authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Define a structure to hold coordinates information for BitBlt operations.

parent 5842971b
......@@ -169,6 +169,15 @@ typedef struct
struct xrender_info *xrender;
} X11DRV_PDEVICE;
struct bitblt_coords
{
int x; /* original position and width */
int y;
int width;
int height;
RECT visrect; /* rectangle clipped to the visible part */
};
extern X_PHYSBITMAP BITMAP_stock_phys_bitmap; /* phys bitmap for the default stock bitmap */
......@@ -293,9 +302,7 @@ extern BOOL X11DRV_XRender_ExtTextOut(X11DRV_PDEVICE *physDev, INT x, INT y, UIN
extern BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel, const DIBSECTION *dib);
BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst,
Pixmap pixmap, GC gc,
INT widthSrc, INT heightSrc,
INT widthDst, INT heightDst,
RECT *visRectSrc, RECT *visRectDst);
const struct bitblt_coords *src, const struct bitblt_coords *dst );
extern void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE *physDev);
extern Drawable get_glxdrawable(X11DRV_PDEVICE *physDev);
......
......@@ -2187,15 +2187,13 @@ void X11DRV_XRender_CopyBrush(X11DRV_PDEVICE *physDev, X_PHYSBITMAP *physBitmap,
BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst,
Pixmap pixmap, GC gc,
INT widthSrc, INT heightSrc,
INT widthDst, INT heightDst,
RECT *visRectSrc, RECT *visRectDst )
const struct bitblt_coords *src, const struct bitblt_coords *dst )
{
BOOL stretch = (widthSrc != widthDst) || (heightSrc != heightDst);
int width = visRectDst->right - visRectDst->left;
int height = visRectDst->bottom - visRectDst->top;
int x_src = physDevSrc->dc_rect.left + visRectSrc->left;
int y_src = physDevSrc->dc_rect.top + visRectSrc->top;
BOOL stretch = (src->width != dst->width) || (src->height != dst->height);
int width = dst->visrect.right - dst->visrect.left;
int height = dst->visrect.bottom - dst->visrect.top;
int x_src = physDevSrc->dc_rect.left + src->visrect.left;
int y_src = physDevSrc->dc_rect.top + src->visrect.top;
struct xrender_info *src_info = get_xrender_info(physDevSrc);
const WineXRenderFormat *dst_format = get_xrender_format_from_color_shifts(physDevDst->depth, physDevDst->color_shifts);
Picture src_pict=0, dst_pict=0, mask_pict=0;
......@@ -2206,8 +2204,9 @@ BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE
pa.subwindow_mode = IncludeInferiors;
pa.repeat = RepeatNone;
TRACE("src depth=%d widthSrc=%d heightSrc=%d xSrc=%d ySrc=%d\n", physDevSrc->depth, widthSrc, heightSrc, x_src, y_src);
TRACE("dst depth=%d widthDst=%d heightDst=%d\n", physDevDst->depth, widthDst, heightDst);
TRACE("src depth=%d widthSrc=%d heightSrc=%d xSrc=%d ySrc=%d\n",
physDevSrc->depth, src->width, src->height, x_src, y_src);
TRACE("dst depth=%d widthDst=%d heightDst=%d\n", physDevDst->depth, dst->width, dst->height);
if(!X11DRV_XRender_Installed)
{
......@@ -2236,8 +2235,8 @@ BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE
use_repeat = use_source_repeat( physDevSrc );
if (!use_repeat)
{
xscale = widthSrc / (double)widthDst;
yscale = heightSrc / (double)heightDst;
xscale = src->width / (double)dst->width;
yscale = src->height / (double)dst->height;
}
else xscale = yscale = 1; /* no scaling needed with a repeating source */
......@@ -2354,9 +2353,7 @@ BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel,
BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst,
Pixmap pixmap, GC gc,
INT widthSrc, INT heightSrc,
INT widthDst, INT heightDst,
RECT *visRectSrc, RECT *visRectDst )
const struct bitblt_coords *src, const struct bitblt_coords *dst )
{
return FALSE;
}
......
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