set user_comp_ctxt to be pixel format for default composition operators

This commit is contained in:
Vincent Wei
2019-01-29 15:43:23 +08:00
parent 8ca8deb02d
commit 0734180d70
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -11051,7 +11051,7 @@ typedef struct _COMP_CTXT {
/** The user context passed to SetUserCompositionOps */
void* user_comp_ctxt;
/** the pixel value shoulb be skipped (the color key) */
/** the pixel value should be skipped (the color key) */
gal_pixel skip_pixel;
/** the current pixel value for setpixel and setpixels operation */
+7 -2
View File
@@ -1812,8 +1812,9 @@ static void dc_InitDC (PDC pdc, HWND hWnd, BOOL bIsClient)
[pdc->surface->format->BytesPerPixel - 1];
pdc->draw_src_span = draw_src_span_ops [pdc->rop]
[pdc->surface->format->BytesPerPixel - 1];
pdc->user_comp_ctxt = pdc->surface->format;
pdc->cur_dst = (BYTE*)pdc->surface->pixels
pdc->cur_dst = (BYTE*)pdc->surface->pixels
+ pdc->surface->pitch * pdc->DevRC.top
+ pdc->surface->format->BytesPerPixel * pdc->DevRC.left;
@@ -1864,6 +1865,7 @@ static void dc_InitMemDCFrom (PDC pdc, const PDC pdc_ref)
[pdc->surface->format->BytesPerPixel - 1];
pdc->draw_src_span = draw_src_span_ops [pdc->rop]
[pdc->surface->format->BytesPerPixel - 1];
pdc->user_comp_ctxt = pdc->surface->format;
pdc->cur_dst = (BYTE*)pdc->surface->pixels
+ pdc->surface->pitch * pdc->DevRC.top
@@ -1955,6 +1957,7 @@ static void dc_InitScreenDC (PDC pdc, GAL_Surface *surface)
[pdc->surface->format->BytesPerPixel - 1];
pdc->draw_src_span = draw_src_span_ops [pdc->rop]
[pdc->surface->format->BytesPerPixel - 1];
pdc->user_comp_ctxt = pdc->surface->format;
pdc->cur_dst = pdc->surface->pixels;
pdc->move_to = move_to_ops [pdc->surface->format->BytesPerPixel - 1];
@@ -1966,7 +1969,7 @@ static void dc_InitScreenDC (PDC pdc, GAL_Surface *surface)
/* Init bitmap scaler ALG */
SetBitmapScalerType((HDC)pdc, BITMAP_SCALER_DDA);
}
int GUIAPI GetRasterOperation (HDC hdc)
{
PDC pdc;
@@ -1992,6 +1995,7 @@ int GUIAPI SetRasterOperation (HDC hdc, int rop)
[pdc->surface->format->BytesPerPixel - 1];
pdc->draw_src_span = draw_src_span_ops [rop]
[pdc->surface->format->BytesPerPixel - 1];
pdc->user_comp_ctxt = pdc->surface->format;
}
return old;
@@ -3643,6 +3647,7 @@ BOOL GUIAPI RestoreDC (HDC hdc, int saved_dc)
[pdc->surface->format->BytesPerPixel - 1];
pdc->draw_src_span = draw_src_span_ops [pdc->rop]
[pdc->surface->format->BytesPerPixel - 1];
pdc->user_comp_ctxt = pdc->surface->format;
}
else if (ROP_COMP_USER == pdc->rop) {
pdc->draw_pixel = dc_state->user_set_pixel;