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

Unified Diff: src/core/SkDraw.cpp

Issue 61743017: drawPosTextOnPath is now deprecated, removing all overrides and impls (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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/core/SkCanvas.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index afbb28890910b4ad1a30c57d76b4137bd326d66a..112451920f2bdf0a7e6f21198fded5a2d4832347 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -2279,69 +2279,6 @@ void SkDraw::drawTextOnPath(const char text[], size_t byteLength,
}
}
-#ifdef SK_BUILD_FOR_ANDROID
-void SkDraw::drawPosTextOnPath(const char text[], size_t byteLength,
- const SkPoint pos[], const SkPaint& paint,
- const SkPath& path, const SkMatrix* matrix) const {
- // nothing to draw
- if (text == NULL || byteLength == 0 || fRC->isEmpty()) {
- return;
- }
-
- SkMatrix scaledMatrix;
- SkPathMeasure meas(path, false);
-
- SkMeasureCacheProc glyphCacheProc = paint.getMeasureCacheProc(
- SkPaint::kForward_TextBufferDirection, true);
-
- // Copied (modified) from SkTextToPathIter constructor to setup paint
- SkPaint tempPaint(paint);
-
- tempPaint.setLinearText(true);
- tempPaint.setMaskFilter(NULL); // don't want this affecting our path-cache lookup
-
- if (tempPaint.getPathEffect() == NULL && !(tempPaint.getStrokeWidth() > 0
- && tempPaint.getStyle() != SkPaint::kFill_Style)) {
- tempPaint.setStyle(SkPaint::kFill_Style);
- tempPaint.setPathEffect(NULL);
- }
- // End copied from SkTextToPathIter constructor
-
- // detach cache
- SkGlyphCache* cache = tempPaint.detachCache(NULL, NULL);
-
- // Must set scale, even if 1
- SkScalar scale = SK_Scalar1;
- scaledMatrix.setScale(scale, scale);
-
- // Loop over all glyph ids
- for (const char* stop = text + byteLength; text < stop; pos++) {
-
- const SkGlyph& glyph = glyphCacheProc(cache, &text);
- SkPath tmp;
-
- const SkPath* glyphPath = cache->findPath(glyph);
- if (glyphPath == NULL) {
- continue;
- }
-
- SkMatrix m(scaledMatrix);
- m.postTranslate(pos->fX, 0);
-
- if (matrix) {
- m.postConcat(*matrix);
- }
-
- morphpath(&tmp, *glyphPath, meas, m);
- this->drawPath(tmp, tempPaint);
-
- }
-
- // re-attach cache
- SkGlyphCache::AttachCache(cache);
-}
-#endif
-
///////////////////////////////////////////////////////////////////////////////
struct VertState {
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698