Lines Matching refs:gpu

23 GrGLBufferImpl::GrGLBufferImpl(GrGpuGL* gpu, const Desc& desc, GrGLenum bufferType)
38 void GrGLBufferImpl::release(GrGpuGL* gpu) {
45 GL_CALL(gpu, DeleteBuffers(1, &fDesc.fID));
47 gpu->notifyVertexBufferDelete(fDesc.fID);
50 gpu->notifyIndexBufferDelete(fDesc.fID);
68 void GrGLBufferImpl::bind(GrGpuGL* gpu) const {
71 gpu->bindVertexBuffer(fDesc.fID);
74 gpu->bindIndexBufferAndDefaultVertexArray(fDesc.fID);
79 void* GrGLBufferImpl::map(GrGpuGL* gpu) {
85 switch (gpu->glCaps().mapBufferType()) {
90 this->bind(gpu);
94 GL_CALL(gpu,
98 GR_GL_CALL_RET(gpu->glInterface(), fMapPtr,
102 this->bind(gpu);
106 GL_CALL(gpu,
112 GR_GL_CALL_RET(gpu->glInterface(),
118 this->bind(gpu);
122 GL_CALL(gpu,
126 GR_GL_CALL_RET(gpu->glInterface(),
136 void GrGLBufferImpl::unmap(GrGpuGL* gpu) {
140 switch (gpu->glCaps().mapBufferType()) {
146 this->bind(gpu);
147 GL_CALL(gpu, UnmapBuffer(fBufferType));
150 this->bind(gpu);
151 GR_GL_CALL(gpu->glInterface(), UnmapBufferSubData(fMapPtr));
163 bool GrGLBufferImpl::updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInBytes) {
173 this->bind(gpu);
178 GL_CALL(gpu, BufferData(fBufferType, (GrGLsizeiptr) srcSizeInBytes, src, usage));
185 // flushing the gpu past draws consuming the old contents.
187 GL_CALL(gpu, BufferData(fBufferType, fGLSizeInBytes, NULL, usage));
188 GL_CALL(gpu, BufferSubData(fBufferType, 0, (GrGLsizeiptr) srcSizeInBytes, src));
208 GL_CALL(gpu, BufferData(fBufferType, fGLSizeInBytes, NULL, usage));
209 GL_CALL(gpu, BufferSubData(fBufferType, 0, srcSizeInBytes, src));
212 GL_CALL(gpu, BufferData(fBufferType, fGLSizeInBytes, src, usage));