diff options
Diffstat (limited to 'src/gpu/GrDrawTarget.cpp')
-rw-r--r-- | src/gpu/GrDrawTarget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp index 5512f174d7..48473058ca 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) { |