diff options
author | 2013-11-13 15:22:15 +0000 | |
---|---|---|
committer | 2013-11-13 15:22:15 +0000 | |
commit | 5308c83a366f965c308862bed1b6acf594af3df9 (patch) | |
tree | b6b8947d87792731d7abb96422bdcbe11ccdc635 /src/core | |
parent | b5d887eebc39977ea1d69c6fa3053f386e03b764 (diff) |
drawPosTextOnPath is now deprecated, removing all overrides and impls
BUG=
R=djsollen@google.com
Review URL: https://codereview.chromium.org/61743017
git-svn-id: http://skia.googlecode.com/svn/trunk@12270 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkBitmapDevice.cpp | 8 | ||||
-rw-r--r-- | src/core/SkCanvas.cpp | 17 | ||||
-rw-r--r-- | src/core/SkDraw.cpp | 63 |
3 files changed, 0 insertions, 88 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index 637048742a..7731a920dc 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -366,14 +366,6 @@ void SkBitmapDevice::drawTextOnPath(const SkDraw& draw, const void* text, draw.drawTextOnPath((const char*)text, len, path, matrix, paint); } -#ifdef SK_BUILD_FOR_ANDROID -void SkBitmapDevice::drawPosTextOnPath(const SkDraw& draw, const void* text, size_t len, - const SkPoint pos[], const SkPaint& paint, - const SkPath& path, const SkMatrix* matrix) { - draw.drawPosTextOnPath((const char*)text, len, pos, paint, path, matrix); -} -#endif - void SkBitmapDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode, int vertexCount, const SkPoint verts[], const SkPoint textures[], diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 32a6e09ba8..2efea724da 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -2030,23 +2030,6 @@ void SkCanvas::drawTextOnPath(const void* text, size_t byteLength, LOOPER_END } -#ifdef SK_BUILD_FOR_ANDROID -void SkCanvas::drawPosTextOnPath(const void* text, size_t byteLength, - const SkPoint pos[], const SkPaint& paint, - const SkPath& path, const SkMatrix* matrix) { - CHECK_SHADER_NOSETCONTEXT(paint); - - LOOPER_BEGIN(paint, SkDrawFilter::kText_Type) - - while (iter.next()) { - iter.fDevice->drawPosTextOnPath(iter, text, byteLength, pos, - looper.paint(), path, matrix); - } - - LOOPER_END -} -#endif - void SkCanvas::drawVertices(VertexMode vmode, int vertexCount, const SkPoint verts[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index afbb288909..112451920f 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 { |