Chromium Code Reviews| Index: src/gpu/GrContext.cpp |
| diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
| index b5c8e3e592b21f1d7667d33434316c92a48f5435..11bced9217f41435635d31f4da84bc30228f7211 100755 |
| --- a/src/gpu/GrContext.cpp |
| +++ b/src/gpu/GrContext.cpp |
| @@ -1119,6 +1119,13 @@ void GrContext::drawVertices(GrRenderTarget* rt, |
| GR_CREATE_TRACE_MARKER("GrContext::drawVertices", target); |
| + // TODO clients should give us bounds |
| + SkRect bounds; |
| + if (!bounds.setBoundsCheck(positions, vertexCount)) { |
| + SkDebugf("drawVertices call empty bounds\n"); |
| + return; |
| + } |
| + |
| DrawVerticesBatch::Geometry geometry; |
| geometry.fColor = paint.getColor(); |
| @@ -1127,7 +1134,7 @@ void GrContext::drawVertices(GrRenderTarget* rt, |
| indexCount,colors, texCoords)); |
| // TODO figure out bounds |
|
bsalomon
2015/04/30 21:05:30
rm this comment? (maybe in the bounds into batch c
|
| - target->drawBatch(&pipelineBuilder, batch, NULL); |
| + target->drawBatch(&pipelineBuilder, batch, &bounds); |
| } |
| /////////////////////////////////////////////////////////////////////////////// |