diff options
| author | Alex Sakhartchouk <alexst@google.com> | 2010-06-24 17:15:34 -0700 |
|---|---|---|
| committer | Alex Sakhartchouk <alexst@google.com> | 2010-06-24 17:15:34 -0700 |
| commit | 9b949fce39f0f39ce9275b71d7c347210775e7a8 (patch) | |
| tree | 76b739126b5b3f10e8fd0bc63071dd22a105e227 /libs/rs/rsScriptC_LibGL.cpp | |
| parent | 8f31bd6b68c796d4a4176721a6e13bfdba2166e0 (diff) | |
| download | frameworks_base-9b949fce39f0f39ce9275b71d7c347210775e7a8.zip frameworks_base-9b949fce39f0f39ce9275b71d7c347210775e7a8.tar.gz frameworks_base-9b949fce39f0f39ce9275b71d7c347210775e7a8.tar.bz2 | |
Adding freetype font rendering to renderscript.
Change-Id: I3a10ffe27092a41df156341c9cb3f7aa19c49f19
Diffstat (limited to 'libs/rs/rsScriptC_LibGL.cpp')
| -rw-r--r-- | libs/rs/rsScriptC_LibGL.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libs/rs/rsScriptC_LibGL.cpp b/libs/rs/rsScriptC_LibGL.cpp index 052e144..dbd398e 100644 --- a/libs/rs/rsScriptC_LibGL.cpp +++ b/libs/rs/rsScriptC_LibGL.cpp @@ -309,6 +309,24 @@ static uint32_t SC_getHeight() return rsc->getHeight(); } +static void SC_DrawTextAlloc(RsAllocation va, int x, int y) +{ + GET_TLS(); + Allocation *alloc = static_cast<Allocation *>(va); + rsc->mStateFont.renderText(alloc, x, y); +} + +static void SC_DrawText(const char *text, int x, int y) +{ + GET_TLS(); + rsc->mStateFont.renderText(text, x, y); +} + +static void SC_BindFont(RsFont font) +{ + GET_TLS(); + rsi_ContextBindFont(rsc, font); +} ////////////////////////////////////////////////////////////////////////////// // Class implementation @@ -360,6 +378,11 @@ static ScriptCState::SymbolTable_t gSyms[] = { { "rsgClearColor", (void *)&SC_ClearColor }, { "rsgClearDepth", (void *)&SC_ClearDepth }, + { "_Z11rsgDrawTextPKcii", (void *)&SC_DrawText }, + { "_Z11rsgDrawText13rs_allocationii", (void *)&SC_DrawTextAlloc }, + + { "rsgBindFont", (void *)&SC_BindFont }, + ////////////////////////////////////// // IO |
