diff options
author | Dave Airlie <airlied@gmail.com> | 2015-06-30 14:54:42 +1000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-07-08 11:13:09 -0700 |
commit | 90db5edf119187f8b1b9207c8c384d6cd7ef9edc (patch) | |
tree | ce513a85f857e677b0b91a692f5d5cabd64c8145 /include | |
parent | 991712f1e8deeb6289ee0abd9910e279d6396246 (diff) |
prime: add rotation support for offloaded outputs (v2)
One of the lacking features with output offloading was
that screen rotation didn't work at all.
This patch makes 0/90/180/270 rotation work with USB output
and GPU outputs.
When it allocates the shared pixmap it allocates it rotated,
and any updates to the shared pixmap are done using a composite
path that does the rotation. The slave GPU then doesn't need
to know about the rotation and just displays the pixmap.
v2:
rewrite the sync dirty helper to use the dst pixmap, and
avoid any strange hobbits and rotations.
This breaks ABI in two places.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/pixmap.h | 14 | ||||
-rw-r--r-- | include/pixmapstr.h | 5 | ||||
-rw-r--r-- | include/scrnintstr.h | 5 |
3 files changed, 14 insertions, 10 deletions
diff --git a/include/pixmap.h b/include/pixmap.h index 9656c3ade..c6a773649 100644 --- a/include/pixmap.h +++ b/include/pixmap.h @@ -50,7 +50,7 @@ SOFTWARE. #include "misc.h" #include "screenint.h" #include "regionstr.h" - +#include <X11/extensions/randr.h> /* types for Drawable */ #define DRAWABLE_WINDOW 0 #define DRAWABLE_PIXMAP 1 @@ -115,16 +115,12 @@ extern _X_EXPORT void FreePixmap(PixmapPtr /*pPixmap */ ); extern _X_EXPORT PixmapPtr PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave); +#define HAS_DIRTYTRACKING_ROTATION 1 extern _X_EXPORT Bool PixmapStartDirtyTracking(PixmapPtr src, PixmapPtr slave_dst, - int x, int y); - -#define HAS_DIRTYTRACKING2 1 -extern _X_EXPORT Bool -PixmapStartDirtyTracking2(PixmapPtr src, - PixmapPtr slave_dst, - int x, int y, int dst_x, int dst_y); + int x, int y, int dst_x, int dst_y, + Rotation rotation); extern _X_EXPORT Bool PixmapStopDirtyTracking(PixmapPtr src, PixmapPtr slave_dst); @@ -132,6 +128,6 @@ PixmapStopDirtyTracking(PixmapPtr src, PixmapPtr slave_dst); /* helper function, drivers can do this themselves if they can do it more efficently */ extern _X_EXPORT Bool -PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region); +PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty); #endif /* PIXMAP_H */ diff --git a/include/pixmapstr.h b/include/pixmapstr.h index 380e48335..4bd246562 100644 --- a/include/pixmapstr.h +++ b/include/pixmapstr.h @@ -51,6 +51,8 @@ SOFTWARE. #include "regionstr.h" #include "privates.h" #include "damage.h" +#include <X11/extensions/randr.h> +#include "picturestr.h" typedef struct _Drawable { unsigned char type; /* DRAWABLE_<type> */ @@ -91,6 +93,9 @@ typedef struct _PixmapDirtyUpdate { DamagePtr damage; struct xorg_list ent; int dst_x, dst_y; + Rotation rotation; + PictTransform transform; + struct pixman_f_transform f_transform, f_inverse; } PixmapDirtyUpdateRec; static inline void diff --git a/include/scrnintstr.h b/include/scrnintstr.h index faf05630c..a627fe7ac 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -55,6 +55,7 @@ SOFTWARE. #include <X11/Xproto.h> #include "dix.h" #include "privates.h" +#include <X11/extensions/randr.h> typedef struct _PixmapFormat { unsigned char depth; @@ -340,7 +341,9 @@ typedef Bool (*SharePixmapBackingProcPtr)(PixmapPtr, ScreenPtr, void **); typedef Bool (*SetSharedPixmapBackingProcPtr)(PixmapPtr, void *); typedef Bool (*StartPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr, - int x, int y); + int x, int y, + int dst_x, int dst_y, + Rotation rotation); typedef Bool (*StopPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr); |