[cairo] [patch] gl: set tex_with in cairo_gl_gradient_t instead in cairo_entry.size

Chris Wilson chris at chris-wilson.co.uk
Mon Nov 5 13:39:00 PST 2012


On Mon, 5 Nov 2012 21:28:31 +0000, "Henry (Yu) Song - SISA" <hsong at sisa.samsung.com> wrote:
> From 18e714f260f18e6ae13979a289b6f7892d7f82c2 Mon Sep 17 00:00:00 2001
> From: Henry Song <henry.song at samsung.com>
> Date: Mon, 5 Nov 2012 13:16:18 -0800
> Subject: [PATCH] gl: add tex_width in cairo_gl_gradient_t structure, there is
>  no need to set cache_entry.size to be tex_width, this makes
>  it unlikely overflows gradient cache

The idea is that the gradient cache tries to only keep a certain amount
of texture memory cached. It sounds like that limit is too low --
indeed, it is set at 4096 which is only 16k, or roughly 4 gradients.
That would be better with

#define CAIRO_GL_GRADIENT_CACHE_SIZE 16384

judging by desktop usage, and you probably have a better idea for your
use cases.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list