| Index: src/gpu/batches/GrAtlasTextBatch.cpp
|
| diff --git a/src/gpu/batches/GrAtlasTextBatch.cpp b/src/gpu/batches/GrAtlasTextBatch.cpp
|
| index ce6b2eae2b56d4db7eb86aab35b94f756cc34434..b2251a42a884b1be3f3c530ea27ab1926134386e 100644
|
| --- a/src/gpu/batches/GrAtlasTextBatch.cpp
|
| +++ b/src/gpu/batches/GrAtlasTextBatch.cpp
|
| @@ -413,6 +413,19 @@ void GrAtlasTextBatch::onPrepareDraws(Target* target) const {
|
| size_t byteCount = info.byteCount();
|
| memcpy(currVertex, blob->fVertices + info.vertexStartIndex(), byteCount);
|
|
|
| +#ifdef SK_DEBUG
|
| + // bounds sanity check
|
| + SkRect rect;
|
| + rect.setLargestInverted();
|
| + SkPoint* vertex = (SkPoint*) ((char*)blob->fVertices + info.vertexStartIndex());
|
| + rect.growToInclude(vertex, vertexStride, kVerticesPerGlyph * info.glyphCount());
|
| +
|
| + if (this->usesDistanceFields()) {
|
| + fBatch.fViewMatrix.mapRect(&rect);
|
| + }
|
| + SkASSERT(fBounds.contains(rect));
|
| +#endif
|
| +
|
| currVertex += byteCount;
|
| }
|
|
|
|
|