diff options
author | Ruiqi Mao <ruiqimao@google.com> | 2018-07-17 17:59:41 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-17 22:30:41 +0000 |
commit | cc3f3d8c3811e823e3517b3570b644f16221aff5 (patch) | |
tree | 84bb7b7be3b60746fb468d3856f38fd9876c132c /src | |
parent | 4b3a5152a3cdb25d1f19fd3a04b3248f4462e05e (diff) |
fixed ASAN dm errors
Bug: skia:
Change-Id: Id2819c7c0c187dccf13e40fd4a96698701cccc48
Reviewed-on: https://skia-review.googlesource.com/141965
Reviewed-by: Ruiqi Mao <ruiqimao@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkThreadedBMPDevice.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/SkThreadedBMPDevice.cpp b/src/core/SkThreadedBMPDevice.cpp index 36a3a3e4c6..0fed293239 100644 --- a/src/core/SkThreadedBMPDevice.cpp +++ b/src/core/SkThreadedBMPDevice.cpp @@ -227,9 +227,12 @@ void SkThreadedBMPDevice::drawVertices(const SkVertices* vertices, const SkMatri const sk_sp<SkVertices> verts = sk_ref_sp(vertices); // retain vertices until flush SkRect drawBounds = SkRectPriv::MakeLargest(); // TODO tighter drawBounds + // Make a copy of the bone matrices. + SkMatrix* clonedBones = this->cloneArray(bones, boneCount); + // Make the bone matrices thread-safe. for (int i = 0; i < boneCount; i ++) { - bones[i].getType(); + clonedBones[i].getType(); } fQueue.push(drawBounds, [=](SkArenaAlloc*, const DrawState& ds, const SkIRect& tileBounds){ @@ -237,7 +240,7 @@ void SkThreadedBMPDevice::drawVertices(const SkVertices* vertices, const SkMatri verts->positions(), verts->texCoords(), verts->colors(), verts->boneIndices(), verts->boneWeights(), bmode, verts->indices(), - verts->indexCount(), paint, bones, boneCount); + verts->indexCount(), paint, clonedBones, boneCount); }); } |