Remove drawPosText support for SkBitmapDevice
Change-Id: I84885c3c12bc9ee7b048846c762bf928682e0952
Reviewed-on: https://skia-review.googlesource.com/150362
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index b1ea02c..a118b08 100644
--- a/src/core/SkBitmapDevice.cpp
+++ b/src/core/SkBitmapDevice.cpp
@@ -570,13 +570,6 @@
BDDraw(this).drawSprite(bitmap, x, y, paint);
}
-void SkBitmapDevice::drawPosText(const void* text, size_t len, const SkScalar xpos[],
- int scalarsPerPos, const SkPoint& offset, const SkPaint& paint) {
- SkBitmapDeviceFilteredSurfaceProps props(fBitmap, paint, fSurfaceProps);
- LOOP_TILER( drawPosText((const char*)text, len, xpos, scalarsPerPos, offset, paint, &props()),
- nullptr)
-}
-
void SkBitmapDevice::drawGlyphRunList(const SkGlyphRunList& glyphRunList) {
#if defined(SK_SUPPORT_LEGACY_TEXT_BLOB)
auto blob = glyphRunList.blob();
diff --git a/src/core/SkBitmapDevice.h b/src/core/SkBitmapDevice.h
index 71e2820..986fd80 100644
--- a/src/core/SkBitmapDevice.h
+++ b/src/core/SkBitmapDevice.h
@@ -142,7 +142,6 @@
friend class SkDraw;
friend class SkDrawIter;
friend class SkDrawTiler;
- friend class SkDeviceFilteredPaint;
friend class SkSurface_Raster;
class BDDraw;
@@ -152,7 +151,7 @@
* Decorations (underline and stike-thru) will be handled by SkCanvas.
*/
void drawPosText(const void* text, size_t len, const SkScalar pos[],
- int scalarsPerPos, const SkPoint& offset, const SkPaint& paint) override;
+ int scalarsPerPos, const SkPoint& offset, const SkPaint& paint) override {}
// used to change the backend's pixels (and possibly config/rowbytes)
// but cannot change the width/height, so there should be no change to
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 0a7b127..37a1662 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -1527,37 +1527,6 @@
}
}
-void SkDraw::drawPosText(const char text[], size_t byteLength, const SkScalar pos[],
- int scalarsPerPosition, const SkPoint& offset, const SkPaint& paint,
- const SkSurfaceProps* props) const {
- SkASSERT(byteLength == 0 || text != nullptr);
- SkASSERT(1 == scalarsPerPosition || 2 == scalarsPerPosition);
-
- SkDEBUGCODE(this->validate();)
-
- // nothing to draw
- if (text == nullptr || byteLength == 0 || fRC->isEmpty()) {
- return;
- }
-
- if (ShouldDrawTextAsPaths(paint, *fMatrix)) {
- this->drawPosText_asPaths(text, byteLength, pos, scalarsPerPosition, offset, paint, props);
- return;
- }
-
- auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
- paint, props, this->scalerContextFlags(), fMatrix);
-
- // The Blitter Choose needs to be live while using the blitter below.
- SkAutoBlitterChoose blitterChooser(*this, nullptr, paint);
- SkAAClipBlitterWrapper wrapper(*fRC, blitterChooser.get());
- DrawOneGlyph drawOneGlyph(*this, paint, cache.get(), wrapper.getBlitter());
-
- SkFindAndPlaceGlyph::ProcessPosText(
- paint.getTextEncoding(), text, byteLength,
- offset, *fMatrix, pos, scalarsPerPosition, cache.get(), drawOneGlyph);
-}
-
void SkDraw::blitARGB32Mask(const SkMask& mask, const SkPaint& paint) const {
SkASSERT(SkMask::kARGB32_Format == mask.fFormat);
SkBitmap bm;
diff --git a/src/core/SkDraw.h b/src/core/SkDraw.h
index b73de09..9d21425 100644
--- a/src/core/SkDraw.h
+++ b/src/core/SkDraw.h
@@ -64,9 +64,6 @@
void drawBitmap(const SkBitmap&, const SkMatrix&, const SkRect* dstOrNull,
const SkPaint&) const;
void drawSprite(const SkBitmap&, int x, int y, const SkPaint&) const;
- void drawPosText(const char text[], size_t byteLength,
- const SkScalar pos[], int scalarsPerPosition,
- const SkPoint& offset, const SkPaint&, const SkSurfaceProps*) const;
void drawGlyphRunList(const SkGlyphRunList& glyphRunList,
SkGlyphRunListPainter* glyphPainter) const;
void drawVertices(SkVertices::VertexMode mode, int vertexCount,