Imported Upstream version 1.15.1
[deb_xorg-server.git] / exa / exa_priv.h
CommitLineData
a09e091a
JB
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 "colormapst.h"
45#include "gcstruct.h"
46#include "input.h"
47#include "mipointer.h"
48#include "mi.h"
49#include "dix.h"
50#include "fb.h"
51#include "fboverlay.h"
52#include "fbpict.h"
53#include "glyphstr.h"
54#include "damage.h"
55
56#define DEBUG_TRACE_FALL 0
57#define DEBUG_MIGRATE 0
58#define DEBUG_PIXMAP 0
59#define DEBUG_OFFSCREEN 0
60#define DEBUG_GLYPH_CACHE 0
61
62#if DEBUG_TRACE_FALL
63#define EXA_FALLBACK(x) \
64do { \
65 ErrorF("EXA fallback at %s: ", __FUNCTION__); \
66 ErrorF x; \
67} while (0)
68
69char
70 exaDrawableLocation(DrawablePtr pDrawable);
71#else
72#define EXA_FALLBACK(x)
73#endif
74
75#if DEBUG_PIXMAP
76#define DBG_PIXMAP(a) ErrorF a
77#else
78#define DBG_PIXMAP(a)
79#endif
80
81#ifndef EXA_MAX_FB
82#define EXA_MAX_FB FB_OVERLAY_MAX
83#endif
84
85#ifdef DEBUG
86#define EXA_FatalErrorDebug(x) FatalError x
87#define EXA_FatalErrorDebugWithRet(x, ret) FatalError x
88#else
89#define EXA_FatalErrorDebug(x) ErrorF x
90#define EXA_FatalErrorDebugWithRet(x, ret) \
91do { \
92 ErrorF x; \
93 return ret; \
94} while (0)
95#endif
96
97/**
98 * This is the list of migration heuristics supported by EXA. See
99 * exaDoMigration() for what their implementations do.
100 */
101enum ExaMigrationHeuristic {
102 ExaMigrationGreedy,
103 ExaMigrationAlways,
104 ExaMigrationSmart
105};
106
107typedef struct {
108 unsigned char sha1[20];
109} ExaCachedGlyphRec, *ExaCachedGlyphPtr;
110
111typedef struct {
112 /* The identity of the cache, statically configured at initialization */
113 unsigned int format;
114 int glyphWidth;
115 int glyphHeight;
116
117 int size; /* Size of cache; eventually this should be dynamically determined */
118
119 /* Hash table mapping from glyph sha1 to position in the glyph; we use
120 * open addressing with a hash table size determined based on size and large
121 * enough so that we always have a good amount of free space, so we can
122 * use linear probing. (Linear probing is preferrable to double hashing
123 * here because it allows us to easily remove entries.)
124 */
125 int *hashEntries;
126 int hashSize;
127
128 ExaCachedGlyphPtr glyphs;
129 int glyphCount; /* Current number of glyphs */
130
131 PicturePtr picture; /* Where the glyphs of the cache are stored */
132 int yOffset; /* y location within the picture where the cache starts */
133 int columns; /* Number of columns the glyphs are layed out in */
134 int evictionPosition; /* Next random position to evict a glyph */
135} ExaGlyphCacheRec, *ExaGlyphCachePtr;
136
137#define EXA_NUM_GLYPH_CACHES 4
138
139#define EXA_FALLBACK_COPYWINDOW (1 << 0)
140#define EXA_ACCEL_COPYWINDOW (1 << 1)
141
142typedef struct _ExaMigrationRec {
143 Bool as_dst;
144 Bool as_src;
145 PixmapPtr pPix;
146 RegionPtr pReg;
147} ExaMigrationRec, *ExaMigrationPtr;
148
149typedef void (*EnableDisableFBAccessProcPtr) (ScreenPtr, Bool);
150typedef struct {
151 ExaDriverPtr info;
152 ScreenBlockHandlerProcPtr SavedBlockHandler;
153 ScreenWakeupHandlerProcPtr SavedWakeupHandler;
154 CreateGCProcPtr SavedCreateGC;
155 CloseScreenProcPtr SavedCloseScreen;
156 GetImageProcPtr SavedGetImage;
157 GetSpansProcPtr SavedGetSpans;
158 CreatePixmapProcPtr SavedCreatePixmap;
159 DestroyPixmapProcPtr SavedDestroyPixmap;
160 CopyWindowProcPtr SavedCopyWindow;
161 ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
162 BitmapToRegionProcPtr SavedBitmapToRegion;
163 CreateScreenResourcesProcPtr SavedCreateScreenResources;
164 ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader;
165 SharePixmapBackingProcPtr SavedSharePixmapBacking;
166 SetSharedPixmapBackingProcPtr SavedSetSharedPixmapBacking;
167 SourceValidateProcPtr SavedSourceValidate;
168 CompositeProcPtr SavedComposite;
169 TrianglesProcPtr SavedTriangles;
170 GlyphsProcPtr SavedGlyphs;
171 TrapezoidsProcPtr SavedTrapezoids;
172 AddTrapsProcPtr SavedAddTraps;
173 void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps,
174 Bool can_accel);
175 Bool (*pixmap_has_gpu_copy) (PixmapPtr pPixmap);
176 void (*do_move_in_pixmap) (PixmapPtr pPixmap);
177 void (*do_move_out_pixmap) (PixmapPtr pPixmap);
178 void (*prepare_access_reg) (PixmapPtr pPixmap, int index, RegionPtr pReg);
179
180 Bool swappedOut;
181 enum ExaMigrationHeuristic migration;
182 Bool checkDirtyCorrectness;
183 unsigned disableFbCount;
184 Bool optimize_migration;
185 unsigned offScreenCounter;
186 unsigned numOffscreenAvailable;
187 CARD32 lastDefragment;
188 CARD32 nextDefragment;
189 PixmapPtr deferred_mixed_pixmap;
190
191 /* Reference counting for accessed pixmaps */
192 struct {
193 PixmapPtr pixmap;
194 int count;
195 Bool retval;
196 } access[EXA_NUM_PREPARE_INDICES];
197
198 /* Holds information on fallbacks that cannot be relayed otherwise. */
199 unsigned int fallback_flags;
200 unsigned int fallback_counter;
201
202 ExaGlyphCacheRec glyphCaches[EXA_NUM_GLYPH_CACHES];
203
204 /**
205 * Regions affected by fallback composite source / mask operations.
206 */
207
208 RegionRec srcReg;
209 RegionRec maskReg;
210 PixmapPtr srcPix;
211 PixmapPtr maskPix;
212
213 DevPrivateKeyRec pixmapPrivateKeyRec;
214 DevPrivateKeyRec gcPrivateKeyRec;
215} ExaScreenPrivRec, *ExaScreenPrivPtr;
216
217/*
218 * This is the only completely portable way to
219 * compute this info.
220 */
221#ifndef BitsPerPixel
222#define BitsPerPixel(d) (\
223 PixmapWidthPaddingInfo[d].notPower2 ? \
224 (PixmapWidthPaddingInfo[d].bytesPerPixel * 8) : \
225 ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
226 (PixmapWidthPaddingInfo[d].padRoundUp+1)))
227#endif
228
229extern DevPrivateKeyRec exaScreenPrivateKeyRec;
230
231#define exaScreenPrivateKey (&exaScreenPrivateKeyRec)
232
233#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixGetPrivate(&(s)->devPrivates, exaScreenPrivateKey))
234#define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s)
235
236#define ExaGetGCPriv(gc) ((ExaGCPrivPtr)dixGetPrivateAddr(&(gc)->devPrivates, &ExaGetScreenPriv(gc->pScreen)->gcPrivateKeyRec))
237#define ExaGCPriv(gc) ExaGCPrivPtr pExaGC = ExaGetGCPriv(gc)
238
239/*
240 * Some macros to deal with function wrapping.
241 */
242#define wrap(priv, real, mem, func) {\
243 priv->Saved##mem = real->mem; \
244 real->mem = func; \
245}
246
247#define unwrap(priv, real, mem) {\
248 real->mem = priv->Saved##mem; \
249}
250
251#define swap(priv, real, mem) {\
252 void *tmp = priv->Saved##mem; \
253 priv->Saved##mem = real->mem; \
254 real->mem = tmp; \
255}
256
257#define EXA_PRE_FALLBACK(_screen_) \
258 ExaScreenPriv(_screen_); \
259 pExaScr->fallback_counter++;
260
261#define EXA_POST_FALLBACK(_screen_) \
262 pExaScr->fallback_counter--;
263
264#define EXA_PRE_FALLBACK_GC(_gc_) \
265 ExaScreenPriv(_gc_->pScreen); \
266 ExaGCPriv(_gc_); \
267 pExaScr->fallback_counter++; \
268 swap(pExaGC, _gc_, ops);
269
270#define EXA_POST_FALLBACK_GC(_gc_) \
271 pExaScr->fallback_counter--; \
272 swap(pExaGC, _gc_, ops);
273
274/** Align an offset to an arbitrary alignment */
275#define EXA_ALIGN(offset, align) (((offset) + (align) - 1) - \
276 (((offset) + (align) - 1) % (align)))
277/** Align an offset to a power-of-two alignment */
278#define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1))
279
280#define EXA_PIXMAP_SCORE_MOVE_IN 10
281#define EXA_PIXMAP_SCORE_MAX 20
282#define EXA_PIXMAP_SCORE_MOVE_OUT -10
283#define EXA_PIXMAP_SCORE_MIN -20
284#define EXA_PIXMAP_SCORE_PINNED 1000
285#define EXA_PIXMAP_SCORE_INIT 1001
286
287#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, &ExaGetScreenPriv((p)->drawable.pScreen)->pixmapPrivateKeyRec))
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
360 exaPrepareAccessGC(GCPtr pGC);
361
362void
363 exaFinishAccessGC(GCPtr pGC);
364
365void
366
367ExaCheckFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nspans,
368 DDXPointPtr ppt, int *pwidth, int fSorted);
369
370void
371
372ExaCheckSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc,
373 DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
374
375void
376
377ExaCheckPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
378 int x, int y, int w, int h, int leftPad, int format,
379 char *bits);
380
381void
382
383ExaCheckCopyNtoN(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
384 BoxPtr pbox, int nbox, int dx, int dy, Bool reverse,
385 Bool upsidedown, Pixel bitplane, void *closure);
386
387RegionPtr
388
389ExaCheckCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
390 int srcx, int srcy, int w, int h, int dstx, int dsty);
391
392RegionPtr
393
394ExaCheckCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
395 int srcx, int srcy, int w, int h, int dstx, int dsty,
396 unsigned long bitPlane);
397
398void
399
400ExaCheckPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
401 DDXPointPtr pptInit);
402
403void
404
405ExaCheckPolylines(DrawablePtr pDrawable, GCPtr pGC,
406 int mode, int npt, DDXPointPtr ppt);
407
408void
409
410ExaCheckPolySegment(DrawablePtr pDrawable, GCPtr pGC,
411 int nsegInit, xSegment * pSegInit);
412
413void
414 ExaCheckPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * pArcs);
415
416void
417
418ExaCheckPolyFillRect(DrawablePtr pDrawable, GCPtr pGC,
419 int nrect, xRectangle *prect);
420
421void
422
423ExaCheckImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
424 int x, int y, unsigned int nglyph,
425 CharInfoPtr * ppci, pointer pglyphBase);
426
427void
428
429ExaCheckPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
430 int x, int y, unsigned int nglyph,
431 CharInfoPtr * ppci, pointer pglyphBase);
432
433void
434
435ExaCheckPushPixels(GCPtr pGC, PixmapPtr pBitmap,
436 DrawablePtr pDrawable, int w, int h, int x, int y);
437
438void
439 ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
440
441void
442
443ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
444 unsigned int format, unsigned long planeMask, char *d);
445
446void
447
448ExaCheckGetSpans(DrawablePtr pDrawable,
449 int wMax,
450 DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart);
451
452void
453
454ExaCheckAddTraps(PicturePtr pPicture,
455 INT16 x_off, INT16 y_off, int ntrap, xTrap * traps);
456
457/* exa_accel.c */
458
459static _X_INLINE Bool
460exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask,
461 unsigned int fillStyle, unsigned char alu,
462 unsigned int clientClipType)
463{
464 return ((alu != GXcopy && alu != GXclear && alu != GXset &&
465 alu != GXcopyInverted) || fillStyle == FillStippled ||
466 clientClipType != CT_NONE ||
467 !EXA_PM_IS_SOLID(pDrawable, planemask));
468}
469
470void
471 exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
472
473Bool
474
475exaFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
476 DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu,
477 unsigned int clientClipType);
478
479void
480
481exaGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
482 unsigned int format, unsigned long planeMask, char *d);
483
484RegionPtr
485
486exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
487 int srcx, int srcy, int width, int height, int dstx, int dsty);
488
489Bool
490
491exaHWCopyNtoN(DrawablePtr pSrcDrawable,
492 DrawablePtr pDstDrawable,
493 GCPtr pGC,
494 BoxPtr pbox,
495 int nbox, int dx, int dy, Bool reverse, Bool upsidedown);
496
497void
498
499exaCopyNtoN(DrawablePtr pSrcDrawable,
500 DrawablePtr pDstDrawable,
501 GCPtr pGC,
502 BoxPtr pbox,
503 int nbox,
504 int dx,
505 int dy,
506 Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
507
508extern const GCOps exaOps;
509
510void
511
512ExaCheckComposite(CARD8 op,
513 PicturePtr pSrc,
514 PicturePtr pMask,
515 PicturePtr pDst,
516 INT16 xSrc,
517 INT16 ySrc,
518 INT16 xMask,
519 INT16 yMask,
520 INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
521
522void
523
524ExaCheckGlyphs(CARD8 op,
525 PicturePtr pSrc,
526 PicturePtr pDst,
527 PictFormatPtr maskFormat,
528 INT16 xSrc,
529 INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs);
530
531/* exa_offscreen.c */
532void
533 ExaOffscreenSwapOut(ScreenPtr pScreen);
534
535void
536 ExaOffscreenSwapIn(ScreenPtr pScreen);
537
538ExaOffscreenArea *ExaOffscreenDefragment(ScreenPtr pScreen);
539
540Bool
541 exaOffscreenInit(ScreenPtr pScreen);
542
543void
544 ExaOffscreenFini(ScreenPtr pScreen);
545
546/* exa.c */
547Bool
548 ExaDoPrepareAccess(PixmapPtr pPixmap, int index);
549
550void
551 exaPrepareAccess(DrawablePtr pDrawable, int index);
552
553void
554 exaFinishAccess(DrawablePtr pDrawable, int index);
555
556void
557 exaDestroyPixmap(PixmapPtr pPixmap);
558
559void
560 exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2);
561
562void
563
564exaGetDrawableDeltas(DrawablePtr pDrawable, PixmapPtr pPixmap,
565 int *xp, int *yp);
566
567Bool
568 exaPixmapHasGpuCopy(PixmapPtr p);
569
570PixmapPtr
571 exaGetOffscreenPixmap(DrawablePtr pDrawable, int *xp, int *yp);
572
573PixmapPtr
574 exaGetDrawablePixmap(DrawablePtr pDrawable);
575
576void
577
578exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
579 int w, int h, int bpp);
580
581void
582
583exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
584 int w, int h, int bpp);
585
586void
587 exaDoMigration(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
588
589Bool
590 exaPixmapIsPinned(PixmapPtr pPix);
591
592extern const GCFuncs exaGCFuncs;
593
594/* exa_classic.c */
595PixmapPtr
596
597exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
598 unsigned usage_hint);
599
600Bool
601
602exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height,
603 int depth, int bitsPerPixel, int devKind,
604 pointer pPixData);
605
606Bool
607 exaDestroyPixmap_classic(PixmapPtr pPixmap);
608
609Bool
610 exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap);
611
612/* exa_driver.c */
613PixmapPtr
614
615exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
616 unsigned usage_hint);
617
618Bool
619
620exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height,
621 int depth, int bitsPerPixel, int devKind,
622 pointer pPixData);
623
624Bool
625 exaDestroyPixmap_driver(PixmapPtr pPixmap);
626
627Bool
628 exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap);
629
630/* exa_mixed.c */
631PixmapPtr
632
633exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
634 unsigned usage_hint);
635
636Bool
637
638exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
639 int bitsPerPixel, int devKind, pointer pPixData);
640
641Bool
642 exaDestroyPixmap_mixed(PixmapPtr pPixmap);
643
644Bool
645 exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap);
646
647/* exa_migration_mixed.c */
648void
649 exaCreateDriverPixmap_mixed(PixmapPtr pPixmap);
650
651void
652 exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
653
654void
655 exaMoveInPixmap_mixed(PixmapPtr pPixmap);
656
657void
658 exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure);
659
660void
661 exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg);
662
663Bool
664exaSetSharedPixmapBacking_mixed(PixmapPtr pPixmap, void *handle);
665Bool
666exaSharePixmapBacking_mixed(PixmapPtr pPixmap, ScreenPtr slave, void **handle_p);
667
668/* exa_render.c */
669Bool
670 exaOpReadsDestination(CARD8 op);
671
672void
673
674exaComposite(CARD8 op,
675 PicturePtr pSrc,
676 PicturePtr pMask,
677 PicturePtr pDst,
678 INT16 xSrc,
679 INT16 ySrc,
680 INT16 xMask,
681 INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
682
683void
684
685exaCompositeRects(CARD8 op,
686 PicturePtr Src,
687 PicturePtr pMask,
688 PicturePtr pDst, int nrect, ExaCompositeRectPtr rects);
689
690void
691
692exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
693 PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
694 int ntrap, xTrapezoid * traps);
695
696void
697
698exaTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
699 PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
700 int ntri, xTriangle * tris);
701
702/* exa_glyph.c */
703void
704 exaGlyphsInit(ScreenPtr pScreen);
705
706void
707 exaGlyphsFini(ScreenPtr pScreen);
708
709void
710
711exaGlyphs(CARD8 op,
712 PicturePtr pSrc,
713 PicturePtr pDst,
714 PictFormatPtr maskFormat,
715 INT16 xSrc,
716 INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs);
717
718/* exa_migration_classic.c */
719void
720 exaCopyDirtyToSys(ExaMigrationPtr migrate);
721
722void
723 exaCopyDirtyToFb(ExaMigrationPtr migrate);
724
725void
726 exaDoMigration_classic(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
727
728void
729 exaPixmapSave(ScreenPtr pScreen, ExaOffscreenArea * area);
730
731void
732 exaMoveOutPixmap_classic(PixmapPtr pPixmap);
733
734void
735 exaMoveInPixmap_classic(PixmapPtr pPixmap);
736
737void
738 exaPrepareAccessReg_classic(PixmapPtr pPixmap, int index, RegionPtr pReg);
739
740#endif /* EXAPRIV_H */