xserver: Branch 'transform-proposal' - 3 commits
Keith Packard
keithp at kemper.freedesktop.org
Mon Mar 17 16:13:44 PDT 2008
hw/xfree86/modes/xf86Cursors.c | 9 +++++++++
hw/xfree86/modes/xf86Rotate.c | 13 +++++++++----
render/filter.c | 2 +-
3 files changed, 19 insertions(+), 5 deletions(-)
New commits:
commit 5ec18f40e73ac4e0f5ef781945f880688d615e9b
Author: Keith Packard <keithp at keithp.com>
Date: Mon Mar 17 16:14:43 2008 -0700
Adjust transformed cursor position to account for hotspot
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 08cf78d..a3855b4 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -37,6 +37,7 @@
#include "xf86Crtc.h"
#include "xf86Modes.h"
#include "xf86RandR12.h"
+#include "xf86CursorPriv.h"
#include "X11/extensions/render.h"
#define DPMS_SERVER
#include "X11/extensions/dpms.h"
@@ -319,10 +320,18 @@ xf86_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
*/
if (crtc->transform_in_use)
{
+ ScreenPtr screen = scrn->pScreen;
+ xf86CursorScreenPtr ScreenPriv =
+ (xf86CursorScreenPtr)dixLookupPrivate(&screen->devPrivates,
+ xf86CursorScreenKey);
PictVector v;
+ x += ScreenPriv->HotX;
+ y += ScreenPriv->HotY;
v.vector[0] = IntToxFixed (x); v.vector[1] = IntToxFixed (y); v.vector[2] = IntToxFixed(1);
PictureTransformPoint (&crtc->framebuffer_to_crtc, &v);
x = xFixedToInt (v.vector[0]); y = xFixedToInt (v.vector[1]);
+ x -= ScreenPriv->HotX;
+ y -= ScreenPriv->HotY;
}
else
{
commit c9204c8fcfeed1209b42aad2426e35c4b0a24c56
Author: Keith Packard <keithp at keithp.com>
Date: Mon Mar 17 16:14:15 2008 -0700
Actually use filter kernel size to expand transform redisplay box
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index b00d11a..5e8174c 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -118,10 +118,10 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
BoxRec dst_box;
dst_box = *b;
- dst_box.x1 -= crtc->filter_width >> 2;
- dst_box.x2 += crtc->filter_width >> 2;
- dst_box.y1 -= crtc->filter_width >> 2;
- dst_box.y2 += crtc->filter_width >> 2;
+ dst_box.x1 -= crtc->filter_width >> 1;
+ dst_box.x2 += crtc->filter_width >> 1;
+ dst_box.y1 -= crtc->filter_height >> 1;
+ dst_box.y2 += crtc->filter_height >> 1;
PictureTransformBounds (&dst_box, &crtc->framebuffer_to_crtc);
CompositePicture (PictOpSrc,
src, NULL, dst,
@@ -391,6 +391,11 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
}
} else
new_filter = transform->filter;
+ if (new_filter)
+ {
+ new_width = new_filter->width;
+ new_height = new_filter->height;
+ }
PictureTransformMultiply (&crtc_to_fb, &transform->transform, &crtc_to_fb);
PictureTransformMultiply (&fb_to_crtc, &fb_to_crtc, &transform->inverse);
}
commit 21457a5a6b5f9b97e09ee8a691c83a572cec1c63
Author: Keith Packard <keithp at keithp.com>
Date: Mon Mar 17 16:13:25 2008 -0700
Correct bilinear filter kernel size (should be 2x2)
diff --git a/render/filter.c b/render/filter.c
index 485b2a1..e828359 100644
--- a/render/filter.c
+++ b/render/filter.c
@@ -252,7 +252,7 @@ PictureSetDefaultFilters (ScreenPtr pScreen)
return FALSE;
if (PictureAddFilter (pScreen, FilterNearest, 0, 1, 1) < 0)
return FALSE;
- if (PictureAddFilter (pScreen, FilterBilinear, 0, 4, 4) < 0)
+ if (PictureAddFilter (pScreen, FilterBilinear, 0, 2, 2) < 0)
return FALSE;
if (!PictureSetFilterAlias (pScreen, FilterNearest, FilterFast))
More information about the xorg-commit
mailing list