diff options
author | Zack Rusin <zack@kde.org> | 2005-07-08 07:43:00 +0000 |
---|---|---|
committer | Zack Rusin <zack@kde.org> | 2005-07-08 07:43:00 +0000 |
commit | 4ab73a73f4aa1f02cc8dada185b5dcbddfe43878 (patch) | |
tree | d8b26254ffad6c44d4f0ee8d16a5bac5dca18452 | |
parent | 0a28516a6e641b41e674f69fc228b0babbe1743b (diff) |
heh, oops (thanks Thomas)
-rw-r--r-- | exa/exa.c | 37 | ||||
-rw-r--r-- | exa/exa_accel.c | 37 | ||||
-rw-r--r-- | exa/exa_migration.c | 37 | ||||
-rw-r--r-- | hw/xfree86/exa/exa.c | 37 | ||||
-rw-r--r-- | hw/xfree86/exa/exa_accel.c | 37 | ||||
-rw-r--r-- | hw/xfree86/exa/exa_migration.c | 37 |
6 files changed, 90 insertions, 132 deletions
@@ -335,30 +335,21 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (!pScrn->vtSema) { ExaScreenPriv(pScreen); pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); - pExaPixmap = ExaGetPixmapPriv(pPixmap); - if (!w || !h) - pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; - else - pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; - - pExaPixmap->area = NULL; - pExaPixmap->dirty = FALSE; - return pPixmap; - } + } else { + bpp = BitsPerPixel (depth); + if (bpp == 32 && depth == 24) + { + int format; + for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) + if (pScrn->formats[format].depth == 24) + { + bpp = pScrn->formats[format].bitsPerPixel; + break; + } + } - bpp = BitsPerPixel (depth); - if (bpp == 32 && depth == 24) - { - int format; - for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) - if (pScrn->formats[format].depth == 24) - { - bpp = pScrn->formats[format].bitsPerPixel; - break; - } + pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); } - - pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); if (!pPixmap) return NULL; pExaPixmap = ExaGetPixmapPriv(pPixmap); @@ -1085,8 +1076,10 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) switch (what) { case PW_BACKGROUND: pExaScr->SavedPaintWindowBackground(pWin, pRegion, what); + break; case PW_BORDER: pExaScr->SavedPaintWindowBorder(pWin, pRegion, what); + break; } return; } diff --git a/exa/exa_accel.c b/exa/exa_accel.c index b9aa424d8..d0d4a6f86 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -335,30 +335,21 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (!pScrn->vtSema) { ExaScreenPriv(pScreen); pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); - pExaPixmap = ExaGetPixmapPriv(pPixmap); - if (!w || !h) - pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; - else - pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; - - pExaPixmap->area = NULL; - pExaPixmap->dirty = FALSE; - return pPixmap; - } + } else { + bpp = BitsPerPixel (depth); + if (bpp == 32 && depth == 24) + { + int format; + for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) + if (pScrn->formats[format].depth == 24) + { + bpp = pScrn->formats[format].bitsPerPixel; + break; + } + } - bpp = BitsPerPixel (depth); - if (bpp == 32 && depth == 24) - { - int format; - for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) - if (pScrn->formats[format].depth == 24) - { - bpp = pScrn->formats[format].bitsPerPixel; - break; - } + pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); } - - pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); if (!pPixmap) return NULL; pExaPixmap = ExaGetPixmapPriv(pPixmap); @@ -1085,8 +1076,10 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) switch (what) { case PW_BACKGROUND: pExaScr->SavedPaintWindowBackground(pWin, pRegion, what); + break; case PW_BORDER: pExaScr->SavedPaintWindowBorder(pWin, pRegion, what); + break; } return; } diff --git a/exa/exa_migration.c b/exa/exa_migration.c index b9aa424d8..d0d4a6f86 100644 --- a/exa/exa_migration.c +++ b/exa/exa_migration.c @@ -335,30 +335,21 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (!pScrn->vtSema) { ExaScreenPriv(pScreen); pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); - pExaPixmap = ExaGetPixmapPriv(pPixmap); - if (!w || !h) - pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; - else - pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; - - pExaPixmap->area = NULL; - pExaPixmap->dirty = FALSE; - return pPixmap; - } + } else { + bpp = BitsPerPixel (depth); + if (bpp == 32 && depth == 24) + { + int format; + for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) + if (pScrn->formats[format].depth == 24) + { + bpp = pScrn->formats[format].bitsPerPixel; + break; + } + } - bpp = BitsPerPixel (depth); - if (bpp == 32 && depth == 24) - { - int format; - for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) - if (pScrn->formats[format].depth == 24) - { - bpp = pScrn->formats[format].bitsPerPixel; - break; - } + pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); } - - pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); if (!pPixmap) return NULL; pExaPixmap = ExaGetPixmapPriv(pPixmap); @@ -1085,8 +1076,10 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) switch (what) { case PW_BACKGROUND: pExaScr->SavedPaintWindowBackground(pWin, pRegion, what); + break; case PW_BORDER: pExaScr->SavedPaintWindowBorder(pWin, pRegion, what); + break; } return; } diff --git a/hw/xfree86/exa/exa.c b/hw/xfree86/exa/exa.c index b9aa424d8..d0d4a6f86 100644 --- a/hw/xfree86/exa/exa.c +++ b/hw/xfree86/exa/exa.c @@ -335,30 +335,21 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (!pScrn->vtSema) { ExaScreenPriv(pScreen); pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); - pExaPixmap = ExaGetPixmapPriv(pPixmap); - if (!w || !h) - pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; - else - pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; - - pExaPixmap->area = NULL; - pExaPixmap->dirty = FALSE; - return pPixmap; - } + } else { + bpp = BitsPerPixel (depth); + if (bpp == 32 && depth == 24) + { + int format; + for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) + if (pScrn->formats[format].depth == 24) + { + bpp = pScrn->formats[format].bitsPerPixel; + break; + } + } - bpp = BitsPerPixel (depth); - if (bpp == 32 && depth == 24) - { - int format; - for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) - if (pScrn->formats[format].depth == 24) - { - bpp = pScrn->formats[format].bitsPerPixel; - break; - } + pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); } - - pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); if (!pPixmap) return NULL; pExaPixmap = ExaGetPixmapPriv(pPixmap); @@ -1085,8 +1076,10 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) switch (what) { case PW_BACKGROUND: pExaScr->SavedPaintWindowBackground(pWin, pRegion, what); + break; case PW_BORDER: pExaScr->SavedPaintWindowBorder(pWin, pRegion, what); + break; } return; } diff --git a/hw/xfree86/exa/exa_accel.c b/hw/xfree86/exa/exa_accel.c index b9aa424d8..d0d4a6f86 100644 --- a/hw/xfree86/exa/exa_accel.c +++ b/hw/xfree86/exa/exa_accel.c @@ -335,30 +335,21 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (!pScrn->vtSema) { ExaScreenPriv(pScreen); pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); - pExaPixmap = ExaGetPixmapPriv(pPixmap); - if (!w || !h) - pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; - else - pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; - - pExaPixmap->area = NULL; - pExaPixmap->dirty = FALSE; - return pPixmap; - } + } else { + bpp = BitsPerPixel (depth); + if (bpp == 32 && depth == 24) + { + int format; + for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) + if (pScrn->formats[format].depth == 24) + { + bpp = pScrn->formats[format].bitsPerPixel; + break; + } + } - bpp = BitsPerPixel (depth); - if (bpp == 32 && depth == 24) - { - int format; - for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) - if (pScrn->formats[format].depth == 24) - { - bpp = pScrn->formats[format].bitsPerPixel; - break; - } + pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); } - - pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); if (!pPixmap) return NULL; pExaPixmap = ExaGetPixmapPriv(pPixmap); @@ -1085,8 +1076,10 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) switch (what) { case PW_BACKGROUND: pExaScr->SavedPaintWindowBackground(pWin, pRegion, what); + break; case PW_BORDER: pExaScr->SavedPaintWindowBorder(pWin, pRegion, what); + break; } return; } diff --git a/hw/xfree86/exa/exa_migration.c b/hw/xfree86/exa/exa_migration.c index b9aa424d8..d0d4a6f86 100644 --- a/hw/xfree86/exa/exa_migration.c +++ b/hw/xfree86/exa/exa_migration.c @@ -335,30 +335,21 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (!pScrn->vtSema) { ExaScreenPriv(pScreen); pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); - pExaPixmap = ExaGetPixmapPriv(pPixmap); - if (!w || !h) - pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; - else - pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; - - pExaPixmap->area = NULL; - pExaPixmap->dirty = FALSE; - return pPixmap; - } + } else { + bpp = BitsPerPixel (depth); + if (bpp == 32 && depth == 24) + { + int format; + for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) + if (pScrn->formats[format].depth == 24) + { + bpp = pScrn->formats[format].bitsPerPixel; + break; + } + } - bpp = BitsPerPixel (depth); - if (bpp == 32 && depth == 24) - { - int format; - for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format) - if (pScrn->formats[format].depth == 24) - { - bpp = pScrn->formats[format].bitsPerPixel; - break; - } + pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); } - - pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); if (!pPixmap) return NULL; pExaPixmap = ExaGetPixmapPriv(pPixmap); @@ -1085,8 +1076,10 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) switch (what) { case PW_BACKGROUND: pExaScr->SavedPaintWindowBackground(pWin, pRegion, what); + break; case PW_BORDER: pExaScr->SavedPaintWindowBorder(pWin, pRegion, what); + break; } return; } |