Index: src/gpu/GrDrawTarget.cpp |
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp |
index 5512f174d7c7cd144d17a3b1500bc9f3299e9186..48473058ca4aec19a942577c3c340871aafe58bf 100644 |
--- a/src/gpu/GrDrawTarget.cpp |
+++ b/src/gpu/GrDrawTarget.cpp |
@@ -361,7 +361,7 @@ bool GrDrawTarget::checkDraw(GrPrimitiveType type, int startVertex, |
maxValidVertex = geoSrc.fVertexCount; |
break; |
case kBuffer_GeometrySrcType: |
- maxValidVertex = static_cast<int>(geoSrc.fVertexBuffer->sizeInBytes() / geoSrc.fVertexSize); |
+ maxValidVertex = static_cast<int>(geoSrc.fVertexBuffer->gpuMemorySize() / geoSrc.fVertexSize); |
break; |
} |
if (maxVertex > maxValidVertex) { |
@@ -378,7 +378,7 @@ bool GrDrawTarget::checkDraw(GrPrimitiveType type, int startVertex, |
maxValidIndex = geoSrc.fIndexCount; |
break; |
case kBuffer_GeometrySrcType: |
- maxValidIndex = static_cast<int>(geoSrc.fIndexBuffer->sizeInBytes() / sizeof(uint16_t)); |
+ maxValidIndex = static_cast<int>(geoSrc.fIndexBuffer->gpuMemorySize() / sizeof(uint16_t)); |
break; |
} |
if (maxIndex > maxValidIndex) { |