Lines Matching defs:GrBufferObj
18 class GrBufferObj {
20 GrBufferObj(GrGLuint id) : fID(id), fDataPtr(NULL), fSize(0), fMapped(false) {
22 ~GrBufferObj() { SkDELETE_ARRAY(fDataPtr); }
50 static SkTDArray<GrBufferObj*> gBuffers; // slot 0 is reserved for head of free list
54 static GrBufferObj* look_up(GrGLuint id) {
55 GrBufferObj* buffer = gBuffers[id];
60 static GrBufferObj* create_buffer() {
67 GrBufferObj* buffer;
72 buffer = SkNEW_ARGS(GrBufferObj, (id));
79 buffer = SkNEW_ARGS(GrBufferObj, (id));
86 static void delete_buffer(GrBufferObj* buffer) {
94 gBuffers[0] = SkTCast<GrBufferObj*>((const void*)(intptr_t)id);
108 GrBufferObj* buffer = create_buffer();
134 GrBufferObj* buffer = look_up(id);
185 GrBufferObj* buffer = look_up(ids[i]);
203 GrBufferObj* buffer = look_up(id);
224 GrBufferObj* buffer = look_up(id);
248 GrBufferObj* buffer = look_up(id);