mipict.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. /*
  2. *
  3. * Copyright © 1999 Keith Packard
  4. *
  5. * Permission to use, copy, modify, distribute, and sell this software and its
  6. * documentation for any purpose is hereby granted without fee, provided that
  7. * the above copyright notice appear in all copies and that both that
  8. * copyright notice and this permission notice appear in supporting
  9. * documentation, and that the name of Keith Packard not be used in
  10. * advertising or publicity pertaining to distribution of the software without
  11. * specific, written prior permission. Keith Packard makes no
  12. * representations about the suitability of this software for any purpose. It
  13. * is provided "as is" without express or implied warranty.
  14. *
  15. * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  16. * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  17. * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  18. * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  19. * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  20. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  21. * PERFORMANCE OF THIS SOFTWARE.
  22. */
  23. #ifdef HAVE_DIX_CONFIG_H
  24. #include <dix-config.h>
  25. #endif
  26. #include "scrnintstr.h"
  27. #include "gcstruct.h"
  28. #include "pixmapstr.h"
  29. #include "windowstr.h"
  30. #include "mi.h"
  31. #include "picturestr.h"
  32. #include "mipict.h"
  33. #ifndef __GNUC__
  34. #define __inline
  35. #endif
  36. int
  37. miCreatePicture(PicturePtr pPicture)
  38. {
  39. return Success;
  40. }
  41. void
  42. miDestroyPicture(PicturePtr pPicture)
  43. {
  44. if (pPicture->freeCompClip)
  45. REGION_DESTROY(pPicture->pCompositeClip);
  46. }
  47. void
  48. miDestroyPictureClip(PicturePtr pPicture)
  49. {
  50. switch (pPicture->clientClipType) {
  51. case CT_NONE:
  52. return;
  53. case CT_PIXMAP:
  54. (*pPicture->pDrawable->pScreen->
  55. DestroyPixmap) ((PixmapPtr) (pPicture->clientClip));
  56. break;
  57. default:
  58. /*
  59. * we know we'll never have a list of rectangles, since ChangeClip
  60. * immediately turns them into a region
  61. */
  62. REGION_DESTROY(pPicture->clientClip);
  63. break;
  64. }
  65. pPicture->clientClip = NULL;
  66. pPicture->clientClipType = CT_NONE;
  67. }
  68. int
  69. miChangePictureClip(PicturePtr pPicture, int type, pointer value, int n)
  70. {
  71. ScreenPtr pScreen = pPicture->pDrawable->pScreen;
  72. PictureScreenPtr ps = GetPictureScreen(pScreen);
  73. pointer clientClip;
  74. int clientClipType;
  75. switch (type) {
  76. case CT_PIXMAP:
  77. /* convert the pixmap to a region */
  78. clientClip = (pointer) BITMAP_TO_REGION(pScreen, (PixmapPtr) value);
  79. if (!clientClip)
  80. return BadAlloc;
  81. clientClipType = CT_REGION;
  82. (*pScreen->DestroyPixmap) ((PixmapPtr) value);
  83. break;
  84. case CT_REGION:
  85. clientClip = value;
  86. clientClipType = CT_REGION;
  87. break;
  88. case CT_NONE:
  89. clientClip = 0;
  90. clientClipType = CT_NONE;
  91. break;
  92. default:
  93. clientClip = (pointer) RECTS_TO_REGION(n,
  94. (xRectangle *) value, type);
  95. if (!clientClip)
  96. return BadAlloc;
  97. clientClipType = CT_REGION;
  98. free(value);
  99. break;
  100. }
  101. (*ps->DestroyPictureClip) (pPicture);
  102. pPicture->clientClip = clientClip;
  103. pPicture->clientClipType = clientClipType;
  104. pPicture->stateChanges |= CPClipMask;
  105. return Success;
  106. }
  107. void
  108. miChangePicture(PicturePtr pPicture, Mask mask)
  109. {
  110. return;
  111. }
  112. void
  113. miValidatePicture(PicturePtr pPicture, Mask mask)
  114. {
  115. DrawablePtr pDrawable = pPicture->pDrawable;
  116. if ((mask & (CPClipXOrigin | CPClipYOrigin | CPClipMask | CPSubwindowMode))
  117. || (pDrawable->serialNumber !=
  118. (pPicture->serialNumber & DRAWABLE_SERIAL_BITS))) {
  119. if (pDrawable->type == DRAWABLE_WINDOW) {
  120. WindowPtr pWin = (WindowPtr) pDrawable;
  121. RegionPtr pregWin;
  122. Bool freeTmpClip, freeCompClip;
  123. if (pPicture->subWindowMode == IncludeInferiors) {
  124. pregWin = NotClippedByChildren(pWin);
  125. freeTmpClip = TRUE;
  126. }
  127. else {
  128. pregWin = &pWin->clipList;
  129. freeTmpClip = FALSE;
  130. }
  131. freeCompClip = pPicture->freeCompClip;
  132. /*
  133. * if there is no client clip, we can get by with just keeping the
  134. * pointer we got, and remembering whether or not should destroy
  135. * (or maybe re-use) it later. this way, we avoid unnecessary
  136. * copying of regions. (this wins especially if many clients clip
  137. * by children and have no client clip.)
  138. */
  139. if (pPicture->clientClipType == CT_NONE) {
  140. if (freeCompClip)
  141. REGION_DESTROY(pPicture->pCompositeClip);
  142. pPicture->pCompositeClip = pregWin;
  143. pPicture->freeCompClip = freeTmpClip;
  144. }
  145. else {
  146. /*
  147. * we need one 'real' region to put into the composite clip. if
  148. * pregWin the current composite clip are real, we can get rid of
  149. * one. if pregWin is real and the current composite clip isn't,
  150. * use pregWin for the composite clip. if the current composite
  151. * clip is real and pregWin isn't, use the current composite
  152. * clip. if neither is real, create a new region.
  153. */
  154. REGION_TRANSLATE(pPicture->clientClip,
  155. pDrawable->x + pPicture->clipOrigin.x,
  156. pDrawable->y + pPicture->clipOrigin.y);
  157. if (freeCompClip) {
  158. REGION_INTERSECT(pPicture->pCompositeClip,
  159. pregWin, pPicture->clientClip);
  160. if (freeTmpClip)
  161. REGION_DESTROY(pregWin);
  162. }
  163. else if (freeTmpClip) {
  164. REGION_INTERSECT(pregWin, pregWin,
  165. pPicture->clientClip);
  166. pPicture->pCompositeClip = pregWin;
  167. }
  168. else {
  169. pPicture->pCompositeClip =
  170. REGION_CREATE(NullBox, 0);
  171. REGION_INTERSECT(pPicture->pCompositeClip, pregWin,
  172. pPicture->clientClip);
  173. }
  174. pPicture->freeCompClip = TRUE;
  175. REGION_TRANSLATE(pPicture->clientClip,
  176. -(pDrawable->x + pPicture->clipOrigin.x),
  177. -(pDrawable->y + pPicture->clipOrigin.y));
  178. }
  179. } /* end of composite clip for a window */
  180. else {
  181. BoxRec pixbounds;
  182. /* XXX should we translate by drawable.x/y here ? */
  183. /* If you want pixmaps in offscreen memory, yes */
  184. pixbounds.x1 = pDrawable->x;
  185. pixbounds.y1 = pDrawable->y;
  186. pixbounds.x2 = pDrawable->x + pDrawable->width;
  187. pixbounds.y2 = pDrawable->y + pDrawable->height;
  188. if (pPicture->freeCompClip) {
  189. REGION_RESET(pPicture->pCompositeClip, &pixbounds);
  190. }
  191. else {
  192. pPicture->freeCompClip = TRUE;
  193. pPicture->pCompositeClip =
  194. REGION_CREATE(&pixbounds, 1);
  195. }
  196. if (pPicture->clientClipType == CT_REGION) {
  197. if (pDrawable->x || pDrawable->y) {
  198. REGION_TRANSLATE(pPicture->clientClip,
  199. pDrawable->x + pPicture->clipOrigin.x,
  200. pDrawable->y + pPicture->clipOrigin.y);
  201. REGION_INTERSECT(pPicture->pCompositeClip,
  202. pPicture->pCompositeClip,
  203. pPicture->clientClip);
  204. REGION_TRANSLATE(pPicture->clientClip,
  205. -(pDrawable->x + pPicture->clipOrigin.x),
  206. -(pDrawable->y + pPicture->clipOrigin.y));
  207. }
  208. else {
  209. REGION_TRANSLATE(pPicture->pCompositeClip,
  210. -pPicture->clipOrigin.x,
  211. -pPicture->clipOrigin.y);
  212. REGION_INTERSECT(pPicture->pCompositeClip,
  213. pPicture->pCompositeClip,
  214. pPicture->clientClip);
  215. REGION_TRANSLATE(pPicture->pCompositeClip,
  216. pPicture->clipOrigin.x,
  217. pPicture->clipOrigin.y);
  218. }
  219. }
  220. } /* end of composite clip for pixmap */
  221. }
  222. }
  223. int
  224. miChangePictureTransform(PicturePtr pPicture, PictTransform * transform)
  225. {
  226. return Success;
  227. }
  228. int
  229. miChangePictureFilter(PicturePtr pPicture,
  230. int filter, xFixed * params, int nparams)
  231. {
  232. return Success;
  233. }
  234. #define BOUND(v) (INT16) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v))
  235. static __inline Bool
  236. miClipPictureReg(RegionPtr pRegion, RegionPtr pClip, int dx, int dy)
  237. {
  238. if (REGION_NUM_RECTS(pRegion) == 1 && REGION_NUM_RECTS(pClip) == 1) {
  239. BoxPtr pRbox = REGION_RECTS(pRegion);
  240. BoxPtr pCbox = REGION_RECTS(pClip);
  241. int v;
  242. if (pRbox->x1 < (v = pCbox->x1 + dx))
  243. pRbox->x1 = BOUND(v);
  244. if (pRbox->x2 > (v = pCbox->x2 + dx))
  245. pRbox->x2 = BOUND(v);
  246. if (pRbox->y1 < (v = pCbox->y1 + dy))
  247. pRbox->y1 = BOUND(v);
  248. if (pRbox->y2 > (v = pCbox->y2 + dy))
  249. pRbox->y2 = BOUND(v);
  250. if (pRbox->x1 >= pRbox->x2 || pRbox->y1 >= pRbox->y2) {
  251. REGION_EMPTY(pRegion);
  252. }
  253. }
  254. else if (!REGION_NOTEMPTY(pClip))
  255. return FALSE;
  256. else {
  257. if (dx || dy)
  258. REGION_TRANSLATE(pRegion, -dx, -dy);
  259. if (!REGION_INTERSECT(pRegion, pRegion, pClip))
  260. return FALSE;
  261. if (dx || dy)
  262. REGION_TRANSLATE(pRegion, dx, dy);
  263. }
  264. return REGION_NOTEMPTY(pRegion);
  265. }
  266. static __inline Bool
  267. miClipPictureSrc(RegionPtr pRegion, PicturePtr pPicture, int dx, int dy)
  268. {
  269. /* XXX what to do with clipping from transformed pictures? */
  270. if (pPicture->transform || !pPicture->pDrawable)
  271. return TRUE;
  272. if (pPicture->repeat) {
  273. if (pPicture->clientClipType != CT_NONE) {
  274. REGION_TRANSLATE(pRegion,
  275. dx - pPicture->clipOrigin.x,
  276. dy - pPicture->clipOrigin.y);
  277. if (!REGION_INTERSECT(pRegion, pRegion,
  278. (RegionPtr) pPicture->clientClip))
  279. return FALSE;
  280. REGION_TRANSLATE(pRegion,
  281. -(dx - pPicture->clipOrigin.x),
  282. -(dy - pPicture->clipOrigin.y));
  283. }
  284. return TRUE;
  285. }
  286. else {
  287. return miClipPictureReg(pRegion, pPicture->pCompositeClip, dx, dy);
  288. }
  289. }
  290. static void
  291. miCompositeSourceValidate(PicturePtr pPicture,
  292. INT16 x, INT16 y, CARD16 width, CARD16 height)
  293. {
  294. DrawablePtr pDrawable = pPicture->pDrawable;
  295. ScreenPtr pScreen;
  296. if (!pDrawable)
  297. return;
  298. pScreen = pDrawable->pScreen;
  299. if (pScreen->SourceValidate) {
  300. x -= pPicture->pDrawable->x;
  301. y -= pPicture->pDrawable->y;
  302. if (pPicture->transform) {
  303. xPoint points[4];
  304. int i;
  305. int xmin, ymin, xmax, ymax;
  306. #define VectorSet(i,_x,_y) { points[i].x = _x; points[i].y = _y; }
  307. VectorSet(0, x, y);
  308. VectorSet(1, x + width, y);
  309. VectorSet(2, x, y + height);
  310. VectorSet(3, x + width, y + height);
  311. xmin = ymin = 32767;
  312. xmax = ymax = -32737;
  313. for (i = 0; i < 4; i++) {
  314. PictVector t;
  315. t.vector[0] = IntToxFixed(points[i].x);
  316. t.vector[1] = IntToxFixed(points[i].y);
  317. t.vector[2] = xFixed1;
  318. if (PictureTransformPoint(pPicture->transform, &t)) {
  319. int tx = xFixedToInt(t.vector[0]);
  320. int ty = xFixedToInt(t.vector[1]);
  321. if (tx < xmin)
  322. xmin = tx;
  323. if (tx > xmax)
  324. xmax = tx;
  325. if (ty < ymin)
  326. ymin = ty;
  327. if (ty > ymax)
  328. ymax = ty;
  329. }
  330. }
  331. x = xmin;
  332. y = ymin;
  333. width = xmax - xmin;
  334. height = ymax - ymin;
  335. }
  336. (*pScreen->SourceValidate) (pDrawable, x, y, width, height);
  337. }
  338. }
  339. /*
  340. * returns FALSE if the final region is empty. Indistinguishable from
  341. * an allocation failure, but rendering ignores those anyways.
  342. */
  343. _X_EXPORT Bool
  344. miComputeCompositeRegion(RegionPtr pRegion,
  345. PicturePtr pSrc,
  346. PicturePtr pMask,
  347. PicturePtr pDst,
  348. INT16 xSrc,
  349. INT16 ySrc,
  350. INT16 xMask,
  351. INT16 yMask,
  352. INT16 xDst, INT16 yDst, CARD16 width, CARD16 height)
  353. {
  354. int v;
  355. pRegion->extents.x1 = xDst;
  356. v = xDst + width;
  357. pRegion->extents.x2 = BOUND(v);
  358. pRegion->extents.y1 = yDst;
  359. v = yDst + height;
  360. pRegion->extents.y2 = BOUND(v);
  361. pRegion->data = 0;
  362. /* Check for empty operation */
  363. if (pRegion->extents.x1 >= pRegion->extents.x2 ||
  364. pRegion->extents.y1 >= pRegion->extents.y2) {
  365. REGION_EMPTY(pRegion);
  366. return FALSE;
  367. }
  368. /* clip against dst */
  369. if (!miClipPictureReg(pRegion, pDst->pCompositeClip, 0, 0)) {
  370. REGION_UNINIT(pRegion);
  371. return FALSE;
  372. }
  373. if (pDst->alphaMap) {
  374. if (!miClipPictureReg(pRegion, pDst->alphaMap->pCompositeClip,
  375. -pDst->alphaOrigin.x, -pDst->alphaOrigin.y)) {
  376. REGION_UNINIT(pRegion);
  377. return FALSE;
  378. }
  379. }
  380. /* clip against src */
  381. if (!miClipPictureSrc(pRegion, pSrc, xDst - xSrc, yDst - ySrc)) {
  382. REGION_UNINIT(pRegion);
  383. return FALSE;
  384. }
  385. if (pSrc->alphaMap) {
  386. if (!miClipPictureSrc(pRegion, pSrc->alphaMap,
  387. xDst - (xSrc + pSrc->alphaOrigin.x),
  388. yDst - (ySrc + pSrc->alphaOrigin.y))) {
  389. REGION_UNINIT(pRegion);
  390. return FALSE;
  391. }
  392. }
  393. /* clip against mask */
  394. if (pMask) {
  395. if (!miClipPictureSrc(pRegion, pMask, xDst - xMask, yDst - yMask)) {
  396. REGION_UNINIT(pRegion);
  397. return FALSE;
  398. }
  399. if (pMask->alphaMap) {
  400. if (!miClipPictureSrc(pRegion, pMask->alphaMap,
  401. xDst - (xMask + pMask->alphaOrigin.x),
  402. yDst - (yMask + pMask->alphaOrigin.y))) {
  403. REGION_UNINIT(pRegion);
  404. return FALSE;
  405. }
  406. }
  407. }
  408. miCompositeSourceValidate(pSrc, xSrc, ySrc, width, height);
  409. if (pMask)
  410. miCompositeSourceValidate(pMask, xMask, yMask, width, height);
  411. return TRUE;
  412. }
  413. void
  414. miRenderColorToPixel(PictFormatPtr format, xRenderColor * color, CARD32 *pixel)
  415. {
  416. CARD32 r, g, b, a;
  417. miIndexedPtr pIndexed;
  418. switch (format->type) {
  419. case PictTypeDirect:
  420. r = color->red >> (16 - Ones(format->direct.redMask));
  421. g = color->green >> (16 - Ones(format->direct.greenMask));
  422. b = color->blue >> (16 - Ones(format->direct.blueMask));
  423. a = color->alpha >> (16 - Ones(format->direct.alphaMask));
  424. r = r << format->direct.red;
  425. g = g << format->direct.green;
  426. b = b << format->direct.blue;
  427. a = a << format->direct.alpha;
  428. *pixel = r | g | b | a;
  429. break;
  430. case PictTypeIndexed:
  431. pIndexed = (miIndexedPtr) (format->index.devPrivate);
  432. if (pIndexed->color) {
  433. r = color->red >> 11;
  434. g = color->green >> 11;
  435. b = color->blue >> 11;
  436. *pixel = miIndexToEnt15(pIndexed, (r << 10) | (g << 5) | b);
  437. }
  438. else {
  439. r = color->red >> 8;
  440. g = color->green >> 8;
  441. b = color->blue >> 8;
  442. *pixel = miIndexToEntY24(pIndexed, (r << 16) | (g << 8) | b);
  443. }
  444. break;
  445. }
  446. }
  447. static CARD16
  448. miFillColor(CARD32 pixel, int bits)
  449. {
  450. while (bits < 16) {
  451. pixel |= pixel << bits;
  452. bits <<= 1;
  453. }
  454. return (CARD16) pixel;
  455. }
  456. Bool
  457. miIsSolidAlpha(PicturePtr pSrc)
  458. {
  459. ScreenPtr pScreen;
  460. char line[1];
  461. if (!pSrc->pDrawable)
  462. return FALSE;
  463. pScreen = pSrc->pDrawable->pScreen;
  464. /* Alpha-only */
  465. if (PICT_FORMAT_TYPE(pSrc->format) != PICT_TYPE_A)
  466. return FALSE;
  467. /* repeat */
  468. if (!pSrc->repeat)
  469. return FALSE;
  470. /* 1x1 */
  471. if (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1)
  472. return FALSE;
  473. line[0] = 1;
  474. (*pScreen->GetImage) (pSrc->pDrawable, 0, 0, 1, 1, ZPixmap, ~0L, line);
  475. switch (pSrc->pDrawable->bitsPerPixel) {
  476. case 1:
  477. return (CARD8) line[0] == 1 || (CARD8) line[0] == 0x80;
  478. case 4:
  479. return (CARD8) line[0] == 0xf || (CARD8) line[0] == 0xf0;
  480. case 8:
  481. return (CARD8) line[0] == 0xff;
  482. default:
  483. return FALSE;
  484. }
  485. }
  486. void
  487. miRenderPixelToColor(PictFormatPtr format, CARD32 pixel, xRenderColor * color)
  488. {
  489. CARD32 r, g, b, a;
  490. miIndexedPtr pIndexed;
  491. switch (format->type) {
  492. case PictTypeDirect:
  493. r = (pixel >> format->direct.red) & format->direct.redMask;
  494. g = (pixel >> format->direct.green) & format->direct.greenMask;
  495. b = (pixel >> format->direct.blue) & format->direct.blueMask;
  496. a = (pixel >> format->direct.alpha) & format->direct.alphaMask;
  497. color->red = miFillColor(r, Ones(format->direct.redMask));
  498. color->green = miFillColor(g, Ones(format->direct.greenMask));
  499. color->blue = miFillColor(b, Ones(format->direct.blueMask));
  500. color->alpha = miFillColor(a, Ones(format->direct.alphaMask));
  501. break;
  502. case PictTypeIndexed:
  503. pIndexed = (miIndexedPtr) (format->index.devPrivate);
  504. pixel = pIndexed->rgba[pixel & (MI_MAX_INDEXED - 1)];
  505. r = (pixel >> 16) & 0xff;
  506. g = (pixel >> 8) & 0xff;
  507. b = (pixel) & 0xff;
  508. color->red = miFillColor(r, 8);
  509. color->green = miFillColor(g, 8);
  510. color->blue = miFillColor(b, 8);
  511. color->alpha = 0xffff;
  512. break;
  513. }
  514. }
  515. _X_EXPORT Bool
  516. miPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats)
  517. {
  518. PictureScreenPtr ps;
  519. if (!PictureInit(pScreen, formats, nformats))
  520. return FALSE;
  521. ps = GetPictureScreen(pScreen);
  522. ps->CreatePicture = miCreatePicture;
  523. ps->DestroyPicture = miDestroyPicture;
  524. ps->ChangePictureClip = miChangePictureClip;
  525. ps->DestroyPictureClip = miDestroyPictureClip;
  526. ps->ChangePicture = miChangePicture;
  527. ps->ValidatePicture = miValidatePicture;
  528. ps->InitIndexed = miInitIndexed;
  529. ps->CloseIndexed = miCloseIndexed;
  530. ps->UpdateIndexed = miUpdateIndexed;
  531. ps->ChangePictureTransform = miChangePictureTransform;
  532. ps->ChangePictureFilter = miChangePictureFilter;
  533. ps->RealizeGlyph = miRealizeGlyph;
  534. ps->UnrealizeGlyph = miUnrealizeGlyph;
  535. /* MI rendering routines */
  536. ps->Composite = 0; /* requires DDX support */
  537. ps->Glyphs = miGlyphs;
  538. ps->CompositeRects = miCompositeRects;
  539. ps->Trapezoids = miTrapezoids;
  540. ps->Triangles = miTriangles;
  541. ps->TriStrip = miTriStrip;
  542. ps->TriFan = miTriFan;
  543. ps->RasterizeTrapezoid = 0; /* requires DDX support */
  544. ps->AddTraps = 0; /* requires DDX support */
  545. ps->AddTriangles = 0; /* requires DDX support */
  546. return TRUE;
  547. }