Update showmiplevel gm to round coords the same for both variations of the GM
The versions of showmiplevel that take both a width and height, round the coords of draws to integers. The basic version did not do this which caused sampling bugs on adreno when using nearest neighbor at half pixel coords. Since this GM isn't testing the GPU rendering of the mips, this workaround is okay. Bug: skia:5905 Change-Id: I4080532e8c1f37d74c60089970c5d0fc83cd5373 Reviewed-on: https://skia-review.googlesource.com/18939 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
b53f48cfec
commit
7785dd235d
@ -201,7 +201,10 @@ protected:
|
||||
canvas->translate(4, 4);
|
||||
for (const auto& bm : fBM) {
|
||||
this->drawSet(canvas, bm);
|
||||
canvas->translate(0, bm.height() * 0.85f);
|
||||
// round so we always produce an integral translate, so the GOLD tool won't show
|
||||
// unimportant diffs if this is drawn on a GPU with different rounding rules
|
||||
// since we draw the bitmaps using nearest-neighbor
|
||||
canvas->translate(0, SkScalarRoundToScalar(bm.height() * 0.85f));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user