aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/modes/xf86Rotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/modes/xf86Rotate.c')
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Rotate.c40
1 files changed, 35 insertions, 5 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86Rotate.c b/xorg-server/hw/xfree86/modes/xf86Rotate.c
index bb17df431..d9face1cb 100644
--- a/xorg-server/hw/xfree86/modes/xf86Rotate.c
+++ b/xorg-server/hw/xfree86/modes/xf86Rotate.c
@@ -40,8 +40,7 @@
#include "xf86Modes.h"
#include "xf86RandR12.h"
#include "X11/extensions/render.h"
-#define DPMS_SERVER
-#include "X11/extensions/dpms.h"
+#include "X11/extensions/dpmsconst.h"
#include "X11/Xatom.h"
/* borrowed from composite extension, move to Render and publish? */
@@ -146,6 +145,37 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
}
static void
+xf86CrtcShadowClear (xf86CrtcPtr crtc)
+{
+ PixmapPtr dst_pixmap = crtc->rotatedPixmap;
+ ScrnInfoPtr scrn = crtc->scrn;
+ ScreenPtr screen = scrn->pScreen;
+ PicturePtr dst;
+ PictFormatPtr format = compWindowFormat (WindowTable[screen->myNum]);
+ static xRenderColor black = { 0, 0, 0, 0 };
+ xRectangle rect;
+ int error;
+
+ if (!dst_pixmap)
+ return;
+ dst = CreatePicture (None,
+ &dst_pixmap->drawable,
+ format,
+ 0L,
+ NULL,
+ serverClient,
+ &error);
+ if (!dst)
+ return;
+ rect.x = 0;
+ rect.y = 0;
+ rect.width = dst_pixmap->drawable.width;
+ rect.height = dst_pixmap->drawable.height;
+ CompositeRects (PictOpSrc, dst, &black, 1, &rect);
+ FreePicture (dst, None);
+}
+
+static void
xf86CrtcDamageShadow (xf86CrtcPtr crtc)
{
ScrnInfoPtr pScrn = crtc->scrn;
@@ -316,7 +346,7 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
}
}
-_X_EXPORT void
+void
xf86RotateFreeShadow(ScrnInfoPtr pScrn)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
@@ -334,7 +364,7 @@ xf86RotateFreeShadow(ScrnInfoPtr pScrn)
}
}
-_X_EXPORT void
+void
xf86RotateCloseScreen (ScreenPtr screen)
{
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
@@ -374,7 +404,7 @@ xf86CrtcFitsScreen (xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb)
0 <= b.y1 && b.y2 <= pScrn->virtualY);
}
-_X_EXPORT Bool
+Bool
xf86CrtcRotate (xf86CrtcPtr crtc)
{
ScrnInfoPtr pScrn = crtc->scrn;