diff options
author | 2011-04-28 19:22:57 +0000 | |
---|---|---|
committer | 2011-04-28 19:22:57 +0000 | |
commit | eaf6a5daf48fda323213f8de66b883d3aa772b8e (patch) | |
tree | 55da113c820b061efa37d383d84352b4000eabc6 /gpu | |
parent | 6a77cc5dde4bc01a0a9ba9ac32140146247d113f (diff) |
Make reserveAndLockGeometry set index/vertex ptr to null if none requested. We are expecting this behavior in a caller and it seems reasonable.
git-svn-id: http://skia.googlecode.com/svn/trunk@1210 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/src/GrDrawTarget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gpu/src/GrDrawTarget.cpp b/gpu/src/GrDrawTarget.cpp index 1ac02f2faf..3810043f5e 100644 --- a/gpu/src/GrDrawTarget.cpp +++ b/gpu/src/GrDrawTarget.cpp @@ -413,9 +413,13 @@ bool GrDrawTarget::reserveAndLockGeometry(GrVertexLayout vertexLayout, if (vertexCount) { fGeometrySrc.fVertexSrc = kReserved_GeometrySrcType; fGeometrySrc.fVertexLayout = vertexLayout; + } else if (NULL != vertices) { + *vertices = NULL; } if (indexCount) { fGeometrySrc.fIndexSrc = kReserved_GeometrySrcType; + } else if (NULL != indices) { + *indices = NULL; } } return fReservedGeometry.fLocked; |