Chromium Code Reviews| Index: dm/DMReplayTask.cpp |
| diff --git a/dm/DMReplayTask.cpp b/dm/DMReplayTask.cpp |
| index bc94f73cb1791230a5362d6d299fd7ff6544be3a..8e20eada3b45cbf4d1672daf0cea1387705018a1 100644 |
| --- a/dm/DMReplayTask.cpp |
| +++ b/dm/DMReplayTask.cpp |
| @@ -8,13 +8,11 @@ namespace DM { |
| ReplayTask::ReplayTask(const char* suffix, |
| const Task& parent, |
| skiagm::GM* gm, |
| - skiagm::GmResultDigest reference, |
| - SkBitmap::Config config) |
| + SkBitmap reference) |
| : Task(parent) |
| , fName(underJoin(parent.name().c_str(), suffix)) |
| , fGM(gm) |
| , fReference(reference) |
| - , fConfig(config) |
| {} |
| void ReplayTask::draw() { |
| @@ -28,7 +26,7 @@ void ReplayTask::draw() { |
| picture.endRecording(); |
| SkBitmap bitmap; |
| - bitmap.setConfig(fConfig, fGM->width(), fGM->height()); |
| + bitmap.setConfig(fReference.config(), fGM->width(), fGM->height()); |
| bitmap.allocPixels(); |
| bitmap.eraseColor(0x00000000); |
| @@ -36,8 +34,9 @@ void ReplayTask::draw() { |
| replay.drawPicture(picture); |
| replay.flush(); |
| - const skiagm::GmResultDigest replayDigest(bitmap); |
| - if (!replayDigest.equals(fReference)) { |
| + const SkAutoLockPixels mine(bitmap), theirs(fReference); |
| + if (bitmap.getSize() != fReference.getSize() || |
| + 0 != memcmp(bitmap.getPixels(), fReference.getPixels(), bitmap.getSize())) { |
|
bungeman-skia
2013/10/16 17:22:54
I know it isn't technically in the skia style guid
mtklein
2013/10/16 17:27:47
Done.
|
| this->fail(); |
| } |
| } |