Index: src/gpu/gl/GrGLBuffer.cpp |
diff --git a/src/gpu/gl/GrGLBuffer.cpp b/src/gpu/gl/GrGLBuffer.cpp |
index 96226b91219491838026512eadd64408f16c531f..35441aa8f558f096ad4c0b69d279273760cd657a 100644 |
--- a/src/gpu/gl/GrGLBuffer.cpp |
+++ b/src/gpu/gl/GrGLBuffer.cpp |
@@ -30,6 +30,12 @@ |
GrGLBuffer* GrGLBuffer::Create(GrGLGpu* gpu, size_t size, GrBufferType intendedType, |
GrAccessPattern accessPattern, const void* data) { |
+ if (gpu->glCaps().transferBufferType() == GrGLCaps::kNone_TransferBufferType && |
+ (kXferCpuToGpu_GrBufferType == intendedType || |
+ kXferGpuToCpu_GrBufferType == intendedType)) { |
+ return nullptr; |
+ } |
+ |
SkAutoTUnref<GrGLBuffer> buffer(new GrGLBuffer(gpu, size, intendedType, accessPattern, data)); |
if (0 == buffer->bufferID()) { |
return nullptr; |