diff options
author | Tom Hudson <tomhudson@google.com> | 2014-12-09 15:03:44 -0500 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-01-05 15:25:41 -0800 |
commit | 8dfaa4904205772cdceee63ef3989bcdedf1a914 (patch) | |
tree | baf5ea37427770659698766562bbd3b80f9eddf9 /include | |
parent | c82be5f27f1dd9da665b0ca52590cc30ede4e78a (diff) | |
download | frameworks_base-8dfaa4904205772cdceee63ef3989bcdedf1a914.zip frameworks_base-8dfaa4904205772cdceee63ef3989bcdedf1a914.tar.gz frameworks_base-8dfaa4904205772cdceee63ef3989bcdedf1a914.tar.bz2 |
Make DisplayListRenderer inherit from Canvas, merge JNI
Incrementally unify the upper layers for Skia and HWUI.
Remove redundant code from GLES20Canvas.java; instead
use inherited mNativeCanvasWrapper and superclass method
definitions.
Moves some unrelated SkPaint utility functions from Renderer
to new utils/PaintUtils.
bug: 15672762
Change-Id: I4ddd4214b8e9eeb95289d054ef423f2542bb5fa5
Diffstat (limited to 'include')
-rw-r--r-- | include/private/graphics/Canvas.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/private/graphics/Canvas.h b/include/private/graphics/Canvas.h index 2eda6a4..ae79907 100644 --- a/include/private/graphics/Canvas.h +++ b/include/private/graphics/Canvas.h @@ -131,15 +131,23 @@ public: const float* vertices, const int* colors, const SkPaint* paint) = 0; // Text - virtual void drawText(const uint16_t* text, const float* positions, int count, + /** + * drawText: count is of glyphs + * totalAdvance is ignored in software renderering, used by hardware renderer for + * text decorations (underlines, strikethroughs). + */ + virtual void drawText(const uint16_t* glyphs, const float* positions, int count, const SkPaint& paint, float x, float y, - float boundsLeft, float boundsTop, float boundsRight, float boundsBottom) = 0; + float boundsLeft, float boundsTop, float boundsRight, float boundsBottom, + float totalAdvance) = 0; + /** drawPosText: count is of UTF16 characters, posCount is floats (2 * glyphs) */ virtual void drawPosText(const uint16_t* text, const float* positions, int count, int posCount, const SkPaint& paint) = 0; + /** drawTextOnPath: count is of glyphs */ virtual void drawTextOnPath(const uint16_t* glyphs, int count, const SkPath& path, float hOffset, float vOffset, const SkPaint& paint) = 0; - /* + /** * Specifies if the positions passed to ::drawText are absolute or relative * to the (x,y) value provided. * |