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

Unified Diff: src/gpu/GrAtlasTextContext.cpp

Issue 1131023006: fix for blur large glyphs problems (Closed) Base URL: https://skia.googlesource.com/skia.git@textpopping
Patch Set: Created 5 years, 7 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 | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.cpp
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index 9b863f806c4da5b12cda6a6925c01763fe7d6388..11866b3b8a56dcc52d12b3dfb27d6b4cbeb0fc03 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -2147,13 +2147,24 @@ inline void GrAtlasTextContext::flushBigGlyphs(BitmapTextBlob* cacheBlob, GrRend
const SkPaint& skPaint,
SkScalar transX, SkScalar transY,
const SkIRect& clipBounds) {
+ if (!cacheBlob->fBigGlyphs.count()) {
+ return;
+ }
+
+ SkMatrix pathMatrix;
+ if (!cacheBlob->fViewMatrix.invert(&pathMatrix)) {
+ SkDebugf("could not invert viewmatrix\n");
+ return;
+ }
+
for (int i = 0; i < cacheBlob->fBigGlyphs.count(); i++) {
BitmapTextBlob::BigGlyph& bigGlyph = cacheBlob->fBigGlyphs[i];
bigGlyph.fVx += transX;
bigGlyph.fVy += transY;
- SkMatrix translate;
- translate.setTranslate(bigGlyph.fVx, bigGlyph.fVy);
- fGpuDevice->internalDrawPath(bigGlyph.fPath, skPaint, SkMatrix::I(), &translate, clipBounds,
+ SkMatrix translate = cacheBlob->fViewMatrix;
+ translate.postTranslate(bigGlyph.fVx, bigGlyph.fVy);
+
+ fGpuDevice->internalDrawPath(bigGlyph.fPath, skPaint, translate, &pathMatrix, clipBounds,
false);
}
}
« no previous file with comments | « no previous file | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698