| Index: tools/skpdiff/SkPMetric.cpp
|
| diff --git a/tools/skpdiff/SkPMetric.cpp b/tools/skpdiff/SkPMetric.cpp
|
| index a19ed826f8f1cd344708a65dd51ade5beb4b6c0d..5b770b08bdbdee7e5803eb36a9dd317d4d69b6c9 100644
|
| --- a/tools/skpdiff/SkPMetric.cpp
|
| +++ b/tools/skpdiff/SkPMetric.cpp
|
| @@ -430,8 +430,14 @@ const char* SkPMetric::getName() {
|
|
|
| int SkPMetric::queueDiff(SkBitmap* baseline, SkBitmap* test) {
|
| double startTime = get_seconds();
|
| +
|
| + // since we currently synchronously do the diff within queueDiff we only need
|
| + // to protect the createion of the ID and queuedDiff object.
|
| + SkAutoMutexAcquire queueLock(fQueueMutex);
|
| int diffID = fQueuedDiffs.count();
|
| QueuedDiff& diff = fQueuedDiffs.push_back();
|
| + queueLock.release();
|
| +
|
| diff.result = 0.0;
|
|
|
| // Ensure the images are comparable
|
| @@ -456,7 +462,8 @@ int SkPMetric::queueDiff(SkBitmap* baseline, SkBitmap* test) {
|
|
|
|
|
| void SkPMetric::deleteDiff(int id) {
|
| -
|
| + // clean up the POI array to save space
|
| + return fQueuedDiffs[id].poi.reset();
|
| }
|
|
|
| bool SkPMetric::isFinished(int id) {
|
|
|