Index: chrome/browser/chromeos/login/screenshot_testing/SkDiffPixelsMetric_cpu.cpp |
diff --git a/chrome/browser/chromeos/login/screenshot_testing/SkDiffPixelsMetric_cpu.cpp b/chrome/browser/chromeos/login/screenshot_testing/SkDiffPixelsMetric_cpu.cpp |
index 03c3789caff3dbb43dc4f002c9803bc155ae97f2..b77a3bc256c86106611bf156e56b05dc212d5d56 100644 |
--- a/chrome/browser/chromeos/login/screenshot_testing/SkDiffPixelsMetric_cpu.cpp |
+++ b/chrome/browser/chromeos/login/screenshot_testing/SkDiffPixelsMetric_cpu.cpp |
@@ -53,8 +53,6 @@ bool SkDifferentPixelsMetric::diff( |
// Prepare the pixels for comparison |
result->poiCount = 0; |
- baseline->lockPixels(); |
- test->lockPixels(); |
for (int y = 0; y < height; y++) { |
// Grab a row from each image for easy comparison |
// TODO(epoger): The code below already assumes 4 bytes per pixel, so I |
@@ -102,23 +100,11 @@ bool SkDifferentPixelsMetric::diff( |
} |
} |
} |
- test->unlockPixels(); |
- baseline->unlockPixels(); |
result->maxRedDiff = maxRedDiff; |
result->maxGreenDiff = maxGreenDiff; |
result->maxBlueDiff = maxBlueDiff; |
- if (bitmapsToCreate.alphaMask) { |
- result->poiAlphaMask.unlockPixels(); |
- } |
- if (bitmapsToCreate.rgbDiff) { |
- result->rgbDiffBitmap.unlockPixels(); |
- } |
- if (bitmapsToCreate.whiteDiff) { |
- result->whiteDiffBitmap.unlockPixels(); |
- } |
- |
// Calculates the percentage of identical pixels |
result->result = 1.0 - ((double)result->poiCount / (width * height)); |