aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/SkThreadedBMPDevice.cpp7
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);
});
}