diff options
author | Stan Iliev <stani@google.com> | 2017-03-30 18:22:27 -0400 |
---|---|---|
committer | Stan Iliev <stani@google.com> | 2017-04-04 15:43:12 -0400 |
commit | 0b58d9928309e2c64c7cafad287e55a8151ab19a (patch) | |
tree | 9b698e70c4dda4dcdf0c1aabe03deae6774363d3 /libs/hwui/RecordingCanvas.h | |
parent | 7ead6c4da9e73a485965070903277dae90210c2d (diff) |
Optimize Canvas::drawGlyphs
Avoid one memcpy in Canvas::drawGlyphs for all pipelines.
Test: CTS passed with exception of SweepTests#testBasicDraws
shadowtext, which fails with and without this CL.
Change-Id: I0841232dc7a6173eb3b03f939dbde15a84186296
Diffstat (limited to 'libs/hwui/RecordingCanvas.h')
-rw-r--r-- | libs/hwui/RecordingCanvas.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/hwui/RecordingCanvas.h b/libs/hwui/RecordingCanvas.h index 44181bd22397..682f244659e4 100644 --- a/libs/hwui/RecordingCanvas.h +++ b/libs/hwui/RecordingCanvas.h @@ -191,9 +191,8 @@ public: virtual bool drawTextAbsolutePos() const override { return false; } protected: - virtual void drawGlyphs(const uint16_t* text, const float* positions, int count, - const SkPaint& paint, float x, float y, - float boundsLeft, float boundsTop, float boundsRight, float boundsBottom, + virtual void drawGlyphs(ReadGlyphFunc glyphFunc, int count, const SkPaint& paint, float x, + float y, float boundsLeft, float boundsTop, float boundsRight, float boundsBottom, float totalAdvance) override; virtual void drawLayoutOnPath(const minikin::Layout& layout, float hOffset, float vOffset, const SkPaint& paint, const SkPath& path, size_t start, size_t end) override; |