Lines Matching defs:size

37 sk_sp<GrGLBuffer> GrGLBuffer::Make(GrGLGpu* gpu, size_t size, GrGpuBufferType intendedType,
45 sk_sp<GrGLBuffer> buffer(new GrGLBuffer(gpu, size, intendedType, accessPattern, data));
106 GrGLBuffer::GrGLBuffer(GrGLGpu* gpu, size_t size, GrGpuBufferType intendedType,
108 : INHERITED(gpu, size, intendedType, accessPattern)
117 GrGLenum error = GL_ALLOC_CALL(BufferData(target, (GrGLsizeiptr)size, data, fUsage));
122 fGLSizeInBytes = size;
184 if (this->glCaps().useBufferDataNullHint() || fGLSizeInBytes != this->size()) {
186 GL_ALLOC_CALL(BufferData(target, this->size(), nullptr, fUsage));
197 // Make sure the GL buffer size agrees with fDesc before mapping.
198 if (fGLSizeInBytes != this->size()) {
199 GrGLenum error = GL_ALLOC_CALL(BufferData(target, this->size(), nullptr, fUsage));
214 GL_CALL_RET(fMapPtr, MapBufferRange(target, 0, this->size(), access));
219 // Make sure the GL buffer size agrees with fDesc before mapping.
220 if (fGLSizeInBytes != this->size()) {
221 GrGLenum error = GL_ALLOC_CALL(BufferData(target, this->size(), nullptr, fUsage));
226 GL_CALL_RET(fMapPtr, MapBufferSubData(target, 0, this->size(),
231 fGLSizeInBytes = this->size();
270 if (srcSizeInBytes > this->size()) {
273 SkASSERT(srcSizeInBytes <= this->size());
278 if (this->size() == srcSizeInBytes) {
293 GL_ALLOC_CALL(BufferData(target, (GrGLsizeiptr)this->size(), nullptr, fUsage));
299 fGLSizeInBytes = this->size();
301 // Note that we're cheating on the size here. Currently no methods
303 // portions of the buffer (map() does a glBufferData(..size, nullptr..))
327 SkASSERT(nullptr == fMapPtr || fGLSizeInBytes <= this->size());