xf86-video-intel: 2 commits - src/sna/sna_accel.c src/sna/sna_render.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Jun 4 05:54:11 PDT 2012
src/sna/sna_accel.c | 12 +++++-------
src/sna/sna_render.c | 7 +++----
2 files changed, 8 insertions(+), 11 deletions(-)
New commits:
commit 6dc5ddfe807b307ca10af971c4f84498b2fb82a2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jun 4 13:49:35 2012 +0100
sna: Remove bogus check for color == 0
This was written when the RGBA color value was being passed around and
not the pointer to the xRenderColor. As such, the NULL deref check
doesn't gain much and the check for rgba==0 irrelevant in this scenario.
Reported-by: Zdenek Kabelac <zkabelac at redhat.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index c3c6666..e06e3c2 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -154,10 +154,8 @@ no_render_fill_boxes(struct sna *sna,
__FUNCTION__, op,
color->red, color->green, color->blue, color->alpha));
- if (color == 0)
- op = PictOpClear;
-
if (op == PictOpClear) {
+ pixel = 0;
alu = GXclear;
op = PictOpSrc;
}
@@ -170,7 +168,8 @@ no_render_fill_boxes(struct sna *sna,
if (op != PictOpSrc)
return FALSE;
- if (!sna_get_pixel_from_rgba(&pixel,
+ if (alu == GXcopy &&
+ !sna_get_pixel_from_rgba(&pixel,
color->red,
color->green,
color->blue,
commit 9b3937228c692598899fb39bfe448a9b457315db
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jun 4 13:47:58 2012 +0100
sna: Simplify selecting default tiling for framebuffers
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index eb85cb4..afd9ed7 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -477,21 +477,19 @@ static inline uint32_t default_tiling(PixmapPtr pixmap)
constant static uint32_t sna_pixmap_choose_tiling(PixmapPtr pixmap)
{
struct sna *sna = to_sna_from_pixmap(pixmap);
- uint32_t tiling = default_tiling(pixmap);
- uint32_t bit;
+ uint32_t tiling, bit;
/* Use tiling by default, but disable per user request */
if (pixmap->usage_hint == SNA_CREATE_FB) {
- tiling = I915_TILING_X;
+ tiling = -I915_TILING_X;
bit = SNA_TILING_FB;
- } else
+ } else {
+ tiling = default_tiling(pixmap);
bit = SNA_TILING_2D;
+ }
if ((sna->tiling && (1 << bit)) == 0)
tiling = I915_TILING_NONE;
- if (pixmap->usage_hint == SNA_CREATE_FB)
- tiling = -tiling;
-
/* Also adjust tiling if it is not supported or likely to
* slow us down,
*/
More information about the xorg-commit
mailing list