Home | History | Annotate | Download | only in gl

Lines Matching refs:gpu

11 #define GL_CALL(GPU, X) GR_GL_CALL(GPU->glInterface(), X)
19 // GL_STREAM_DRAW triggers an optimization in Chromium's GPU process where a client's vertex buffer
23 GrGLBufferImpl::GrGLBufferImpl(GrGpuGL* gpu, const Desc& desc, GrGLenum bufferType)
35 void GrGLBufferImpl::release(GrGpuGL* gpu) {
43 GL_CALL(gpu, DeleteBuffers(1, &fDesc.fID));
45 gpu->notifyVertexBufferDelete(fDesc.fID);
48 gpu->notifyIndexBufferDelete(fDesc.fID);
62 void GrGLBufferImpl::bind(GrGpuGL* gpu) const {
65 gpu->bindVertexBuffer(fDesc.fID);
68 gpu->bindIndexBufferAndDefaultVertexArray(fDesc.fID);
72 void* GrGLBufferImpl::lock(GrGpuGL* gpu) {
77 } else if (gpu->caps()->bufferLockSupport()) {
78 this->bind(gpu);
80 GL_CALL(gpu, BufferData(fBufferType,
84 GR_GL_CALL_RET(gpu->glInterface(),
91 void GrGLBufferImpl::unlock(GrGpuGL* gpu) {
95 GrAssert(gpu->caps()->bufferLockSupport());
96 this->bind(gpu);
97 GL_CALL(gpu, UnmapBuffer(fBufferType));
107 bool GrGLBufferImpl::updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInBytes) {
117 this->bind(gpu);
122 GL_CALL(gpu, BufferData(fBufferType, srcSizeInBytes, src, usage));
126 // inaccessible to future draws. The GPU may still be processing
129 // flushing the gpu past draws consuming the old contents.
130 GL_CALL(gpu, BufferData(fBufferType, fDesc.fSizeInBytes, NULL, usage));
131 GL_CALL(gpu, BufferSubData(fBufferType, 0, srcSizeInBytes, src));
150 GL_CALL(gpu, BufferData(fBufferType, srcSizeInBytes + 1, NULL, usage));
151 GL_CALL(gpu, BufferSubData(fBufferType, 0, srcSizeInBytes, src));
153 GL_CALL(gpu, BufferData(fBufferType, srcSizeInBytes, src, usage));