1/* 2 * 3 * Copyright (C) 2000 Keith Packard, member of The XFree86 Project, Inc. 4 * 2005 Zack Rusin, Trolltech 5 * 6 * Permission to use, copy, modify, distribute, and sell this software and its 7 * documentation for any purpose is hereby granted without fee, provided that 8 * the above copyright notice appear in all copies and that both that 9 * copyright notice and this permission notice appear in supporting 10 * documentation, and that the name of Keith Packard not be used in 11 * advertising or publicity pertaining to distribution of the software without 12 * specific, written prior permission. Keith Packard makes no 13 * representations about the suitability of this software for any purpose. It 14 * is provided "as is" without express or implied warranty. 15 * 16 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS 17 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 18 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 21 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 22 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 23 * SOFTWARE. 24 */ 25 26#ifndef EXAPRIV_H 27#define EXAPRIV_H 28 29#ifdef HAVE_DIX_CONFIG_H 30#include <dix-config.h> 31#endif 32 33#include "exa.h" 34 35#include <X11/X.h> 36#include <X11/Xproto.h> 37#ifdef MITSHM 38#include "shmint.h" 39#endif 40#include "scrnintstr.h" 41#include "pixmapstr.h" 42#include "windowstr.h" 43#include "servermd.h" 44#include "mibstore.h" 45#include "colormapst.h" 46#include "gcstruct.h" 47#include "input.h" 48#include "mipointer.h" 49#include "mi.h" 50#include "dix.h" 51#include "fb.h" 52#include "fboverlay.h" 53#include "fbpict.h" 54#include "glyphstr.h" 55#include "damage.h" 56 57#define DEBUG_TRACE_FALL 0 58#define DEBUG_MIGRATE 0 59#define DEBUG_PIXMAP 0 60#define DEBUG_OFFSCREEN 0 61#define DEBUG_GLYPH_CACHE 0 62 63#if DEBUG_TRACE_FALL 64#define EXA_FALLBACK(x) \ 65do { \ 66 ErrorF("EXA fallback at %s: ", __FUNCTION__); \ 67 ErrorF x; \ 68} while (0) 69 70char 71exaDrawableLocation(DrawablePtr pDrawable); 72#else 73#define EXA_FALLBACK(x) 74#endif 75 76#if DEBUG_PIXMAP 77#define DBG_PIXMAP(a) ErrorF a 78#else 79#define DBG_PIXMAP(a) 80#endif 81 82#ifndef EXA_MAX_FB 83#define EXA_MAX_FB FB_OVERLAY_MAX 84#endif 85 86#ifdef DEBUG 87#define EXA_FatalErrorDebug(x) FatalError x 88#define EXA_FatalErrorDebugWithRet(x, ret) FatalError x 89#else 90#define EXA_FatalErrorDebug(x) ErrorF x 91#define EXA_FatalErrorDebugWithRet(x, ret) \ 92do { \ 93 ErrorF x; \ 94 return ret; \ 95} while (0) 96#endif 97 98/** 99 * This is the list of migration heuristics supported by EXA. See 100 * exaDoMigration() for what their implementations do. 101 */ 102enum ExaMigrationHeuristic { 103 ExaMigrationGreedy, 104 ExaMigrationAlways, 105 ExaMigrationSmart 106}; 107 108typedef struct { 109 unsigned char sha1[20]; 110} ExaCachedGlyphRec, *ExaCachedGlyphPtr; 111 112typedef struct { 113 /* The identity of the cache, statically configured at initialization */ 114 unsigned int format; 115 int glyphWidth; 116 int glyphHeight; 117 118 int size; /* Size of cache; eventually this should be dynamically determined */ 119 120 /* Hash table mapping from glyph sha1 to position in the glyph; we use 121 * open addressing with a hash table size determined based on size and large 122 * enough so that we always have a good amount of free space, so we can 123 * use linear probing. (Linear probing is preferrable to double hashing 124 * here because it allows us to easily remove entries.) 125 */ 126 int *hashEntries; 127 int hashSize; 128 129 ExaCachedGlyphPtr glyphs; 130 int glyphCount; /* Current number of glyphs */ 131 132 PicturePtr picture; /* Where the glyphs of the cache are stored */ 133 int yOffset; /* y location within the picture where the cache starts */ 134 int columns; /* Number of columns the glyphs are layed out in */ 135 int evictionPosition; /* Next random position to evict a glyph */ 136} ExaGlyphCacheRec, *ExaGlyphCachePtr; 137 138#define EXA_NUM_GLYPH_CACHES 4 139 140#define EXA_FALLBACK_COPYWINDOW (1 << 0) 141#define EXA_ACCEL_COPYWINDOW (1 << 1) 142 143typedef struct _ExaMigrationRec { 144 Bool as_dst; 145 Bool as_src; 146 PixmapPtr pPix; 147 RegionPtr pReg; 148} ExaMigrationRec, *ExaMigrationPtr; 149 150typedef void (*EnableDisableFBAccessProcPtr)(int, Bool); 151typedef struct { 152 ExaDriverPtr info; 153 ScreenBlockHandlerProcPtr SavedBlockHandler; 154 ScreenWakeupHandlerProcPtr SavedWakeupHandler; 155 CreateGCProcPtr SavedCreateGC; 156 CloseScreenProcPtr SavedCloseScreen; 157 GetImageProcPtr SavedGetImage; 158 GetSpansProcPtr SavedGetSpans; 159 CreatePixmapProcPtr SavedCreatePixmap; 160 DestroyPixmapProcPtr SavedDestroyPixmap; 161 CopyWindowProcPtr SavedCopyWindow; 162 ChangeWindowAttributesProcPtr SavedChangeWindowAttributes; 163 BitmapToRegionProcPtr SavedBitmapToRegion; 164 CreateScreenResourcesProcPtr SavedCreateScreenResources; 165 ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader; 166 SourceValidateProcPtr SavedSourceValidate; 167 CompositeProcPtr SavedComposite; 168 TrianglesProcPtr SavedTriangles; 169 GlyphsProcPtr SavedGlyphs; 170 TrapezoidsProcPtr SavedTrapezoids; 171 AddTrapsProcPtr SavedAddTraps; 172 void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); 173 Bool (*pixmap_has_gpu_copy) (PixmapPtr pPixmap); 174 void (*do_move_in_pixmap) (PixmapPtr pPixmap); 175 void (*do_move_out_pixmap) (PixmapPtr pPixmap); 176 void (*prepare_access_reg)(PixmapPtr pPixmap, int index, RegionPtr pReg); 177 178 Bool swappedOut; 179 enum ExaMigrationHeuristic migration; 180 Bool checkDirtyCorrectness; 181 unsigned disableFbCount; 182 Bool optimize_migration; 183 unsigned offScreenCounter; 184 unsigned numOffscreenAvailable; 185 CARD32 lastDefragment; 186 CARD32 nextDefragment; 187 PixmapPtr deferred_mixed_pixmap; 188 189 /* Reference counting for accessed pixmaps */ 190 struct { 191 PixmapPtr pixmap; 192 int count; 193 Bool retval; 194 } access[EXA_NUM_PREPARE_INDICES]; 195 196 /* Holds information on fallbacks that cannot be relayed otherwise. */ 197 unsigned int fallback_flags; 198 unsigned int fallback_counter; 199 200 ExaGlyphCacheRec glyphCaches[EXA_NUM_GLYPH_CACHES]; 201 202 /** 203 * Regions affected by fallback composite source / mask operations. 204 */ 205 206 RegionRec srcReg; 207 RegionRec maskReg; 208 PixmapPtr srcPix; 209 PixmapPtr maskPix; 210 211} ExaScreenPrivRec, *ExaScreenPrivPtr; 212 213/* 214 * This is the only completely portable way to 215 * compute this info. 216 */ 217#ifndef BitsPerPixel 218#define BitsPerPixel(d) (\ 219 PixmapWidthPaddingInfo[d].notPower2 ? \ 220 (PixmapWidthPaddingInfo[d].bytesPerPixel * 8) : \ 221 ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \ 222 (PixmapWidthPaddingInfo[d].padRoundUp+1))) 223#endif 224 225extern DevPrivateKeyRec exaScreenPrivateKeyRec; 226#define exaScreenPrivateKey (&exaScreenPrivateKeyRec) 227extern DevPrivateKeyRec exaPixmapPrivateKeyRec; 228#define exaPixmapPrivateKey (&exaPixmapPrivateKeyRec) 229extern DevPrivateKeyRec exaGCPrivateKeyRec; 230#define exaGCPrivateKey (&exaGCPrivateKeyRec) 231 232#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixLookupPrivate(&(s)->devPrivates, exaScreenPrivateKey)) 233#define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s) 234 235#define ExaGetGCPriv(gc) ((ExaGCPrivPtr)dixLookupPrivate(&(gc)->devPrivates, exaGCPrivateKey)) 236#define ExaGCPriv(gc) ExaGCPrivPtr pExaGC = ExaGetGCPriv(gc) 237 238/* 239 * Some macros to deal with function wrapping. 240 */ 241#define wrap(priv, real, mem, func) {\ 242 priv->Saved##mem = real->mem; \ 243 real->mem = func; \ 244} 245 246#define unwrap(priv, real, mem) {\ 247 real->mem = priv->Saved##mem; \ 248} 249 250#define swap(priv, real, mem) {\ 251 void *tmp = priv->Saved##mem; \ 252 priv->Saved##mem = real->mem; \ 253 real->mem = tmp; \ 254} 255 256#define EXA_PRE_FALLBACK(_screen_) \ 257 ExaScreenPriv(_screen_); \ 258 pExaScr->fallback_counter++; 259 260#define EXA_POST_FALLBACK(_screen_) \ 261 pExaScr->fallback_counter--; 262 263#define EXA_PRE_FALLBACK_GC(_gc_) \ 264 ExaScreenPriv(_gc_->pScreen); \ 265 ExaGCPriv(_gc_); \ 266 pExaScr->fallback_counter++; \ 267 swap(pExaGC, _gc_, ops); 268 269#define EXA_POST_FALLBACK_GC(_gc_) \ 270 pExaScr->fallback_counter--; \ 271 swap(pExaGC, _gc_, ops); 272 273/** Align an offset to an arbitrary alignment */ 274#define EXA_ALIGN(offset, align) (((offset) + (align) - 1) - \ 275 (((offset) + (align) - 1) % (align))) 276/** Align an offset to a power-of-two alignment */ 277#define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1)) 278 279#define EXA_PIXMAP_SCORE_MOVE_IN 10 280#define EXA_PIXMAP_SCORE_MAX 20 281#define EXA_PIXMAP_SCORE_MOVE_OUT -10 282#define EXA_PIXMAP_SCORE_MIN -20 283#define EXA_PIXMAP_SCORE_PINNED 1000 284#define EXA_PIXMAP_SCORE_INIT 1001 285 286#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)dixLookupPrivate(&(p)->devPrivates, exaPixmapPrivateKey)) 287#define ExaSetPixmapPriv(p,a) dixSetPrivate(&(p)->devPrivates, exaPixmapPrivateKey, a) 288#define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p) 289 290#define EXA_RANGE_PITCH (1 << 0) 291#define EXA_RANGE_WIDTH (1 << 1) 292#define EXA_RANGE_HEIGHT (1 << 2) 293 294typedef struct { 295 ExaOffscreenArea *area; 296 int score; /**< score for the move-in vs move-out heuristic */ 297 Bool use_gpu_copy; 298 299 CARD8 *sys_ptr; /**< pointer to pixmap data in system memory */ 300 int sys_pitch; /**< pitch of pixmap in system memory */ 301 302 CARD8 *fb_ptr; /**< pointer to pixmap data in framebuffer memory */ 303 int fb_pitch; /**< pitch of pixmap in framebuffer memory */ 304 unsigned int fb_size; /**< size of pixmap in framebuffer memory */ 305 306 /** 307 * Holds information about whether this pixmap can be used for 308 * acceleration (== 0) or not (> 0). 309 * 310 * Contains a OR'ed combination of the following values: 311 * EXA_RANGE_PITCH - set if the pixmap's pitch is out of range 312 * EXA_RANGE_WIDTH - set if the pixmap's width is out of range 313 * EXA_RANGE_HEIGHT - set if the pixmap's height is out of range 314 */ 315 unsigned int accel_blocked; 316 317 /** 318 * The damage record contains the areas of the pixmap's current location 319 * (framebuffer or system) that have been damaged compared to the other 320 * location. 321 */ 322 DamagePtr pDamage; 323 /** 324 * The valid regions mark the valid bits (at least, as they're derived from 325 * damage, which may be overreported) of a pixmap's system and FB copies. 326 */ 327 RegionRec validSys, validFB; 328 /** 329 * Driver private storage per EXA pixmap 330 */ 331 void *driverPriv; 332} ExaPixmapPrivRec, *ExaPixmapPrivPtr; 333 334typedef struct { 335 /* GC values from the layer below. */ 336 GCOps *Savedops; 337 GCFuncs *Savedfuncs; 338} ExaGCPrivRec, *ExaGCPrivPtr; 339 340typedef struct { 341 PicturePtr pDst; 342 INT16 xSrc; 343 INT16 ySrc; 344 INT16 xMask; 345 INT16 yMask; 346 INT16 xDst; 347 INT16 yDst; 348 INT16 width; 349 INT16 height; 350} ExaCompositeRectRec, *ExaCompositeRectPtr; 351 352/** 353 * exaDDXDriverInit must be implemented by the DDX using EXA, and is the place 354 * to set EXA options or hook in screen functions to handle using EXA as the AA. 355 */ 356void exaDDXDriverInit (ScreenPtr pScreen); 357 358/* exa_unaccel.c */ 359void 360exaPrepareAccessGC(GCPtr pGC); 361 362void 363exaFinishAccessGC(GCPtr pGC); 364 365void 366ExaCheckFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nspans, 367 DDXPointPtr ppt, int *pwidth, int fSorted); 368 369void 370ExaCheckSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *psrc, 371 DDXPointPtr ppt, int *pwidth, int nspans, int fSorted); 372 373void 374ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, 375 int x, int y, int w, int h, int leftPad, int format, 376 char *bits); 377 378void 379ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, 380 BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, 381 Bool upsidedown, Pixel bitplane, void *closure); 382 383RegionPtr 384ExaCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, 385 int srcx, int srcy, int w, int h, int dstx, int dsty); 386 387RegionPtr 388ExaCheckCopyPlane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, 389 int srcx, int srcy, int w, int h, int dstx, int dsty, 390 unsigned long bitPlane); 391 392void 393ExaCheckPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, 394 DDXPointPtr pptInit); 395 396void 397ExaCheckPolylines (DrawablePtr pDrawable, GCPtr pGC, 398 int mode, int npt, DDXPointPtr ppt); 399 400void 401ExaCheckPolySegment (DrawablePtr pDrawable, GCPtr pGC, 402 int nsegInit, xSegment *pSegInit); 403 404void 405ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC, 406 int narcs, xArc *pArcs); 407 408void 409ExaCheckPolyFillRect (DrawablePtr pDrawable, GCPtr pGC, 410 int nrect, xRectangle *prect); 411 412void 413ExaCheckImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, 414 int x, int y, unsigned int nglyph, 415 CharInfoPtr *ppci, pointer pglyphBase); 416 417void 418ExaCheckPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, 419 int x, int y, unsigned int nglyph, 420 CharInfoPtr *ppci, pointer pglyphBase); 421 422void 423ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap, 424 DrawablePtr pDrawable, 425 int w, int h, int x, int y); 426 427void 428ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); 429 430void 431ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, 432 unsigned int format, unsigned long planeMask, char *d); 433 434void 435ExaCheckGetSpans (DrawablePtr pDrawable, 436 int wMax, 437 DDXPointPtr ppt, 438 int *pwidth, 439 int nspans, 440 char *pdstStart); 441 442void 443ExaCheckAddTraps (PicturePtr pPicture, 444 INT16 x_off, 445 INT16 y_off, 446 int ntrap, 447 xTrap *traps); 448 449/* exa_accel.c */ 450 451static _X_INLINE Bool 452exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask, 453 unsigned int fillStyle, unsigned char alu, 454 unsigned int clientClipType) 455{ 456 return ((alu != GXcopy && alu != GXclear && alu != GXset && 457 alu != GXcopyInverted) || fillStyle == FillStippled || 458 clientClipType != CT_NONE || !EXA_PM_IS_SOLID(pDrawable, planemask)); 459} 460 461void 462exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); 463 464Bool 465exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, 466 DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu, 467 unsigned int clientClipType); 468 469void 470exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h, 471 unsigned int format, unsigned long planeMask, char *d); 472 473RegionPtr 474exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, 475 int srcx, int srcy, int width, int height, int dstx, int dsty); 476 477Bool 478exaHWCopyNtoN (DrawablePtr pSrcDrawable, 479 DrawablePtr pDstDrawable, 480 GCPtr pGC, 481 BoxPtr pbox, 482 int nbox, 483 int dx, 484 int dy, 485 Bool reverse, 486 Bool upsidedown); 487 488void 489exaCopyNtoN (DrawablePtr pSrcDrawable, 490 DrawablePtr pDstDrawable, 491 GCPtr pGC, 492 BoxPtr pbox, 493 int nbox, 494 int dx, 495 int dy, 496 Bool reverse, 497 Bool upsidedown, 498 Pixel bitplane, 499 void *closure); 500 501extern const GCOps exaOps; 502 503void 504ExaCheckComposite (CARD8 op, 505 PicturePtr pSrc, 506 PicturePtr pMask, 507 PicturePtr pDst, 508 INT16 xSrc, 509 INT16 ySrc, 510 INT16 xMask, 511 INT16 yMask, 512 INT16 xDst, 513 INT16 yDst, 514 CARD16 width, 515 CARD16 height); 516 517void 518ExaCheckGlyphs (CARD8 op, 519 PicturePtr pSrc, 520 PicturePtr pDst, 521 PictFormatPtr maskFormat, 522 INT16 xSrc, 523 INT16 ySrc, 524 int nlist, 525 GlyphListPtr list, 526 GlyphPtr *glyphs); 527 528/* exa_offscreen.c */ 529void 530ExaOffscreenSwapOut (ScreenPtr pScreen); 531 532void 533ExaOffscreenSwapIn (ScreenPtr pScreen); 534 535ExaOffscreenArea* 536ExaOffscreenDefragment (ScreenPtr pScreen); 537 538Bool 539exaOffscreenInit(ScreenPtr pScreen); 540 541void 542ExaOffscreenFini (ScreenPtr pScreen); 543 544/* exa.c */ 545Bool 546ExaDoPrepareAccess(PixmapPtr pPixmap, int index); 547 548void 549exaPrepareAccess(DrawablePtr pDrawable, int index); 550 551void 552exaFinishAccess(DrawablePtr pDrawable, int index); 553 554void 555exaDestroyPixmap(PixmapPtr pPixmap); 556 557void 558exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2); 559 560void 561exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap, 562 int *xp, int *yp); 563 564Bool 565exaPixmapHasGpuCopy(PixmapPtr p); 566 567PixmapPtr 568exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp); 569 570PixmapPtr 571exaGetDrawablePixmap(DrawablePtr pDrawable); 572 573void 574exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, 575 int w, int h, int bpp); 576 577void 578exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, 579 int w, int h, int bpp); 580 581void 582exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); 583 584Bool 585exaPixmapIsPinned (PixmapPtr pPix); 586 587extern const GCFuncs exaGCFuncs; 588 589/* exa_classic.c */ 590PixmapPtr 591exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth, 592 unsigned usage_hint); 593 594Bool 595exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth, 596 int bitsPerPixel, int devKind, pointer pPixData); 597 598Bool 599exaDestroyPixmap_classic (PixmapPtr pPixmap); 600 601Bool 602exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap); 603 604/* exa_driver.c */ 605PixmapPtr 606exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth, 607 unsigned usage_hint); 608 609Bool 610exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth, 611 int bitsPerPixel, int devKind, pointer pPixData); 612 613Bool 614exaDestroyPixmap_driver (PixmapPtr pPixmap); 615 616Bool 617exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap); 618 619/* exa_mixed.c */ 620PixmapPtr 621exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth, 622 unsigned usage_hint); 623 624Bool 625exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, 626 int bitsPerPixel, int devKind, pointer pPixData); 627 628Bool 629exaDestroyPixmap_mixed(PixmapPtr pPixmap); 630 631Bool 632exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap); 633 634/* exa_migration_mixed.c */ 635void 636exaCreateDriverPixmap_mixed(PixmapPtr pPixmap); 637 638void 639exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); 640 641void 642exaMoveInPixmap_mixed(PixmapPtr pPixmap); 643 644void 645exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure); 646 647void 648exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg); 649 650/* exa_render.c */ 651Bool 652exaOpReadsDestination (CARD8 op); 653 654void 655exaComposite(CARD8 op, 656 PicturePtr pSrc, 657 PicturePtr pMask, 658 PicturePtr pDst, 659 INT16 xSrc, 660 INT16 ySrc, 661 INT16 xMask, 662 INT16 yMask, 663 INT16 xDst, 664 INT16 yDst, 665 CARD16 width, 666 CARD16 height); 667 668void 669exaCompositeRects(CARD8 op, 670 PicturePtr Src, 671 PicturePtr pMask, 672 PicturePtr pDst, 673 int nrect, 674 ExaCompositeRectPtr rects); 675 676void 677exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst, 678 PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, 679 int ntrap, xTrapezoid *traps); 680 681void 682exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst, 683 PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, 684 int ntri, xTriangle *tris); 685 686/* exa_glyph.c */ 687void 688exaGlyphsInit(ScreenPtr pScreen); 689 690void 691exaGlyphsFini (ScreenPtr pScreen); 692 693void 694exaGlyphs (CARD8 op, 695 PicturePtr pSrc, 696 PicturePtr pDst, 697 PictFormatPtr maskFormat, 698 INT16 xSrc, 699 INT16 ySrc, 700 int nlist, 701 GlyphListPtr list, 702 GlyphPtr *glyphs); 703 704/* exa_migration_classic.c */ 705void 706exaCopyDirtyToSys (ExaMigrationPtr migrate); 707 708void 709exaCopyDirtyToFb (ExaMigrationPtr migrate); 710 711void 712exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); 713 714void 715exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area); 716 717void 718exaMoveOutPixmap_classic (PixmapPtr pPixmap); 719 720void 721exaMoveInPixmap_classic (PixmapPtr pPixmap); 722 723void 724exaPrepareAccessReg_classic(PixmapPtr pPixmap, int index, RegionPtr pReg); 725 726#endif /* EXAPRIV_H */ 727