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

Unified Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 690053002: Cleanup conversion that the new NDK compiler tries to over optimize. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | « src/gpu/GrDistanceFieldTextContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDistanceFieldTextContext.cpp
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
index 155f6365997bb22228dff710dc45ae22dabee28a..5e23ba0683e1bbb7b99caa99f42add7eb0f38f4c 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -316,9 +316,7 @@ void GrDistanceFieldTextContext::onDrawPosText(const GrPaint& paint, const SkPai
if (!this->appendGlyph(GrGlyph::Pack(glyph.getGlyphID(),
glyph.getSubXFixed(),
glyph.getSubYFixed()),
- SkScalarToFixed(x),
- SkScalarToFixed(y),
- fontScaler)) {
+ x, y, fontScaler)) {
// couldn't append, send to fallback
fallbackTxt.push_back_n(text-lastText, lastText);
fallbackPos.push_back(pos[0]);
@@ -347,9 +345,7 @@ void GrDistanceFieldTextContext::onDrawPosText(const GrPaint& paint, const SkPai
if (!this->appendGlyph(GrGlyph::Pack(glyph.getGlyphID(),
glyph.getSubXFixed(),
glyph.getSubYFixed()),
- SkScalarToFixed(x - advanceX),
- SkScalarToFixed(y - advanceY),
- fontScaler)) {
+ x - advanceX, y - advanceY, fontScaler)) {
// couldn't append, send to fallback
fallbackTxt.push_back_n(text-lastText, lastText);
fallbackPos.push_back(pos[0]);
@@ -452,7 +448,7 @@ void GrDistanceFieldTextContext::setupCoverageEffect(const SkColor& filteredColo
// Returns true if this method handled the glyph, false if needs to be passed to fallback
//
bool GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed,
- SkFixed vx, SkFixed vy,
+ SkScalar sx, SkScalar sy,
GrFontScaler* scaler) {
if (NULL == fDrawTarget) {
return true;
@@ -472,8 +468,6 @@ bool GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed,
return false;
}
- SkScalar sx = SkFixedToScalar(vx);
- SkScalar sy = SkFixedToScalar(vy);
/*
// not valid, need to find a different solution for this
vx += SkIntToFixed(glyph->fBounds.fLeft);
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698