diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-23 22:15:56 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-23 22:15:56 +0100 |
commit | ded05e8abb248664124d2b86f77c27497a252c4e (patch) | |
tree | d825a62765bf46e879a25cbeb7384846a79136aa /src/sna/sna_glyphs.c | |
parent | 6c5658b14451239b8e4333702a227d83eed09f96 (diff) |
sna: Allow scratch pixmap to allocate linear GPU bo
When allocating a scratch pixmap, we do so in the expectation that
rendering on the GPU is always preferrable, so even allocate a small
linear bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_glyphs.c')
-rw-r--r-- | src/sna/sna_glyphs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index 5587fccc..96279e66 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -246,6 +246,7 @@ bool sna_glyphs_create(struct sna *sna) priv = sna_pixmap(pixmap); if (priv != NULL) { /* Prevent the cache from ever being paged out */ + assert(priv->gpu_bo); priv->pinned = PIN_SCANOUT; component_alpha = NeedsComponent(pPictFormat->format); @@ -1339,12 +1340,9 @@ next_image: width, height, format->depth, SNA_CREATE_SCRATCH); if (!pixmap) - return false; - - if (sna_pixmap(pixmap) == NULL) { - sna_pixmap_destroy(pixmap); goto use_small_mask; - } + + assert(__sna_pixmap_get_bo(pixmap)); mask = CreatePicture(0, &pixmap->drawable, format, CPComponentAlpha, |