Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3978)

Unified Diff: gm/bleed.cpp

Issue 2179303004: Update bleed-downscale GM to use power of 2 texture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bleed.cpp
diff --git a/gm/bleed.cpp b/gm/bleed.cpp
index baef8850d6d396109433f5bc018f1b6e43c11749..daa9c1614944e2e91e8fefb363df10f3e17d10a5 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698