summaryrefslogtreecommitdiff
path: root/exa/exa_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'exa/exa_priv.h')
-rw-r--r--exa/exa_priv.h69
1 files changed, 41 insertions, 28 deletions
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index b577094bc..27749d7c4 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -101,21 +101,21 @@ typedef struct {
CloseScreenProcPtr SavedCloseScreen;
GetImageProcPtr SavedGetImage;
GetSpansProcPtr SavedGetSpans;
- PaintWindowBackgroundProcPtr SavedPaintWindowBackground;
CreatePixmapProcPtr SavedCreatePixmap;
DestroyPixmapProcPtr SavedDestroyPixmap;
- PaintWindowBorderProcPtr SavedPaintWindowBorder;
CopyWindowProcPtr SavedCopyWindow;
+ ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
+ BitmapToRegionProcPtr SavedBitmapToRegion;
+ ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader;
#ifdef RENDER
CompositeProcPtr SavedComposite;
- RasterizeTrapezoidProcPtr SavedRasterizeTrapezoid;
- AddTrianglesProcPtr SavedAddTriangles;
+ TrianglesProcPtr SavedTriangles;
GlyphsProcPtr SavedGlyphs;
TrapezoidsProcPtr SavedTrapezoids;
#endif
+
Bool swappedOut;
enum ExaMigrationHeuristic migration;
- Bool hideOffscreenPixmapData;
Bool checkDirtyCorrectness;
unsigned disableFbCount;
} ExaScreenPrivRec, *ExaScreenPrivPtr;
@@ -157,6 +157,7 @@ extern DevPrivateKey exaPixmapPrivateKey;
typedef struct {
ExaOffscreenArea *area;
int score; /**< score for the move-in vs move-out heuristic */
+ Bool offscreen;
CARD8 *sys_ptr; /**< pointer to pixmap data in system memory */
int sys_pitch; /**< pitch of pixmap in system memory */
@@ -172,16 +173,17 @@ typedef struct {
*/
DamagePtr pDamage;
/**
- * The valid region marks the valid bits of a drawable (at least, as it's
- * derived from damage, which may be overreported).
+ * The valid regions mark the valid bits (at least, as they're derived from
+ * damage, which may be overreported) of a pixmap's system and FB copies.
*/
- RegionRec validReg;
+ RegionRec validSys, validFB;
} ExaPixmapPrivRec, *ExaPixmapPrivPtr;
typedef struct _ExaMigrationRec {
Bool as_dst;
Bool as_src;
PixmapPtr pPix;
+ RegionPtr pReg;
} ExaMigrationRec, *ExaMigrationPtr;
/**
@@ -190,6 +192,12 @@ typedef struct _ExaMigrationRec {
*/
void exaDDXDriverInit (ScreenPtr pScreen);
+void
+exaPrepareAccessWindow(WindowPtr pWin);
+
+void
+exaFinishAccessWindow(WindowPtr pWin);
+
/* exa_unaccel.c */
void
exaPrepareAccessGC(GCPtr pGC);
@@ -255,12 +263,6 @@ ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap,
int w, int h, int x, int y);
void
-ExaCheckGetImage (DrawablePtr pDrawable,
- int x, int y, int w, int h,
- unsigned int format, unsigned long planeMask,
- char *d);
-
-void
ExaCheckGetSpans (DrawablePtr pDrawable,
int wMax,
DDXPointPtr ppt,
@@ -268,13 +270,20 @@ ExaCheckGetSpans (DrawablePtr pDrawable,
int nspans,
char *pdstStart);
-void
-ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
-
CARD32
exaGetPixmapFirstPixel (PixmapPtr pPixmap);
/* exa_accel.c */
+
+static _X_INLINE Bool
+exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask,
+ unsigned int fillStyle, unsigned char alu)
+{
+ return ((alu != GXcopy && alu != GXclear &&alu != GXset &&
+ alu != GXcopyInverted) || fillStyle == FillStippled ||
+ !EXA_PM_IS_SOLID(pDrawable, planemask));
+}
+
void
exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
@@ -283,16 +292,14 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu);
void
-exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
+exaShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int format,
+ int w, int h, int sx, int sy, int sw, int sh, int dx, int dy,
+ char *data);
void
exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
unsigned int format, unsigned long planeMask, char *d);
-void
-exaGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth,
- int nspans, char *pdstStart);
-
extern const GCOps exaOps;
#ifdef MITSHM
@@ -330,6 +337,12 @@ ExaOffscreenFini (ScreenPtr pScreen);
/* exa.c */
void
+ExaDoPrepareAccess(DrawablePtr pDrawable, int index);
+
+void
+exaPrepareAccessReg(DrawablePtr pDrawable, int index, RegionPtr pReg);
+
+void
exaPrepareAccess(DrawablePtr pDrawable, int index);
void
@@ -372,6 +385,9 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
void *closure);
/* exa_render.c */
+Bool
+exaOpReadsDestination (CARD8 op);
+
void
exaComposite(CARD8 op,
PicturePtr pSrc,
@@ -392,12 +408,9 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
int ntrap, xTrapezoid *traps);
void
-exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap,
- int x_off, int y_off);
-
-void
-exaAddTriangles (PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri,
- xTriangle *tris);
+exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
+ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
+ int ntri, xTriangle *tris);
void
exaGlyphs (CARD8 op,