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,9 +78,12 @@ static void draw_diff(SkCanvas* canvas, SkImage* imgA, SkImage* imgB) {
canvas->drawBitmap(highlight, 0, 0); canvas->drawBitmap(highlight, 0, 0);
// Draw zoom of largest pixel diff // Draw zoom of largest pixel diff
canvas->drawImageRect(imgA, SkRect::MakeXYWH(maxDiffX - 5, maxDiffY - 5, 10, 10), 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); SkRect::MakeXYWH(w, 0, w, h), nullptr);
canvas->drawImageRect(imgB, SkRect::MakeXYWH(maxDiffX - 5, maxDiffY - 5, 10, 10), canvas->drawBitmapRect(bmpB, SkRect::MakeXYWH(maxDiffX - 5, maxDiffY - 5, 10, 10),
SkRect::MakeXYWH(2 * w, 0, w, h), nullptr); SkRect::MakeXYWH(2 * w, 0, w, h), nullptr);
// Add lines to separate zoom boxes // Add lines to separate zoom boxes