Chromium Code Reviews| Index: src/core/SkRemote.cpp |
| diff --git a/src/core/SkRemote.cpp b/src/core/SkRemote.cpp |
| index ae14a47d187b4b28d2b1acfd8913d57638de60ef..7b77ee656a90529770aef91e0b6d37df9ef0abd4 100644 |
| --- a/src/core/SkRemote.cpp |
| +++ b/src/core/SkRemote.cpp |
| @@ -207,6 +207,31 @@ namespace SkRemote { |
| } |
| } |
|
mtklein
2015/10/17 12:57:45
//Text-as-paths is a temporary hack.
//TODO: send
hal.canary
2015/10/17 22:37:08
Done.
|
| + void Client::onDrawText(const void* text, size_t byteLength, SkScalar x, |
| + SkScalar y, const SkPaint& paint) { |
| + SkPath path; |
| + paint.getTextPath(text, byteLength, x, y, &path); |
| + this->onDrawPath(path, paint); |
| + } |
| + |
| + void Client::onDrawPosText(const void* text, size_t byteLength, |
| + const SkPoint pos[], const SkPaint& paint) { |
| + SkPath path; |
| + paint.getPosTextPath(text, byteLength, pos, &path); |
| + this->onDrawPath(path, paint); |
| + } |
| + |
| + void Client::onDrawPosTextH(const void* text, size_t byteLength, |
| + const SkScalar xpos[], SkScalar constY, |
| + const SkPaint& paint) { |
| + size_t length = paint.countText(text, byteLength); |
| + SkAutoTArray<SkPoint> pos(length); |
| + for(size_t i = 0; i < length; ++i) { |
| + pos[i].set(xpos[i], constY); |
| + } |
| + this->onDrawPosText(text, byteLength, &pos[0], paint); |
| + } |
| + |
| void Client::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle) { |
| SkPath path; |
| path.addRect(rect); |