diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-14 13:13:55 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-14 13:13:55 +0000 |
commit | ea033606a06d05d2d42aa7118409fee798e53167 (patch) | |
tree | eaa1a57aaf7655745d0806d5b5290f86486f0970 /src/core/SkDraw.cpp | |
parent | 8234e5448bf672d332880e75dd6d8ca82c1cd521 (diff) |
add per-draw checks for lockcounts
Review URL: https://codereview.appspot.com/6943056
git-svn-id: http://skia.googlecode.com/svn/trunk@6815 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r-- | src/core/SkDraw.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 2f748d9930..b6eb6825d6 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -2424,6 +2424,13 @@ void SkDraw::drawVertices(SkCanvas::VertexMode vmode, int count, } SkAutoBlitterChoose blitter(*fBitmap, *fMatrix, p); + // important that we abort early, as below we may manipulate the shader + // and that is only valid if the shader returned true from setContext. + // If it returned false, then our blitter will be the NullBlitter. + if (blitter->isNullBlitter()) { + return; + } + // setup our state and function pointer for iterating triangles VertState state(count, indices, indexCount); VertState::Proc vertProc = state.chooseProc(vmode); |