diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-27 14:36:04 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-06-28 10:43:35 -0700 |
commit | 957bf959fb577b292a3e4f6bb67740ca09e7aeb9 (patch) | |
tree | 54093fb0af60b8ff0b22d647fe3c7b9a5f3d4cfb /hw/xfree86/modes | |
parent | a7b97b0fa85d695ae19d194cfa3267159d149e5d (diff) |
dix/render: consolidate window format matching code.
This code existed in 3 different forms, perhaps it should be
consolidated.
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86/modes')
-rw-r--r-- | hw/xfree86/modes/xf86Rotate.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index 6a661e195..31e03727e 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -46,28 +46,6 @@ /* borrowed from composite extension, move to Render and publish? */ -static VisualPtr -compGetWindowVisual(WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - VisualID vid = wVisual(pWin); - int i; - - for (i = 0; i < pScreen->numVisuals; i++) - if (pScreen->visuals[i].vid == vid) - return &pScreen->visuals[i]; - return 0; -} - -static PictFormatPtr -compWindowFormat(WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - return PictureMatchVisual(pScreen, pWin->drawable.depth, - compGetWindowVisual(pWin)); -} - #define F(x) IntToxFixed(x) #define toF(x) ((float) (x) / 65536.0f) @@ -79,7 +57,7 @@ xf86RotateCrtcRedisplay(xf86CrtcPtr crtc, RegionPtr region) ScreenPtr screen = scrn->pScreen; WindowPtr root = screen->root; PixmapPtr dst_pixmap = crtc->rotatedPixmap; - PictFormatPtr format = compWindowFormat(screen->root); + PictFormatPtr format = PictureWindowFormat(screen->root); int error; PicturePtr src, dst; int n = RegionNumRects(region); |