Loading graphics/java/android/renderscript/ProgramRaster.java +1 −6 Original line number Diff line number Diff line Loading @@ -84,14 +84,10 @@ public class ProgramRaster extends BaseObj { public static class Builder { RenderScript mRS; boolean mPointSprite; boolean mPointSmooth; boolean mLineSmooth; CullMode mCullMode; public Builder(RenderScript rs) { mRS = rs; mPointSmooth = false; mLineSmooth = false; mPointSprite = false; mCullMode = CullMode.BACK; } Loading @@ -108,8 +104,7 @@ public class ProgramRaster extends BaseObj { public ProgramRaster create() { mRS.validate(); int id = mRS.nProgramRasterCreate(mPointSmooth, mLineSmooth, mPointSprite, 1.f, mCullMode.mID); int id = mRS.nProgramRasterCreate(mPointSprite, mCullMode.mID); return new ProgramRaster(id, mRS); } } Loading graphics/java/android/renderscript/RenderScript.java +3 −6 Original line number Diff line number Diff line Loading @@ -522,13 +522,10 @@ public class RenderScript { dstMode, depthFunc); } native int rsnProgramRasterCreate(int con, boolean pointSmooth, boolean lineSmooth, boolean pointSprite, float lineWidth, int cullMode); synchronized int nProgramRasterCreate(boolean pointSmooth, boolean lineSmooth, boolean pointSprite, float lineWidth, int cullMode) { native int rsnProgramRasterCreate(int con, boolean pointSprite, int cullMode); synchronized int nProgramRasterCreate(boolean pointSprite, int cullMode) { validate(); return rsnProgramRasterCreate(mContext, pointSmooth, lineSmooth, pointSprite, lineWidth, cullMode); return rsnProgramRasterCreate(mContext, pointSprite, cullMode); } native void rsnProgramBindConstants(int con, int pv, int slot, int mID); Loading graphics/jni/android_renderscript_RenderScript.cpp +4 −6 Original line number Diff line number Diff line Loading @@ -1053,12 +1053,10 @@ nProgramVertexCreate(JNIEnv *_env, jobject _this, RsContext con, jstring shader, // --------------------------------------------------------------------------- static jint nProgramRasterCreate(JNIEnv *_env, jobject _this, RsContext con, jboolean pointSmooth, jboolean lineSmooth, jboolean pointSprite, jfloat lineWidth, jint cull) nProgramRasterCreate(JNIEnv *_env, jobject _this, RsContext con, jboolean pointSprite, jint cull) { LOG_API("nProgramRasterCreate, con(%p), pointSmooth(%i), lineSmooth(%i), pointSprite(%i)", con, pointSmooth, lineSmooth, pointSprite); return (jint)rsProgramRasterCreate(con, pointSmooth, lineSmooth, pointSprite, lineWidth, (RsCullMode)cull); LOG_API("nProgramRasterCreate, con(%p), pointSprite(%i), cull(%i)", con, pointSprite, cull); return (jint)rsProgramRasterCreate(con, pointSprite, (RsCullMode)cull); } Loading Loading @@ -1295,7 +1293,7 @@ static JNINativeMethod methods[] = { {"rsnProgramBindSampler", "(IIII)V", (void*)nProgramBindSampler }, {"rsnProgramFragmentCreate", "(ILjava/lang/String;[I)I", (void*)nProgramFragmentCreate }, {"rsnProgramRasterCreate", "(IZZZFI)I", (void*)nProgramRasterCreate }, {"rsnProgramRasterCreate", "(IZI)I", (void*)nProgramRasterCreate }, {"rsnProgramVertexCreate", "(ILjava/lang/String;[I)I", (void*)nProgramVertexCreate }, {"rsnContextBindRootScript", "(II)V", (void*)nContextBindRootScript }, Loading libs/rs/rs.spec +0 −3 Original line number Diff line number Diff line Loading @@ -329,10 +329,7 @@ ProgramStoreCreate { ProgramRasterCreate { direct param bool pointSmooth param bool lineSmooth param bool pointSprite param float lineWidth param RsCullMode cull ret RsProgramRaster } Loading libs/rs/rsProgramRaster.cpp +5 −22 Original line number Diff line number Diff line Loading @@ -21,19 +21,12 @@ using namespace android; using namespace android::renderscript; ProgramRaster::ProgramRaster(Context *rsc, bool pointSmooth, bool lineSmooth, bool pointSprite, float lineWidth, RsCullMode cull) ProgramRaster::ProgramRaster(Context *rsc, bool pointSprite, RsCullMode cull) : ProgramBase(rsc) { memset(&mHal, 0, sizeof(mHal)); mHal.state.pointSmooth = pointSmooth; mHal.state.lineSmooth = lineSmooth; mHal.state.pointSprite = pointSprite; mHal.state.lineWidth = lineWidth; mHal.state.cull = cull; rsc->mHal.funcs.raster.init(rsc, this); } Loading Loading @@ -74,8 +67,7 @@ ProgramRasterState::~ProgramRasterState() { } void ProgramRasterState::init(Context *rsc) { mDefault.set(ProgramRaster::getProgramRaster(rsc, false, false, false, 1.f, RS_CULL_BACK).get()); mDefault.set(ProgramRaster::getProgramRaster(rsc, false, RS_CULL_BACK).get()); } void ProgramRasterState::deinit(Context *rsc) { Loading @@ -84,19 +76,13 @@ void ProgramRasterState::deinit(Context *rsc) { } ObjectBaseRef<ProgramRaster> ProgramRaster::getProgramRaster(Context *rsc, bool pointSmooth, bool lineSmooth, bool pointSprite, float lineWidth, RsCullMode cull) { ObjectBaseRef<ProgramRaster> returnRef; ObjectBase::asyncLock(); for (uint32_t ct = 0; ct < rsc->mStateRaster.mRasterPrograms.size(); ct++) { ProgramRaster *existing = rsc->mStateRaster.mRasterPrograms[ct]; if (existing->mHal.state.pointSmooth != pointSmooth) continue; if (existing->mHal.state.lineSmooth != lineSmooth) continue; if (existing->mHal.state.pointSprite != pointSprite) continue; if (existing->mHal.state.lineWidth != lineWidth) continue; if (existing->mHal.state.cull != cull) continue; returnRef.set(existing); ObjectBase::asyncUnlock(); Loading @@ -104,8 +90,7 @@ ObjectBaseRef<ProgramRaster> ProgramRaster::getProgramRaster(Context *rsc, } ObjectBase::asyncUnlock(); ProgramRaster *pr = new ProgramRaster(rsc, pointSmooth, lineSmooth, pointSprite, lineWidth, cull); ProgramRaster *pr = new ProgramRaster(rsc, pointSprite, cull); returnRef.set(pr); ObjectBase::asyncLock(); Loading @@ -118,10 +103,8 @@ ObjectBaseRef<ProgramRaster> ProgramRaster::getProgramRaster(Context *rsc, namespace android { namespace renderscript { RsProgramRaster rsi_ProgramRasterCreate(Context * rsc, bool pointSmooth, bool lineSmooth, bool pointSprite, float lineWidth, RsCullMode cull) { ObjectBaseRef<ProgramRaster> pr = ProgramRaster::getProgramRaster(rsc, pointSmooth, lineSmooth, pointSprite, lineWidth, cull); RsProgramRaster rsi_ProgramRasterCreate(Context * rsc, bool pointSprite, RsCullMode cull) { ObjectBaseRef<ProgramRaster> pr = ProgramRaster::getProgramRaster(rsc, pointSprite, cull); pr->incUserRef(); return pr.get(); } Loading Loading
graphics/java/android/renderscript/ProgramRaster.java +1 −6 Original line number Diff line number Diff line Loading @@ -84,14 +84,10 @@ public class ProgramRaster extends BaseObj { public static class Builder { RenderScript mRS; boolean mPointSprite; boolean mPointSmooth; boolean mLineSmooth; CullMode mCullMode; public Builder(RenderScript rs) { mRS = rs; mPointSmooth = false; mLineSmooth = false; mPointSprite = false; mCullMode = CullMode.BACK; } Loading @@ -108,8 +104,7 @@ public class ProgramRaster extends BaseObj { public ProgramRaster create() { mRS.validate(); int id = mRS.nProgramRasterCreate(mPointSmooth, mLineSmooth, mPointSprite, 1.f, mCullMode.mID); int id = mRS.nProgramRasterCreate(mPointSprite, mCullMode.mID); return new ProgramRaster(id, mRS); } } Loading
graphics/java/android/renderscript/RenderScript.java +3 −6 Original line number Diff line number Diff line Loading @@ -522,13 +522,10 @@ public class RenderScript { dstMode, depthFunc); } native int rsnProgramRasterCreate(int con, boolean pointSmooth, boolean lineSmooth, boolean pointSprite, float lineWidth, int cullMode); synchronized int nProgramRasterCreate(boolean pointSmooth, boolean lineSmooth, boolean pointSprite, float lineWidth, int cullMode) { native int rsnProgramRasterCreate(int con, boolean pointSprite, int cullMode); synchronized int nProgramRasterCreate(boolean pointSprite, int cullMode) { validate(); return rsnProgramRasterCreate(mContext, pointSmooth, lineSmooth, pointSprite, lineWidth, cullMode); return rsnProgramRasterCreate(mContext, pointSprite, cullMode); } native void rsnProgramBindConstants(int con, int pv, int slot, int mID); Loading
graphics/jni/android_renderscript_RenderScript.cpp +4 −6 Original line number Diff line number Diff line Loading @@ -1053,12 +1053,10 @@ nProgramVertexCreate(JNIEnv *_env, jobject _this, RsContext con, jstring shader, // --------------------------------------------------------------------------- static jint nProgramRasterCreate(JNIEnv *_env, jobject _this, RsContext con, jboolean pointSmooth, jboolean lineSmooth, jboolean pointSprite, jfloat lineWidth, jint cull) nProgramRasterCreate(JNIEnv *_env, jobject _this, RsContext con, jboolean pointSprite, jint cull) { LOG_API("nProgramRasterCreate, con(%p), pointSmooth(%i), lineSmooth(%i), pointSprite(%i)", con, pointSmooth, lineSmooth, pointSprite); return (jint)rsProgramRasterCreate(con, pointSmooth, lineSmooth, pointSprite, lineWidth, (RsCullMode)cull); LOG_API("nProgramRasterCreate, con(%p), pointSprite(%i), cull(%i)", con, pointSprite, cull); return (jint)rsProgramRasterCreate(con, pointSprite, (RsCullMode)cull); } Loading Loading @@ -1295,7 +1293,7 @@ static JNINativeMethod methods[] = { {"rsnProgramBindSampler", "(IIII)V", (void*)nProgramBindSampler }, {"rsnProgramFragmentCreate", "(ILjava/lang/String;[I)I", (void*)nProgramFragmentCreate }, {"rsnProgramRasterCreate", "(IZZZFI)I", (void*)nProgramRasterCreate }, {"rsnProgramRasterCreate", "(IZI)I", (void*)nProgramRasterCreate }, {"rsnProgramVertexCreate", "(ILjava/lang/String;[I)I", (void*)nProgramVertexCreate }, {"rsnContextBindRootScript", "(II)V", (void*)nContextBindRootScript }, Loading
libs/rs/rs.spec +0 −3 Original line number Diff line number Diff line Loading @@ -329,10 +329,7 @@ ProgramStoreCreate { ProgramRasterCreate { direct param bool pointSmooth param bool lineSmooth param bool pointSprite param float lineWidth param RsCullMode cull ret RsProgramRaster } Loading
libs/rs/rsProgramRaster.cpp +5 −22 Original line number Diff line number Diff line Loading @@ -21,19 +21,12 @@ using namespace android; using namespace android::renderscript; ProgramRaster::ProgramRaster(Context *rsc, bool pointSmooth, bool lineSmooth, bool pointSprite, float lineWidth, RsCullMode cull) ProgramRaster::ProgramRaster(Context *rsc, bool pointSprite, RsCullMode cull) : ProgramBase(rsc) { memset(&mHal, 0, sizeof(mHal)); mHal.state.pointSmooth = pointSmooth; mHal.state.lineSmooth = lineSmooth; mHal.state.pointSprite = pointSprite; mHal.state.lineWidth = lineWidth; mHal.state.cull = cull; rsc->mHal.funcs.raster.init(rsc, this); } Loading Loading @@ -74,8 +67,7 @@ ProgramRasterState::~ProgramRasterState() { } void ProgramRasterState::init(Context *rsc) { mDefault.set(ProgramRaster::getProgramRaster(rsc, false, false, false, 1.f, RS_CULL_BACK).get()); mDefault.set(ProgramRaster::getProgramRaster(rsc, false, RS_CULL_BACK).get()); } void ProgramRasterState::deinit(Context *rsc) { Loading @@ -84,19 +76,13 @@ void ProgramRasterState::deinit(Context *rsc) { } ObjectBaseRef<ProgramRaster> ProgramRaster::getProgramRaster(Context *rsc, bool pointSmooth, bool lineSmooth, bool pointSprite, float lineWidth, RsCullMode cull) { ObjectBaseRef<ProgramRaster> returnRef; ObjectBase::asyncLock(); for (uint32_t ct = 0; ct < rsc->mStateRaster.mRasterPrograms.size(); ct++) { ProgramRaster *existing = rsc->mStateRaster.mRasterPrograms[ct]; if (existing->mHal.state.pointSmooth != pointSmooth) continue; if (existing->mHal.state.lineSmooth != lineSmooth) continue; if (existing->mHal.state.pointSprite != pointSprite) continue; if (existing->mHal.state.lineWidth != lineWidth) continue; if (existing->mHal.state.cull != cull) continue; returnRef.set(existing); ObjectBase::asyncUnlock(); Loading @@ -104,8 +90,7 @@ ObjectBaseRef<ProgramRaster> ProgramRaster::getProgramRaster(Context *rsc, } ObjectBase::asyncUnlock(); ProgramRaster *pr = new ProgramRaster(rsc, pointSmooth, lineSmooth, pointSprite, lineWidth, cull); ProgramRaster *pr = new ProgramRaster(rsc, pointSprite, cull); returnRef.set(pr); ObjectBase::asyncLock(); Loading @@ -118,10 +103,8 @@ ObjectBaseRef<ProgramRaster> ProgramRaster::getProgramRaster(Context *rsc, namespace android { namespace renderscript { RsProgramRaster rsi_ProgramRasterCreate(Context * rsc, bool pointSmooth, bool lineSmooth, bool pointSprite, float lineWidth, RsCullMode cull) { ObjectBaseRef<ProgramRaster> pr = ProgramRaster::getProgramRaster(rsc, pointSmooth, lineSmooth, pointSprite, lineWidth, cull); RsProgramRaster rsi_ProgramRasterCreate(Context * rsc, bool pointSprite, RsCullMode cull) { ObjectBaseRef<ProgramRaster> pr = ProgramRaster::getProgramRaster(rsc, pointSprite, cull); pr->incUserRef(); return pr.get(); } Loading