In shapes_as_paths, draw zoom from pixmaps, not images

Trying to track down why the Galaxy S6 sometimes claims that every pixel
is different, even though the zoomed images look identical. It's helpful
to draw what's actually being diffed.

Bug: skia:6653
Change-Id: Ia577aa70ed11d806fa204eaffdef41e6a65a60f2
Reviewed-on: https://skia-review.googlesource.com/18623
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
Brian Osman 2017-06-05 13:49:38 -04:00 committed by Skia Commit-Bot
parent 67d52cf0d8
commit ad5a64604f

View File

@ -78,10 +78,13 @@ static void draw_diff(SkCanvas* canvas, SkImage* imgA, SkImage* imgB) {
canvas->drawBitmap(highlight, 0, 0);
// Draw zoom of largest pixel diff
canvas->drawImageRect(imgA, SkRect::MakeXYWH(maxDiffX - 5, maxDiffY - 5, 10, 10),
SkRect::MakeXYWH(w, 0, w, h), nullptr);
canvas->drawImageRect(imgB, SkRect::MakeXYWH(maxDiffX - 5, maxDiffY - 5, 10, 10),
SkRect::MakeXYWH(2 * w, 0, w, h), nullptr);
SkBitmap bmpA, bmpB;
SkAssertResult(bmpA.installPixels(pmapA));
SkAssertResult(bmpB.installPixels(pmapB));
canvas->drawBitmapRect(bmpA, SkRect::MakeXYWH(maxDiffX - 5, maxDiffY - 5, 10, 10),
SkRect::MakeXYWH(w, 0, w, h), nullptr);
canvas->drawBitmapRect(bmpB, SkRect::MakeXYWH(maxDiffX - 5, maxDiffY - 5, 10, 10),
SkRect::MakeXYWH(2 * w, 0, w, h), nullptr);
// Add lines to separate zoom boxes
canvas->drawLine(w, 0, w, h, outline);