diff options
author | Brian Salomon <bsalomon@google.com> | 2017-05-09 09:57:19 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-09 17:41:28 +0000 |
commit | 2a55c8ef495b5fd501a3dee7c199c9064ab7e6bc (patch) | |
tree | 12a21197f2de44d42a7d8fa0def89161412233e3 /src/gpu/GrGpuCommandBuffer.cpp | |
parent | 5c77975e4c00e18e644c72b56f369858acd11b15 (diff) |
Avoid assertion in MSAA rendering buffer about indexed draw with zero index count
Also add some GrMesh::validate() calls earlier to make future debugging easier. Previously this only asserted when the draws executed, now it asserts as soon as the draw is prepared in the op subclass.
Bug: skia:
Change-Id: Ibdd4488b9a9263f0ed337a2c8c6066bc36297001
Reviewed-on: https://skia-review.googlesource.com/16029
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrGpuCommandBuffer.cpp')
-rw-r--r-- | src/gpu/GrGpuCommandBuffer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/GrGpuCommandBuffer.cpp b/src/gpu/GrGpuCommandBuffer.cpp index b51d3ea22a..a57a13fda6 100644 --- a/src/gpu/GrGpuCommandBuffer.cpp +++ b/src/gpu/GrGpuCommandBuffer.cpp @@ -10,6 +10,7 @@ #include "GrCaps.h" #include "GrFixedClip.h" #include "GrGpu.h" +#include "GrMesh.h" #include "GrPrimitiveProcessor.h" #include "GrRenderTarget.h" #include "SkRect.h" @@ -39,6 +40,7 @@ bool GrGpuCommandBuffer::draw(const GrPipeline& pipeline, const GrMesh* mesh, int meshCount, const SkRect& bounds) { + SkDEBUGCODE(mesh->validate()); if (pipeline.isBad() || primProc.isBad()) { return false; } |