summaryrefslogtreecommitdiff
path: root/src/sna/sna_gradient.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-10-19 16:25:42 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-10-19 16:26:38 +0100
commit594c5f86bb2e1cd0390b360c926ead58ba49979f (patch)
tree071eb4467a4dc3a1b92a451245fe8cb0014af56f /src/sna/sna_gradient.c
parent5515f75647bb148d9e720dcc4713a93b59ffbd49 (diff)
sna: Don't rewrite the solid colour cache if it hasn't changed
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_gradient.c')
-rw-r--r--src/sna/sna_gradient.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_gradient.c b/src/sna/sna_gradient.c
index 4a93143f..84d57f47 100644
--- a/src/sna/sna_gradient.c
+++ b/src/sna/sna_gradient.c
@@ -227,9 +227,9 @@ sna_render_finish_solid(struct sna *sna, bool force)
int i;
DBG(("sna_render_finish_solid(force=%d, busy=%d, dirty=%d)\n",
- force, cache->cache_bo->rq != NULL, cache->dirty));
+ force, cache->cache_bo->gpu, cache->dirty));
- if (!force && !cache->cache_bo->rq)
+ if (!force && !cache->cache_bo->gpu)
return;
if (cache->dirty)
@@ -291,13 +291,13 @@ sna_render_get_solid(struct sna *sna, uint32_t color)
i = cache->size++;
cache->color[i] = color;
+ cache->dirty = 1;
DBG(("sna_render_get_solid(%d) = %x (new)\n", i, color));
create:
cache->bo[i] = kgem_create_proxy(cache->cache_bo,
i*sizeof(uint32_t), sizeof(uint32_t));
cache->bo[i]->pitch = 4;
- cache->dirty = 1;
done:
cache->last = i;