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

Unified Diff: src/core/SkPictureShader.cpp

Issue 884163003: Disable LCD text when rasterizing SkPictureShader tiles. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: review comments Created 5 years, 11 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 | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureShader.cpp
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp
index 36b55cae6666053357ac73dd0d6f0c85727476d8..adf2bb63a8bbdffe7c7e5a95f61c3088f66b20e4 100644
--- a/src/core/SkPictureShader.cpp
+++ b/src/core/SkPictureShader.cpp
@@ -194,7 +194,9 @@ SkShader* SkPictureShader::refBitmapShader(const SkMatrix& matrix, const SkMatri
}
bm.eraseColor(SK_ColorTRANSPARENT);
- SkCanvas canvas(bm);
+ // Always disable LCD text, since we can't assume our image will be opaque.
+ SkCanvas canvas(bm, SkSurfaceProps(0, kUnknown_SkPixelGeometry));
+
canvas.scale(tileScale.width(), tileScale.height());
canvas.translate(-fTile.x(), -fTile.y());
canvas.drawPicture(fPicture);
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698