diff options
author | egdaniel <egdaniel@google.com> | 2016-07-26 08:26:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-26 08:26:46 -0700 |
commit | 26318c984ffd3ab69fecaa0ba193a3ab6f5c8750 (patch) | |
tree | 26b0b2a20c788dc1af7d553da9b651ad2a5d416a /gm | |
parent | efded51cd8122c1360717161d3455f2a48a37bc0 (diff) |
Update bleed-downscale GM to use power of 2 texture
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2179303004
Review-Url: https://codereview.chromium.org/2179303004
Diffstat (limited to 'gm')
-rw-r--r-- | gm/bleed.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gm/bleed.cpp b/gm/bleed.cpp index baef8850d6..daa9c16149 100644 --- a/gm/bleed.cpp +++ b/gm/bleed.cpp @@ -463,7 +463,9 @@ sk_sp<SkSurface> make_surface(SkCanvas* canvas, const SkImageInfo& info) { // is scaled down far enough. // static sk_sp<SkImage> make_image(SkCanvas* canvas, SkRect* srcR) { - const int N = 9 + 2 + 7 + 2 + 9; + // Intentially making the size a power of 2 to avoid the noise from how different GPUs will + // produce different mipmap filtering when we have an odd sized texture. + const int N = 10 + 2 + 8 + 2 + 10; SkImageInfo info = SkImageInfo::MakeN32Premul(N, N); auto surface = make_surface(canvas, info); SkCanvas* c = surface->getCanvas(); @@ -472,7 +474,7 @@ static sk_sp<SkImage> make_image(SkCanvas* canvas, SkRect* srcR) { paint.setColor(SK_ColorRED); c->drawRect(r, paint); - r.inset(4, 4); + r.inset(10, 10); paint.setColor(SK_ColorBLUE); c->drawRect(r, paint); |