summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exa/exa.c14
-rw-r--r--exa/exa_accel.c14
-rw-r--r--exa/exa_migration.c14
-rw-r--r--exa/exa_priv.h8
-rw-r--r--exa/exa_unaccel.c28
-rw-r--r--hw/xfree86/exa/exa.c14
-rw-r--r--hw/xfree86/exa/exaPriv.h8
-rw-r--r--hw/xfree86/exa/exa_accel.c14
-rw-r--r--hw/xfree86/exa/exa_migration.c14
-rw-r--r--hw/xfree86/exa/exa_priv.h8
-rw-r--r--hw/xfree86/exa/exa_unaccel.c28
-rw-r--r--hw/xfree86/exa/exaasync.c28
12 files changed, 144 insertions, 48 deletions
diff --git a/exa/exa.c b/exa/exa.c
index 2b9dc63dd..c8e57e440 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -159,6 +159,10 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
pPixmap->devPrivate.ptr = dst;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pExaPixmap->area = NULL;
+ /* Mark it dirty now, to say that there is important data in the
+ * system-memory copy.
+ */
+ pExaPixmap->dirty = TRUE;
}
static int
@@ -238,6 +242,16 @@ exaMoveInPixmap (PixmapPtr pPixmap)
return;
}
+ /* If the "dirty" flag has never been set on the in-memory pixmap, then
+ * nothing has been written to it, so the contents are undefined and we can
+ * avoid the upload.
+ */
+ if (!pExaPixmap->dirty) {
+ DBG_MIGRATE(("saved upload of %dx%d\n", pPixmap->drawable.width,
+ pPixmap->drawable.height));
+ return;
+ }
+
pExaPixmap->dirty = FALSE;
if (pExaScr->info->accel.UploadToScreen)
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 2b9dc63dd..c8e57e440 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -159,6 +159,10 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
pPixmap->devPrivate.ptr = dst;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pExaPixmap->area = NULL;
+ /* Mark it dirty now, to say that there is important data in the
+ * system-memory copy.
+ */
+ pExaPixmap->dirty = TRUE;
}
static int
@@ -238,6 +242,16 @@ exaMoveInPixmap (PixmapPtr pPixmap)
return;
}
+ /* If the "dirty" flag has never been set on the in-memory pixmap, then
+ * nothing has been written to it, so the contents are undefined and we can
+ * avoid the upload.
+ */
+ if (!pExaPixmap->dirty) {
+ DBG_MIGRATE(("saved upload of %dx%d\n", pPixmap->drawable.width,
+ pPixmap->drawable.height));
+ return;
+ }
+
pExaPixmap->dirty = FALSE;
if (pExaScr->info->accel.UploadToScreen)
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 2b9dc63dd..c8e57e440 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -159,6 +159,10 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
pPixmap->devPrivate.ptr = dst;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pExaPixmap->area = NULL;
+ /* Mark it dirty now, to say that there is important data in the
+ * system-memory copy.
+ */
+ pExaPixmap->dirty = TRUE;
}
static int
@@ -238,6 +242,16 @@ exaMoveInPixmap (PixmapPtr pPixmap)
return;
}
+ /* If the "dirty" flag has never been set on the in-memory pixmap, then
+ * nothing has been written to it, so the contents are undefined and we can
+ * avoid the upload.
+ */
+ if (!pExaPixmap->dirty) {
+ DBG_MIGRATE(("saved upload of %dx%d\n", pPixmap->drawable.width,
+ pPixmap->drawable.height));
+ return;
+ }
+
pExaPixmap->dirty = FALSE;
if (pExaScr->info->accel.UploadToScreen)
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index db83d1b32..c28e269ab 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -119,8 +119,12 @@ typedef struct {
int devKind;
DevUnion devPrivate;
- /* True if the in-screen copy has been modified compared to the
- * system-memory copy.
+ /* If area is NULL, then dirty == TRUE means that the pixmap has been
+ * modified, so the contents are defined. Used to avoid uploads of
+ * undefined data.
+ * If area is non-NULL, then dirty == TRUE means that the in-framebuffer
+ * copy has been changed from the system-memory copy. Used to avoid
+ * downloads of unmodified data.
*/
Bool dirty;
unsigned int size;
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index d6e111e79..8586405a4 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -331,26 +331,26 @@ ExaCheckComposite (CARD8 op,
* do migration for CopyArea.
*/
const GCOps exaAsyncPixmapGCOps = {
- fbFillSpans,
- fbSetSpans,
- fbPutImage,
+ ExaCheckFillSpans,
+ ExaCheckSetSpans,
+ ExaCheckPutImage,
exaCopyArea,
ExaCheckCopyPlane,
- fbPolyPoint,
- fbPolyLine,
- fbPolySegment,
- fbPolyRectangle,
- fbPolyArc,
- fbFillPolygon,
- fbPolyFillRect,
- fbPolyFillArc,
+ ExaCheckPolyPoint,
+ ExaCheckPolylines,
+ ExaCheckPolySegment,
+ ExaCheckPolyRectangle,
+ ExaCheckPolyArc,
+ ExaCheckFillPolygon,
+ ExaCheckPolyFillRect,
+ ExaCheckPolyFillArc,
miPolyText8,
miPolyText16,
miImageText8,
miImageText16,
- fbImageGlyphBlt,
- fbPolyGlyphBlt,
- fbPushPixels
+ ExaCheckImageGlyphBlt,
+ ExaCheckPolyGlyphBlt,
+ ExaCheckPushPixels
#ifdef NEED_LINEHELPER
,NULL
#endif
diff --git a/hw/xfree86/exa/exa.c b/hw/xfree86/exa/exa.c
index 2b9dc63dd..c8e57e440 100644
--- a/hw/xfree86/exa/exa.c
+++ b/hw/xfree86/exa/exa.c
@@ -159,6 +159,10 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
pPixmap->devPrivate.ptr = dst;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pExaPixmap->area = NULL;
+ /* Mark it dirty now, to say that there is important data in the
+ * system-memory copy.
+ */
+ pExaPixmap->dirty = TRUE;
}
static int
@@ -238,6 +242,16 @@ exaMoveInPixmap (PixmapPtr pPixmap)
return;
}
+ /* If the "dirty" flag has never been set on the in-memory pixmap, then
+ * nothing has been written to it, so the contents are undefined and we can
+ * avoid the upload.
+ */
+ if (!pExaPixmap->dirty) {
+ DBG_MIGRATE(("saved upload of %dx%d\n", pPixmap->drawable.width,
+ pPixmap->drawable.height));
+ return;
+ }
+
pExaPixmap->dirty = FALSE;
if (pExaScr->info->accel.UploadToScreen)
diff --git a/hw/xfree86/exa/exaPriv.h b/hw/xfree86/exa/exaPriv.h
index db83d1b32..c28e269ab 100644
--- a/hw/xfree86/exa/exaPriv.h
+++ b/hw/xfree86/exa/exaPriv.h
@@ -119,8 +119,12 @@ typedef struct {
int devKind;
DevUnion devPrivate;
- /* True if the in-screen copy has been modified compared to the
- * system-memory copy.
+ /* If area is NULL, then dirty == TRUE means that the pixmap has been
+ * modified, so the contents are defined. Used to avoid uploads of
+ * undefined data.
+ * If area is non-NULL, then dirty == TRUE means that the in-framebuffer
+ * copy has been changed from the system-memory copy. Used to avoid
+ * downloads of unmodified data.
*/
Bool dirty;
unsigned int size;
diff --git a/hw/xfree86/exa/exa_accel.c b/hw/xfree86/exa/exa_accel.c
index 2b9dc63dd..c8e57e440 100644
--- a/hw/xfree86/exa/exa_accel.c
+++ b/hw/xfree86/exa/exa_accel.c
@@ -159,6 +159,10 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
pPixmap->devPrivate.ptr = dst;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pExaPixmap->area = NULL;
+ /* Mark it dirty now, to say that there is important data in the
+ * system-memory copy.
+ */
+ pExaPixmap->dirty = TRUE;
}
static int
@@ -238,6 +242,16 @@ exaMoveInPixmap (PixmapPtr pPixmap)
return;
}
+ /* If the "dirty" flag has never been set on the in-memory pixmap, then
+ * nothing has been written to it, so the contents are undefined and we can
+ * avoid the upload.
+ */
+ if (!pExaPixmap->dirty) {
+ DBG_MIGRATE(("saved upload of %dx%d\n", pPixmap->drawable.width,
+ pPixmap->drawable.height));
+ return;
+ }
+
pExaPixmap->dirty = FALSE;
if (pExaScr->info->accel.UploadToScreen)
diff --git a/hw/xfree86/exa/exa_migration.c b/hw/xfree86/exa/exa_migration.c
index 2b9dc63dd..c8e57e440 100644
--- a/hw/xfree86/exa/exa_migration.c
+++ b/hw/xfree86/exa/exa_migration.c
@@ -159,6 +159,10 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
pPixmap->devPrivate.ptr = dst;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pExaPixmap->area = NULL;
+ /* Mark it dirty now, to say that there is important data in the
+ * system-memory copy.
+ */
+ pExaPixmap->dirty = TRUE;
}
static int
@@ -238,6 +242,16 @@ exaMoveInPixmap (PixmapPtr pPixmap)
return;
}
+ /* If the "dirty" flag has never been set on the in-memory pixmap, then
+ * nothing has been written to it, so the contents are undefined and we can
+ * avoid the upload.
+ */
+ if (!pExaPixmap->dirty) {
+ DBG_MIGRATE(("saved upload of %dx%d\n", pPixmap->drawable.width,
+ pPixmap->drawable.height));
+ return;
+ }
+
pExaPixmap->dirty = FALSE;
if (pExaScr->info->accel.UploadToScreen)
diff --git a/hw/xfree86/exa/exa_priv.h b/hw/xfree86/exa/exa_priv.h
index db83d1b32..c28e269ab 100644
--- a/hw/xfree86/exa/exa_priv.h
+++ b/hw/xfree86/exa/exa_priv.h
@@ -119,8 +119,12 @@ typedef struct {
int devKind;
DevUnion devPrivate;
- /* True if the in-screen copy has been modified compared to the
- * system-memory copy.
+ /* If area is NULL, then dirty == TRUE means that the pixmap has been
+ * modified, so the contents are defined. Used to avoid uploads of
+ * undefined data.
+ * If area is non-NULL, then dirty == TRUE means that the in-framebuffer
+ * copy has been changed from the system-memory copy. Used to avoid
+ * downloads of unmodified data.
*/
Bool dirty;
unsigned int size;
diff --git a/hw/xfree86/exa/exa_unaccel.c b/hw/xfree86/exa/exa_unaccel.c
index d6e111e79..8586405a4 100644
--- a/hw/xfree86/exa/exa_unaccel.c
+++ b/hw/xfree86/exa/exa_unaccel.c
@@ -331,26 +331,26 @@ ExaCheckComposite (CARD8 op,
* do migration for CopyArea.
*/
const GCOps exaAsyncPixmapGCOps = {
- fbFillSpans,
- fbSetSpans,
- fbPutImage,
+ ExaCheckFillSpans,
+ ExaCheckSetSpans,
+ ExaCheckPutImage,
exaCopyArea,
ExaCheckCopyPlane,
- fbPolyPoint,
- fbPolyLine,
- fbPolySegment,
- fbPolyRectangle,
- fbPolyArc,
- fbFillPolygon,
- fbPolyFillRect,
- fbPolyFillArc,
+ ExaCheckPolyPoint,
+ ExaCheckPolylines,
+ ExaCheckPolySegment,
+ ExaCheckPolyRectangle,
+ ExaCheckPolyArc,
+ ExaCheckFillPolygon,
+ ExaCheckPolyFillRect,
+ ExaCheckPolyFillArc,
miPolyText8,
miPolyText16,
miImageText8,
miImageText16,
- fbImageGlyphBlt,
- fbPolyGlyphBlt,
- fbPushPixels
+ ExaCheckImageGlyphBlt,
+ ExaCheckPolyGlyphBlt,
+ ExaCheckPushPixels
#ifdef NEED_LINEHELPER
,NULL
#endif
diff --git a/hw/xfree86/exa/exaasync.c b/hw/xfree86/exa/exaasync.c
index d6e111e79..8586405a4 100644
--- a/hw/xfree86/exa/exaasync.c
+++ b/hw/xfree86/exa/exaasync.c
@@ -331,26 +331,26 @@ ExaCheckComposite (CARD8 op,
* do migration for CopyArea.
*/
const GCOps exaAsyncPixmapGCOps = {
- fbFillSpans,
- fbSetSpans,
- fbPutImage,
+ ExaCheckFillSpans,
+ ExaCheckSetSpans,
+ ExaCheckPutImage,
exaCopyArea,
ExaCheckCopyPlane,
- fbPolyPoint,
- fbPolyLine,
- fbPolySegment,
- fbPolyRectangle,
- fbPolyArc,
- fbFillPolygon,
- fbPolyFillRect,
- fbPolyFillArc,
+ ExaCheckPolyPoint,
+ ExaCheckPolylines,
+ ExaCheckPolySegment,
+ ExaCheckPolyRectangle,
+ ExaCheckPolyArc,
+ ExaCheckFillPolygon,
+ ExaCheckPolyFillRect,
+ ExaCheckPolyFillArc,
miPolyText8,
miPolyText16,
miImageText8,
miImageText16,
- fbImageGlyphBlt,
- fbPolyGlyphBlt,
- fbPushPixels
+ ExaCheckImageGlyphBlt,
+ ExaCheckPolyGlyphBlt,
+ ExaCheckPushPixels
#ifdef NEED_LINEHELPER
,NULL
#endif