summaryrefslogtreecommitdiff
path: root/glamor/glamor_core.c
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2011-07-07 15:31:35 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2011-09-26 16:46:36 +0800
commitf961390db6fa0707895effb2e7672edda575f8ec (patch)
tree379e3e9fd9547a49c242325e6a2b48bc0f3e5e82 /glamor/glamor_core.c
parent77ecd366933bbe726a4a7e57e35b1510b675df8d (diff)
glamor: Don't need to pad the tile image if pixmap is ni texture.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'glamor/glamor_core.c')
-rw-r--r--glamor/glamor_core.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c
index 31734bed0..da8b90b21 100644
--- a/glamor/glamor_core.c
+++ b/glamor/glamor_core.c
@@ -242,12 +242,10 @@ Bool
glamor_prepare_access_gc(GCPtr gc)
{
if (gc->stipple) {
- glamor_fallback("has stipple %p\n", gc->stipple);
if (!glamor_prepare_access(&gc->stipple->drawable, GLAMOR_ACCESS_RO))
return FALSE;
}
if (gc->fillStyle == FillTiled) {
- glamor_fallback("has tile pixmap %p\n", gc->tile.pixmap);
if (!glamor_prepare_access (&gc->tile.pixmap->drawable,
GLAMOR_ACCESS_RO)) {
if (gc->stipple)
@@ -353,16 +351,20 @@ glamor_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable)
}
#endif
if (changes & GCTile) {
- if (!gc->tileIsPixel && FbEvenTile(gc->tile.pixmap->drawable.width *
- drawable->bitsPerPixel))
- {
- glamor_fallback("GC %p tile changed %p.\n", gc, gc->tile.pixmap);
- if (glamor_prepare_access(&gc->tile.pixmap->drawable,
+ if (!gc->tileIsPixel) {
+ glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(gc->tile.pixmap);
+ if ((!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv))
+ && FbEvenTile(gc->tile.pixmap->drawable.width *
+ drawable->bitsPerPixel))
+ {
+ glamor_fallback("GC %p tile changed %p.\n", gc, gc->tile.pixmap);
+ if (glamor_prepare_access(&gc->tile.pixmap->drawable,
GLAMOR_ACCESS_RW)) {
fbPadPixmap(gc->tile.pixmap);
glamor_finish_access(&gc->tile.pixmap->drawable);
- }
- }
+ }
+ }
+ }
/* Mask out the GCTile change notification, now that we've done FB's
* job for it.
*/
@@ -373,7 +375,6 @@ glamor_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable)
/* We can't inline stipple handling like we do for GCTile because
* it sets fbgc privates.
*/
- glamor_fallback("GC %p stipple changed %p.\n", gc, gc->stipple);
if (glamor_prepare_access(&gc->stipple->drawable, GLAMOR_ACCESS_RW)) {
fbValidateGC(gc, changes, drawable);
glamor_finish_access(&gc->stipple->drawable);