diff options
Diffstat (limited to 'gm/showmiplevels.cpp')
-rw-r--r-- | gm/showmiplevels.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gm/showmiplevels.cpp b/gm/showmiplevels.cpp index 3e2091fd6b..57df948536 100644 --- a/gm/showmiplevels.cpp +++ b/gm/showmiplevels.cpp @@ -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)); } } |