ReactOS  0.4.14-dev-376-gaedba84
bitblt.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS VGA display driver
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: win32ss/drivers/displays/vga/objects/bitblt.c
5  * PURPOSE:
6  * PROGRAMMERS:
7  */
8 
9 #include <vgaddi.h>
10 
11 #include "bitblt.h"
12 
14 typedef BOOL (APIENTRY *PBLTRECTFUNC)(SURFOBJ* OutputObj,
15  SURFOBJ* InputObj,
16  SURFOBJ* Mask,
17  XLATEOBJ* ColorTranslation,
18  RECTL* OutputRect,
19  POINTL* InputPoint,
20  POINTL* MaskOrigin,
21  BRUSHOBJ* Brush,
22  POINTL* BrushOrigin,
23  ROP4 Rop4);
24 
26  OUT RECTL* prcDst,
27  IN RECTL* prcSrc1,
28  IN RECTL* prcSrc2)
29 {
30  static const RECTL rclEmpty = { 0, 0, 0, 0 };
31 
32  prcDst->left = max(prcSrc1->left, prcSrc2->left);
33  prcDst->right = min(prcSrc1->right, prcSrc2->right);
34 
35  if (prcDst->left < prcDst->right)
36  {
37  prcDst->top = max(prcSrc1->top, prcSrc2->top);
38  prcDst->bottom = min(prcSrc1->bottom, prcSrc2->bottom);
39 
40  if (prcDst->top < prcDst->bottom) return(TRUE);
41  }
42 
43  *prcDst = rclEmpty;
44 
45  return FALSE;
46 }
47 
48 void DIB_BltToVGA_Fixed(int x, int y, int w, int h, void *b, int Source_lDelta, int mod);
49 
50 BOOL
52  IN SURFOBJ *Dest,
53  IN SURFOBJ *Source,
54  IN XLATEOBJ *ColorTranslation,
55  IN RECTL *DestRect,
56  IN POINTL *SourcePoint)
57 {
58  LONG dx, dy;
59 
60  dx = DestRect->right - DestRect->left;
61  dy = DestRect->bottom - DestRect->top;
62 
63  if (NULL == ColorTranslation || 0 != (ColorTranslation->flXlate & XO_TRIVIAL))
64  {
65  DIB_BltToVGA(DestRect->left, DestRect->top, dx, dy,
66  (PVOID)((ULONG_PTR)Source->pvScan0 + SourcePoint->y * Source->lDelta + (SourcePoint->x >> 1)),
67  Source->lDelta, SourcePoint->x % 2);
68  }
69  else
70  {
71  /* Perform color translation */
72  DIB_BltToVGAWithXlate(DestRect->left, DestRect->top, dx, dy,
73  (PVOID)((ULONG_PTR)Source->pvScan0 + SourcePoint->y * Source->lDelta + (SourcePoint->x >> 1)),
74  Source->lDelta, ColorTranslation);
75  }
76  return FALSE;
77 }
78 
79 BOOL
81  IN SURFOBJ *Dest,
82  IN SURFOBJ *Source,
83  IN XLATEOBJ *ColorTranslation,
84  IN RECTL *DestRect,
85  IN POINTL *SourcePoint)
86 {
87  LONG i, j, dx, dy;
88  UCHAR *GDIpos, *initial;
89 
90  /* Used by the temporary DFB */
91  //DEVSURF DestDevSurf;
92 
93  /* FIXME: Optimize to retrieve entire bytes at a time (see ../vgavideo/vgavideo.c:vgaGetByte) */
94 
95  GDIpos = Dest->pvScan0 /* + (DestRect->top * Dest->lDelta) + (DestRect->left >> 1) */ ;
96  dx = DestRect->right - DestRect->left;
97  dy = DestRect->bottom - DestRect->top;
98 
99  if (ColorTranslation == NULL)
100  {
101  /* Prepare a Dest Dev Target and copy from the DFB to the DIB */
102  //DestDevSurf.NextScan = Dest->lDelta;
103  //DestDevSurf.StartBmp = Dest->pvScan0;
104 
105  DIB_BltFromVGA(SourcePoint->x, SourcePoint->y, dx, dy, Dest->pvScan0, Dest->lDelta);
106  }
107  else
108  {
109  /* Color translation */
110  for (j = SourcePoint->y; j < SourcePoint->y + dy; j++)
111  {
112  initial = GDIpos;
113  for (i = SourcePoint->x; i < SourcePoint->x + dx; i++)
114  {
115  *GDIpos = XLATEOBJ_iXlate(ColorTranslation, vgaGetPixel(i, j));
116  GDIpos++;
117  }
118  GDIpos = initial + Dest->lDelta;
119  }
120  }
121  return FALSE;
122 }
123 
124 BOOL
126  IN SURFOBJ *Dest,
127  IN SURFOBJ *Source,
128  IN XLATEOBJ *ColorTranslation,
129  IN RECTL *DestRect,
130  IN POINTL *SourcePoint)
131 {
132  /* Do DFBs need color translation?? */
133  return FALSE;
134 }
135 
136 BOOL
138  IN SURFOBJ *Dest,
139  IN SURFOBJ *Source,
140  IN XLATEOBJ *ColorTranslation,
141  IN RECTL *DestRect,
142  IN POINTL *SourcePoint)
143 {
144  /* Do DFBs need color translation?? */
145  return FALSE;
146 }
147 
148 BOOL
150  IN SURFOBJ *Dest,
151  IN SURFOBJ *Source,
152  IN XLATEOBJ *ColorTranslation,
153  IN RECTL *DestRect,
154  IN POINTL *SourcePoint)
155 {
156  LONG i, i2, j, dx, dy, alterx, altery;
157  static char buf[SCREEN_X];
158 
159  /* Calculate deltas */
160  dx = DestRect->right - DestRect->left;
161  dy = DestRect->bottom - DestRect->top;
162 
163  alterx = DestRect->left - SourcePoint->x;
164  altery = DestRect->top - SourcePoint->y;
165 
166  i = SourcePoint->x;
167  i2 = i + alterx;
168 
169  if (SourcePoint->y >= DestRect->top)
170  {
171  for (j = SourcePoint->y; j < SourcePoint->y + dy; j++)
172  {
173  LONG j2 = j + altery;
174  vgaReadScan ( i, j, dx, buf );
175  vgaWriteScan ( i2, j2, dx, buf );
176  }
177  }
178  else
179  {
180  for(j = (SourcePoint->y + dy - 1); j >= SourcePoint->y; j--)
181  {
182  LONG j2 = j + altery;
183  vgaReadScan ( i, j, dx, buf );
184  vgaWriteScan ( i2, j2, dx, buf );
185  }
186  }
187 
188  return TRUE;
189 }
190 
193  IN SURFOBJ* Dest,
194  IN SURFOBJ* Source,
195  IN SURFOBJ* MaskSurf,
196  IN XLATEOBJ* ColorTranslation,
197  IN RECTL* DestRect,
198  IN POINTL* SourcePoint,
199  IN POINTL* MaskPoint,
200  IN BRUSHOBJ* Brush,
201  IN POINTL* BrushPoint,
202  IN ROP4 Rop4)
203 {
204  UCHAR SolidColor = 0;
205  LONG Left;
206  LONG Length;
207  PUCHAR Video;
208  UCHAR Mask;
209  INT i, j;
210  ULONG RasterOp = VGA_NORMAL;
211 
212  /* Punt brush blts to non-device surfaces. */
213  if (Dest->iType != STYPE_DEVICE)
214  return FALSE;
215 
216  /* Punt pattern fills. */
219  Brush->iSolidColor == 0xFFFFFFFF)
220  {
221  return FALSE;
222  }
223 
224  /* Get the brush colour. */
225  switch (GET_OPINDEX_FROM_ROP4(Rop4))
226  {
227  case GET_OPINDEX_FROM_ROP3(PATCOPY): SolidColor = Brush->iSolidColor; break;
228  case GET_OPINDEX_FROM_ROP3(PATINVERT): SolidColor = Brush->iSolidColor; RasterOp = VGA_XOR; break;
229  case GET_OPINDEX_FROM_ROP3(WHITENESS): SolidColor = 0xF; break;
230  case GET_OPINDEX_FROM_ROP3(BLACKNESS): SolidColor = 0x0; break;
231  case GET_OPINDEX_FROM_ROP3(DSTINVERT): SolidColor = 0xF; RasterOp = VGA_XOR; break;
232  }
233 
234  /* Select write mode 3. */
235  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05);
236  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x03);
237 
238  /* Setup set/reset register. */
239  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x00);
240  WRITE_PORT_UCHAR((PUCHAR)GRA_D, (UCHAR)SolidColor);
241 
242  /* Enable writes to all pixels. */
243  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x08);
244  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0xFF);
245 
246  /* Set up data rotate. */
247  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x03);
248  WRITE_PORT_UCHAR((PUCHAR)GRA_D, RasterOp);
249 
250  /* Fill any pixels on the left which don't fall into a full row of eight. */
251  if ((DestRect->left % 8) != 0)
252  {
253  /* Disable writes to pixels outside of the destination rectangle. */
254  Mask = (1 << (8 - (DestRect->left % 8))) - 1;
255  if ((DestRect->right - DestRect->left) < (8 - (DestRect->left % 8)))
256  Mask &= ~((1 << (8 - (DestRect->right % 8))) - 1);
257 
258  /* Write the same color to each pixel. */
259  Video = (PUCHAR)vidmem + DestRect->top * 80 + (DestRect->left >> 3);
260  for (i = DestRect->top; i < DestRect->bottom; i++, Video += 80)
261  {
262  (VOID)READ_REGISTER_UCHAR(Video);
263  WRITE_REGISTER_UCHAR(Video, Mask);
264  }
265 
266  /* Have we finished. */
267  if ((DestRect->right - DestRect->left) < (8 - (DestRect->left % 8)))
268  {
269  /* Restore write mode 2. */
270  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05);
271  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x02);
272 
273  /* Set up data rotate. */
274  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x03);
275  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x00);
276 
277  return TRUE;
278  }
279  }
280 
281  /* Fill any whole rows of eight pixels. */
282  Left = (DestRect->left + 7) & ~0x7;
283  Length = (DestRect->right >> 3) - (Left >> 3);
284  for (i = DestRect->top; i < DestRect->bottom; i++)
285  {
286  Video = (PUCHAR)vidmem + i * 80 + (Left >> 3);
287  for (j = 0; j < Length; j++, Video++)
288  {
289 #if 0
290  (VOID)READ_REGISTER_UCHAR(Video);
291  WRITE_REGISTER_UCHAR(Video, 0xFF);
292 #else
293  char volatile Temp = *Video;
294  Temp |= 0;
295  *Video = 0xFF;
296 #endif
297  }
298  }
299 
300  /* Fill any pixels on the right which don't fall into a complete row. */
301  if ((DestRect->right % 8) != 0)
302  {
303  /* Disable writes to pixels outside the destination rectangle. */
304  Mask = ~((1 << (8 - (DestRect->right % 8))) - 1);
305 
306  Video = (PUCHAR)vidmem + DestRect->top * 80 + (DestRect->right >> 3);
307  for (i = DestRect->top; i < DestRect->bottom; i++, Video += 80)
308  {
309  (VOID)READ_REGISTER_UCHAR(Video);
310  WRITE_REGISTER_UCHAR(Video, Mask);
311  }
312  }
313 
314  /* Restore write mode 2. */
315  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05);
316  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x02);
317 
318  /* Set up data rotate. */
319  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x03);
320  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x00);
321 
322  return TRUE;
323 }
324 
327  IN SURFOBJ* Dest,
328  IN SURFOBJ* Source,
329  IN SURFOBJ* Mask,
330  IN XLATEOBJ* ColorTranslation,
331  IN RECTL* DestRect,
332  IN POINTL* SourcePoint,
333  IN POINTL* MaskOrigin,
334  IN BRUSHOBJ* Brush,
335  IN POINTL* BrushOrigin,
336  IN ROP4 Rop4)
337 {
338  PFN_VGABlt BltOperation;
339  ULONG SourceType;
340 
341  SourceType = Source->iType;
342 
343  if (SourceType == STYPE_BITMAP && Dest->iType == STYPE_DEVICE)
344  BltOperation = DIBtoVGA;
345  else if (SourceType == STYPE_DEVICE && Dest->iType == STYPE_BITMAP)
346  BltOperation = VGAtoDIB;
347  else if (SourceType == STYPE_DEVICE && Dest->iType == STYPE_DEVICE)
348  BltOperation = VGAtoVGA;
349  else if (SourceType == STYPE_DEVBITMAP && Dest->iType == STYPE_DEVICE)
350  BltOperation = DFBtoVGA;
351  else if (SourceType == STYPE_DEVICE && Dest->iType == STYPE_DEVBITMAP)
352  BltOperation = VGAtoDFB;
353  else
354  {
355  /* Punt blts not involving a device or a device-bitmap. */
356  return FALSE;
357  }
358 
359  BltOperation(Dest, Source, ColorTranslation, DestRect, SourcePoint);
360  return TRUE;
361 }
362 
365  IN SURFOBJ* Dest,
366  IN SURFOBJ* Source,
367  IN SURFOBJ* Mask,
368  IN XLATEOBJ* ColorTranslation,
369  IN RECTL* DestRect,
370  IN POINTL* SourcePoint,
371  IN POINTL* MaskPoint,
372  IN BRUSHOBJ* Brush,
373  IN POINTL* BrushPoint,
374  IN ROP4 Rop4)
375 {
376  LONG i, j, dx, dy, c8;
377  BYTE *tMask, *lMask;
378 
379  dx = DestRect->right - DestRect->left;
380  dy = DestRect->bottom - DestRect->top;
381 
382  if (ColorTranslation == NULL)
383  {
384  if (Mask != NULL)
385  {
386  tMask = Mask->pvScan0;
387  for (j = 0; j < dy; j++)
388  {
389  lMask = tMask;
390  c8 = 0;
391  for (i = 0; i < dx; i++)
392  {
393  if((*lMask & maskbit[c8]) != 0)
394  vgaPutPixel(DestRect->left + i, DestRect->top + j, Brush->iSolidColor);
395  c8++;
396  if(c8 == 8)
397  {
398  lMask++;
399  c8=0;
400  }
401  }
402  tMask += Mask->lDelta;
403  }
404  }
405  }
406  return TRUE;
407 }
408 
411  IN SURFOBJ *Dest,
412  IN SURFOBJ *Source,
413  IN SURFOBJ *Mask,
414  IN CLIPOBJ *Clip,
415  IN XLATEOBJ *ColorTranslation,
416  IN RECTL *DestRect,
417  IN POINTL *SourcePoint,
418  IN POINTL *MaskPoint,
419  IN BRUSHOBJ *Brush,
420  IN POINTL *BrushPoint,
421  IN ROP4 rop4)
422 {
423  PBLTRECTFUNC BltRectFunc;
424  RECTL CombinedRect;
425  BOOL Ret = FALSE;
426  RECT_ENUM RectEnum;
427  BOOL EnumMore;
428  UINT i;
429  POINTL Pt;
431  POINTL FinalSourcePoint;
432 
433  if (Source && SourcePoint)
434  {
435  FinalSourcePoint.x = SourcePoint->x;
436  FinalSourcePoint.y = SourcePoint->y;
437  }
438  else
439  {
440  FinalSourcePoint.x = 0;
441  FinalSourcePoint.y = 0;
442  }
443 
444  switch (rop4)
445  {
446  case ROP3_TO_ROP4(BLACKNESS):
447  case ROP3_TO_ROP4(PATCOPY):
448  case ROP3_TO_ROP4(WHITENESS):
449  case ROP3_TO_ROP4(PATINVERT):
450  case ROP3_TO_ROP4(DSTINVERT):
451  BltRectFunc = VGADDI_BltBrush;
452  break;
453 
454  case ROP3_TO_ROP4(SRCCOPY):
455  if (BMF_4BPP == Source->iBitmapFormat && BMF_4BPP == Dest->iBitmapFormat)
456  BltRectFunc = VGADDI_BltSrc;
457  else
458  return FALSE;
459  break;
460 
461  case R4_MASK:
462  BltRectFunc = VGADDI_BltMask;
463  break;
464 
465  default:
466  return FALSE;
467  }
468 
469  switch (NULL == Clip ? DC_TRIVIAL : Clip->iDComplexity)
470  {
471  case DC_TRIVIAL:
472  Ret = (*BltRectFunc)(Dest, Source, Mask, ColorTranslation, DestRect,
473  SourcePoint, MaskPoint, Brush, BrushPoint,
474  rop4);
475  break;
476  case DC_RECT:
477  /* Clip the blt to the clip rectangle */
478  VGADDI_IntersectRect(&CombinedRect, DestRect, &(Clip->rclBounds));
479  Pt.x = FinalSourcePoint.x + CombinedRect.left - DestRect->left;
480  Pt.y = FinalSourcePoint.y + CombinedRect.top - DestRect->top;
481  Ret = (*BltRectFunc)(Dest, Source, Mask, ColorTranslation, &CombinedRect,
482  &Pt, MaskPoint, Brush, BrushPoint,
483  rop4);
484  break;
485  case DC_COMPLEX:
486  Ret = TRUE;
487  if (Dest == Source)
488  {
489  if (DestRect->top <= FinalSourcePoint.y)
490  Direction = DestRect->left < FinalSourcePoint.y ? CD_RIGHTDOWN : CD_LEFTDOWN;
491  else
492  Direction = DestRect->left < FinalSourcePoint.x ? CD_RIGHTUP : CD_LEFTUP;
493  }
494  else
495  {
496  Direction = CD_ANY;
497  }
499  do
500  {
501  EnumMore = CLIPOBJ_bEnum(Clip, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
502 
503  for (i = 0; i < RectEnum.c; i++)
504  {
505  VGADDI_IntersectRect(&CombinedRect, DestRect, RectEnum.arcl + i);
506  Pt.x = FinalSourcePoint.x + CombinedRect.left - DestRect->left;
507  Pt.y = FinalSourcePoint.y + CombinedRect.top - DestRect->top;
508  Ret = (*BltRectFunc)(Dest, Source, Mask, ColorTranslation, &CombinedRect,
509  &Pt, MaskPoint, Brush, BrushPoint, rop4) &&
510  Ret;
511  }
512  } while (EnumMore);
513  break;
514  }
515 
516  return Ret;
517 }
#define STYPE_DEVICE
Definition: lmshare.h:24
#define STYPE_DEVBITMAP
Definition: winddi.h:1177
BOOL APIENTRY VGADDI_BltBrush(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *MaskSurf, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskPoint, IN BRUSHOBJ *Brush, IN POINTL *BrushPoint, IN ROP4 Rop4)
Definition: bitblt.c:192
Definition: xlate.c:9
#define IN
Definition: typedefs.h:38
#define max(a, b)
Definition: svc.c:63
PBYTE vidmem
Definition: vgavideo.c:18
#define TRUE
Definition: types.h:120
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
#define PATINVERT
Definition: wingdi.h:327
#define SCREEN_X
Definition: vgavideo.h:2
#define STYPE_BITMAP
Definition: winddi.h:1175
BOOL(APIENTRY * PBLTRECTFUNC)(SURFOBJ *OutputObj, SURFOBJ *InputObj, SURFOBJ *Mask, XLATEOBJ *ColorTranslation, RECTL *OutputRect, POINTL *InputPoint, POINTL *MaskOrigin, BRUSHOBJ *Brush, POINTL *BrushOrigin, ROP4 Rop4)
Definition: bitblt.c:14
BOOL APIENTRY VGADDI_BltMask(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *Mask, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskPoint, IN BRUSHOBJ *Brush, IN POINTL *BrushPoint, IN ROP4 Rop4)
Definition: bitblt.c:364
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define GET_OPINDEX_FROM_ROP3(Rop3)
Definition: bitblt.h:24
GLint dy
Definition: linetemp.h:97
unsigned char * PUCHAR
Definition: retypes.h:3
#define R4_MASK
Definition: bitblt.h:29
#define GET_OPINDEX_FROM_ROP4(Rop4)
Definition: bitblt.h:25
#define GRA_I
Definition: vgavideo.h:59
#define DC_TRIVIAL
Definition: winddi.h:259
VOID FASTCALL vgaReadScan(int x, int y, int w, void *b)
Definition: vgavideo.c:579
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL _In_opt_ POINTL _In_opt_ BRUSHOBJ _In_opt_ POINTL _In_ ROP4 rop4
Definition: winddi.h:3433
VOID vgaPutPixel(INT x, INT y, UCHAR c)
Definition: vgavideo.c:163
BOOL APIENTRY VGADDI_BltSrc(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *Mask, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskOrigin, IN BRUSHOBJ *Brush, IN POINTL *BrushOrigin, IN ROP4 Rop4)
Definition: bitblt.c:326
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
INT vgaGetPixel(IN INT x, IN INT y)
Definition: vgavideo.c:206
ULONG ROP4
Definition: winddi.h:128
#define BOOL
Definition: nt_native.h:43
#define FASTCALL
Definition: nt_native.h:50
int32_t INT
Definition: typedefs.h:56
int maskbit[640]
Definition: vgavideo.c:12
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
LONG y
Definition: windef.h:315
uint32_t ULONG_PTR
Definition: typedefs.h:63
BOOL DFBtoVGA(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
Definition: bitblt.c:125
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelta, XLATEOBJ *Xlate)
Definition: vgavideo.c:491
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define CD_RIGHTDOWN
Definition: winddi.h:1320
long top
Definition: polytest.cpp:53
BOOL VGAtoVGA(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
Definition: bitblt.c:149
BOOL APIENTRY DrvBitBlt(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *Mask, IN CLIPOBJ *Clip, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskPoint, IN BRUSHOBJ *Brush, IN POINTL *BrushPoint, IN ROP4 rop4)
Definition: bitblt.c:410
void Brush(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, LONG style)
Definition: drawing.cpp:160
smooth NULL
Definition: ftsmooth.c:416
#define CT_RECTANGLES
Definition: winddi.h:1317
GLint GLint bottom
Definition: glext.h:7726
void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta)
Definition: vgavideo.c:352
long left
Definition: polytest.cpp:53
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define DSTINVERT
Definition: wingdi.h:326
#define DC_RECT
Definition: winddi.h:260
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define CD_RIGHTUP
Definition: winddi.h:1323
ENGAPI ULONG APIENTRY CLIPOBJ_cEnumStart(_Inout_ CLIPOBJ *pco, _In_ BOOL bAll, _In_ ULONG iType, _In_ ULONG iDirection, _In_ ULONG cLimit)
Definition: clip.c:255
static const RECTL rclEmpty
Definition: vgavideo.c:331
BOOL DIBtoVGA(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
Definition: bitblt.c:51
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION Direction
Definition: mmfuncs.h:773
LONG x
Definition: windef.h:314
static BOOL FASTCALL VGADDI_IntersectRect(OUT RECTL *prcDst, IN RECTL *prcSrc1, IN RECTL *prcSrc2)
Definition: bitblt.c:25
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define VGA_XOR
Definition: vgavideo.h:10
#define VGA_NORMAL
Definition: vgavideo.h:7
unsigned char UCHAR
Definition: xmlstorage.h:181
#define CD_LEFTDOWN
Definition: winddi.h:1321
#define VOID
Definition: acefi.h:82
unsigned char BYTE
Definition: mem.h:68
#define CD_LEFTUP
Definition: winddi.h:1325
#define WHITENESS
Definition: wingdi.h:336
BOOL VGAtoDFB(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
Definition: bitblt.c:137
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)
#define XO_TRIVIAL
Definition: winddi.h:1247
#define PATCOPY
Definition: wingdi.h:334
#define ROP3_TO_ROP4(Rop3)
Definition: bitblt.h:26
void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int StartMod)
Definition: vgavideo.c:447
#define DC_COMPLEX
Definition: winddi.h:261
BOOL(* PFN_VGABlt)(SURFOBJ *, SURFOBJ *, XLATEOBJ *, RECTL *, POINTL *)
Definition: bitblt.c:13
#define BLACKNESS
Definition: wingdi.h:322
void DIB_BltToVGA_Fixed(int x, int y, int w, int h, void *b, int Source_lDelta, int mod)
#define GRA_D
Definition: vgavideo.h:60
#define min(a, b)
Definition: monoChain.cc:55
BOOL VGAtoDIB(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
Definition: bitblt.c:80
unsigned int UINT
Definition: ndis.h:50
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint dx
Definition: linetemp.h:97
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
void WRITE_PORT_UCHAR(PUCHAR Address, UCHAR Value)
Definition: mach.c:532
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167
VOID FASTCALL vgaWriteScan(int x, int y, int w, void *b)
Definition: vgavideo.c:655
ENGAPI ULONG APIENTRY XLATEOBJ_iXlate(_In_ XLATEOBJ *pxlo, _In_ ULONG iColor)
Definition: xlateobj.c:664
ENGAPI BOOL APIENTRY CLIPOBJ_bEnum(_In_ CLIPOBJ *pco, _In_ ULONG cj, _Out_bytecap_(cj) ULONG *pul)
Definition: clip.c:319
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)
#define SRCCOPY
Definition: wingdi.h:332
#define APIENTRY
Definition: api.h:79
#define CD_ANY
Definition: winddi.h:1326
static int mod
Definition: i386-dis.c:1273