[cairo] PATCH: GL: Create glyph mask surface only once per context, enlarge on demand

Mikko Strandborg Mikko.Strandborg at symbio.com
Fri Feb 15 08:14:30 PST 2013

There are drivers and GPU architectures where resource allocation is
faster, and there are architectures where it is slower. If cairo wants to
be a general purpose vector graphics library, I think it should at least
attempt to make the best of all driver versions, no matter whether it is
fast or slow. Are you seriously proposing that it is faster to allocate a
new surface on DDX compared to reusing an existing one?

Ideological matters aside, can you please explain why this patch should
not be applied? There are no apparent downsides, and improves performance
(by an order of magnitude in some cases) in environments where the GPU
and/or the driver do not meet the rather stringent quality requirements.
This, unfortunately, is a a rather common occurrence in the mobile GPU


On 2/15/13 5:24 PM, "Chris Wilson" <chris at chris-wilson.co.uk> wrote:

>On Fri, Feb 15, 2013 at 03:08:32PM +0000, Mikko Strandborg wrote:
>> I don't think it is reasonable to expect GPU resources to be cheap to
>> create and/or destroy. That's why newer OpenGL specifications add more
>> more ways to buffer such GPU resources on the GPU hardware, rather than
>> requiring them to be transferred over non-uniform memory and relatively
>> slow buses to the GPU hardware on every frame. Of course in this case we
>> weren't transferring data over the bus, but the situation is similar to
>> having a malloc/free pair in the inner loop of a computation.
>Yet the DDX handles this fine. So yes, it is a driver issue.
>Chris Wilson, Intel Open Source Technology Centre

More information about the cairo mailing list