diff options
author | Joe Onorato <joeo@google.com> | 2010-01-20 14:35:52 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-01-20 14:35:52 -0800 |
commit | af07b591bbb39df30f6018c5a64791552a06ed00 (patch) | |
tree | 5478d2d8470a956360a0d8514ff3a3370f519ec8 | |
parent | 8be346429c18929d4c429b81a4b6fff9dce661b0 (diff) | |
parent | b3699b14be3a3db1d75ea4c38853b0a53d14b1be (diff) | |
download | frameworks_base-af07b591bbb39df30f6018c5a64791552a06ed00.zip frameworks_base-af07b591bbb39df30f6018c5a64791552a06ed00.tar.gz frameworks_base-af07b591bbb39df30f6018c5a64791552a06ed00.tar.bz2 |
am b3699b14: am 836e1666: Merge "add drawSpriteScreenspaceCropped to renderscript" into eclair
Merge commit 'b3699b14be3a3db1d75ea4c38853b0a53d14b1be'
* commit 'b3699b14be3a3db1d75ea4c38853b0a53d14b1be':
add drawSpriteScreenspaceCropped to renderscript
-rw-r--r-- | libs/rs/Android.mk | 4 | ||||
-rw-r--r-- | libs/rs/rsScriptC_Lib.cpp | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/libs/rs/Android.mk b/libs/rs/Android.mk index 3080ab0..88521f6 100644 --- a/libs/rs/Android.mk +++ b/libs/rs/Android.mk @@ -110,9 +110,5 @@ LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) -# Include the subdirectories ==================== -include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk,\ - java \ - )) endif #simulator diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp index 3ba9cee..eeb9468 100644 --- a/libs/rs/rsScriptC_Lib.cpp +++ b/libs/rs/rsScriptC_Lib.cpp @@ -778,6 +778,17 @@ static void SC_drawSpriteScreenspace(float x, float y, float z, float w, float h rsc->setVertex((ProgramVertex *)tmp.get()); } +static void SC_drawSpriteScreenspaceCropped(float x, float y, float z, float w, float h, + float cx0, float cy0, float cx1, float cy1) +{ + GET_TLS(); + rsc->setupCheck(); + + GLint crop[4] = {cx0, cy0, cx1, cy1}; + glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); + glDrawTexfOES(x, y, z, w, h); +} + static void SC_drawSprite(float x, float y, float z, float w, float h) { GET_TLS(); @@ -1289,6 +1300,8 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = { "void", "(float x, float y, float z, float w, float h)" }, { "drawSpriteScreenspace", (void *)&SC_drawSpriteScreenspace, "void", "(float x, float y, float z, float w, float h)" }, + { "drawSpriteScreenspaceCropped", (void *)&SC_drawSpriteScreenspaceCropped, + "void", "(float x, float y, float z, float w, float h, float cx0, float cy0, float cx1, float cy1)" }, { "drawLine", (void *)&SC_drawLine, "void", "(float x1, float y1, float z1, float x2, float y2, float z2)" }, { "drawPoint", (void *)&SC_drawPoint, |