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
This commit is contained in:
Tom Hudson
2014-12-09 15:03:44 -05:00
committed by Chris Craik
parent c82be5f27f
commit 8dfaa49042
16 changed files with 406 additions and 1586 deletions

View File

@@ -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.
*