Author: fireball
Date: Sat Jul 3 12:29:09 2010
New Revision: 47928
URL:
http://svn.reactos.org/svn/reactos?rev=47928&view=rev
Log:
- Properly pass antialiasing information to the kernelmode text output routine.
- Delete unused code.
Modified:
branches/arwinss/reactos/dll/win32/winent.drv/font.c
branches/arwinss/reactos/include/psdk/ntrosgdi.h
branches/arwinss/reactos/subsystems/win32/win32k/gdi/misc.c
branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c
branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h
branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: branches/arwinss/reactos/dll/win32/winent.drv/font.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winent.drv/font.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winent.drv/font.c [iso-8859-1] Sat Jul 3 12:29:09
2010
@@ -685,150 +685,8 @@
TRACE("Writing %s at %d,%d\n", debugstr_wn(wstr,count),
/*physDev->dc_rect.left +*/ x, /*physDev->dc_rect.top +*/ y);
- RosGdiExtTextOut(physDev->hKernelDC, x, y, flags, lprect, wstr, count, lpDx,
formatEntry);
-
-#if 0
- {
- INT offset = 0, xoff = 0, yoff = 0;
- wine_tsx11_lock();
- XSetForeground( gdi_display, physDev->gc, textPixel );
-
- if(aa_type == AA_None || physDev->depth == 1)
- {
- void (* sharp_glyph_fn)(X11DRV_PDEVICE *, INT, INT, void *, XGlyphInfo *);
-
- if(aa_type == AA_None)
- sharp_glyph_fn = SharpGlyphMono;
- else
- sharp_glyph_fn = SharpGlyphGray;
-
- for(idx = 0; idx < count; idx++) {
- sharp_glyph_fn(physDev, physDev->dc_rect.left + x + xoff,
- physDev->dc_rect.top + y + yoff,
- formatEntry->bitmaps[wstr[idx]],
- &formatEntry->gis[wstr[idx]]);
- if(lpDx) {
- offset += lpDx[idx];
- xoff = offset * cosEsc;
- yoff = offset * -sinEsc;
- } else {
- xoff += formatEntry->gis[wstr[idx]].xOff;
- yoff += formatEntry->gis[wstr[idx]].yOff;
- }
- }
- } else {
- XImage *image;
- int image_x, image_y, image_off_x, image_off_y, image_w, image_h;
- RECT extents = {0, 0, 0, 0};
- POINT cur = {0, 0};
- int w = physDev->drawable_rect.right - physDev->drawable_rect.left;
- int h = physDev->drawable_rect.bottom - physDev->drawable_rect.top;
-
- TRACE("drawable %dx%d\n", w, h);
-
- for(idx = 0; idx < count; idx++) {
- if(extents.left > cur.x - formatEntry->gis[wstr[idx]].x)
- extents.left = cur.x - formatEntry->gis[wstr[idx]].x;
- if(extents.top > cur.y - formatEntry->gis[wstr[idx]].y)
- extents.top = cur.y - formatEntry->gis[wstr[idx]].y;
- if(extents.right < cur.x - formatEntry->gis[wstr[idx]].x +
formatEntry->gis[wstr[idx]].width)
- extents.right = cur.x - formatEntry->gis[wstr[idx]].x +
formatEntry->gis[wstr[idx]].width;
- if(extents.bottom < cur.y - formatEntry->gis[wstr[idx]].y +
formatEntry->gis[wstr[idx]].height)
- extents.bottom = cur.y - formatEntry->gis[wstr[idx]].y +
formatEntry->gis[wstr[idx]].height;
- if(lpDx) {
- offset += lpDx[idx];
- cur.x = offset * cosEsc;
- cur.y = offset * -sinEsc;
- } else {
- cur.x += formatEntry->gis[wstr[idx]].xOff;
- cur.y += formatEntry->gis[wstr[idx]].yOff;
- }
- }
- TRACE("glyph extents %d,%d - %d,%d drawable x,y %d,%d\n",
extents.left, extents.top,
- extents.right, extents.bottom, physDev->dc_rect.left + x,
physDev->dc_rect.top + y);
-
- if(physDev->dc_rect.left + x + extents.left >= 0) {
- image_x = physDev->dc_rect.left + x + extents.left;
- image_off_x = 0;
- } else {
- image_x = 0;
- image_off_x = physDev->dc_rect.left + x + extents.left;
- }
- if(physDev->dc_rect.top + y + extents.top >= 0) {
- image_y = physDev->dc_rect.top + y + extents.top;
- image_off_y = 0;
- } else {
- image_y = 0;
- image_off_y = physDev->dc_rect.top + y + extents.top;
- }
- if(physDev->dc_rect.left + x + extents.right < w)
- image_w = physDev->dc_rect.left + x + extents.right - image_x;
- else
- image_w = w - image_x;
- if(physDev->dc_rect.top + y + extents.bottom < h)
- image_h = physDev->dc_rect.top + y + extents.bottom - image_y;
- else
- image_h = h - image_y;
-
- if(image_w <= 0 || image_h <= 0) goto no_image;
-
- X11DRV_expect_error(gdi_display, XRenderErrorHandler, NULL);
- image = XGetImage(gdi_display, physDev->drawable,
- image_x, image_y, image_w, image_h,
- AllPlanes, ZPixmap);
- X11DRV_check_error();
-
- TRACE("XGetImage(%p, %x, %d, %d, %d, %d, %lx, %x) depth = %d rets
%p\n",
- gdi_display, (int)physDev->drawable, image_x, image_y,
- image_w, image_h, AllPlanes, ZPixmap,
- physDev->depth, image);
- if(!image) {
- Pixmap xpm = XCreatePixmap(gdi_display, root_window, image_w, image_h,
- physDev->depth);
- GC gc;
- XGCValues gcv;
-
- gcv.graphics_exposures = False;
- gc = XCreateGC(gdi_display, xpm, GCGraphicsExposures, &gcv);
- XCopyArea(gdi_display, physDev->drawable, xpm, gc, image_x, image_y,
- image_w, image_h, 0, 0);
- XFreeGC(gdi_display, gc);
- X11DRV_expect_error(gdi_display, XRenderErrorHandler, NULL);
- image = XGetImage(gdi_display, xpm, 0, 0, image_w, image_h, AllPlanes,
- ZPixmap);
- X11DRV_check_error();
- XFreePixmap(gdi_display, xpm);
- }
- if(!image) goto no_image;
-
- image->red_mask = visual->red_mask;
- image->green_mask = visual->green_mask;
- image->blue_mask = visual->blue_mask;
-
- offset = xoff = yoff = 0;
- for(idx = 0; idx < count; idx++) {
- SmoothGlyphGray(image, xoff + image_off_x - extents.left,
- yoff + image_off_y - extents.top,
- formatEntry->bitmaps[wstr[idx]],
- &formatEntry->gis[wstr[idx]],
- physDev->textPixel);
- if(lpDx) {
- offset += lpDx[idx];
- xoff = offset * cosEsc;
- yoff = offset * -sinEsc;
- } else {
- xoff += formatEntry->gis[wstr[idx]].xOff;
- yoff += formatEntry->gis[wstr[idx]].yOff;
- }
- }
- XPutImage(gdi_display, physDev->drawable, physDev->gc, image, 0, 0,
- image_x, image_y, image_w, image_h);
- XDestroyImage(image);
- }
-no_image:
- wine_tsx11_unlock();
- }
-#endif
+ RosGdiExtTextOut(physDev->hKernelDC, x, y, flags, lprect, wstr, count, lpDx,
formatEntry, aa_type);
+
//LeaveCriticalSection(&xrender_cs);
if (flags & ETO_CLIPPED)
Modified: branches/arwinss/reactos/include/psdk/ntrosgdi.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/psdk/nt…
==============================================================================
--- branches/arwinss/reactos/include/psdk/ntrosgdi.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/include/psdk/ntrosgdi.h [iso-8859-1] Sat Jul 3 12:29:09
2010
@@ -155,7 +155,8 @@
UINT fillType );
BOOL APIENTRY RosGdiExtTextOut( HDC physDev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR wstr, UINT count,
- const INT *lpDx, gsCacheEntryFormat *formatEntry );
+ const INT *lpDx, gsCacheEntryFormat *formatEntry,
+ AA_Type aa_type );
BOOL APIENTRY RosGdiLineTo( HDC physDev, INT x1, INT y1, INT x2, INT y2 );
BOOL APIENTRY RosGdiPolyPolygon( HDC physDev, const POINT* pt, const INT* counts, UINT
polygons);
BOOL APIENTRY RosGdiPolyPolyline( HDC physDev, const POINT* pt, const DWORD* counts,
DWORD polylines );
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/misc.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gdi/misc.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/misc.c [iso-8859-1] Sat Jul 3
12:29:09 2010
@@ -53,7 +53,8 @@
BOOL APIENTRY RosGdiExtTextOut( HDC physDev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR wstr, UINT count,
- const INT *lpDx, gsCacheEntryFormat *formatEntry )
+ const INT *lpDx, gsCacheEntryFormat *formatEntry,
+ AA_Type aa_type)
{
PDC pDC;
@@ -61,7 +62,7 @@
pDC = DC_Lock(physDev);
/* Call GRE routine */
- GreTextOut(pDC, x, y, flags, lprect, wstr, count, lpDx, formatEntry);
+ GreTextOut(pDC, x, y, flags, lprect, wstr, count, lpDx, formatEntry, aa_type);
/* Release the object */
DC_Unlock(pDC);
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c [iso-8859-1] Sat Jul 3
12:29:09 2010
@@ -196,10 +196,10 @@
VOID NTAPI
GreTextOut(PDC pDC, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR wstr, UINT count,
- const INT *lpDx, gsCacheEntryFormat *formatEntry)
+ const INT *lpDx, gsCacheEntryFormat *formatEntry,
+ AA_Type aa_type)
{
POINT offset = {0, 0};
- AA_Type aa_type = AA_None;
INT idx;
BRUSHGDI *pTextPen;
Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h [iso-8859-1] Sat Jul 3
12:29:09 2010
@@ -191,7 +191,8 @@
VOID NTAPI
GreTextOut(PDC pDC, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR wstr, UINT count,
- const INT *lpDx, gsCacheEntryFormat *formatEntry);
+ const INT *lpDx, gsCacheEntryFormat *formatEntry,
+ AA_Type aa_type);
/* lineto.c */
BOOLEAN NTAPI
Modified: branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Sat Jul 3
12:29:09 2010
@@ -50,7 +50,7 @@
RosGdiEllipse 5
RosGdiExtEscape 6
RosGdiExtFloodFill 5
-RosGdiExtTextOut 9
+RosGdiExtTextOut 10
RosGdiLineTo 5
RosGdiPolyPolygon 4
RosGdiPolyPolyline 4