pixel-array: Allow passing of hints to cogl_buffer_map

This allows you to tell Cogl that you are planning to replace all the
buffer's data once it is mapped with cogl_buffer_map. This means if the
buffer is currently being accessed by the GPU then the driver doesn't
have to stall and wait for it to finish before it can access it from the
CPU and can instead potentially allocate a new buffer with undefined
data and map that.
This commit is contained in:
Robert Bragg
2010-07-05 16:14:00 +01:00
parent 51e4245ce1
commit 92d0322766
4 changed files with 46 additions and 10 deletions

View File

@ -52,7 +52,8 @@ typedef struct _CoglBufferVtable CoglBufferVtable;
struct _CoglBufferVtable
{
guint8 * (* map) (CoglBuffer *buffer,
CoglBufferAccess access);
CoglBufferAccess access,
CoglBufferMapHint hints);
void (* unmap) (CoglBuffer *buffer);