diff options
author | Jason Sams <rjsams@android.com> | 2011-09-23 14:18:53 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2011-09-23 14:18:53 -0700 |
commit | 94aaed38467c71a6c804f0e18b41346a4013c25b (patch) | |
tree | b64c609a2afd305f81b3971a8e3811e5053bc2de /libs/rs | |
parent | e94d950d122005bb10e11dd18b6029d0108f2fbe (diff) | |
download | frameworks_base-94aaed38467c71a6c804f0e18b41346a4013c25b.zip frameworks_base-94aaed38467c71a6c804f0e18b41346a4013c25b.tar.gz frameworks_base-94aaed38467c71a6c804f0e18b41346a4013c25b.tar.bz2 |
Remove unused fields in ProgramRaster
Change-Id: I70c9d47674c956ec850c178c7aaa9a5e3dd9dffb
Diffstat (limited to 'libs/rs')
-rw-r--r-- | libs/rs/rs.spec | 3 | ||||
-rw-r--r-- | libs/rs/rsProgramRaster.cpp | 27 | ||||
-rw-r--r-- | libs/rs/rsProgramRaster.h | 9 |
3 files changed, 5 insertions, 34 deletions
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec index f277582..20b1f52 100644 --- a/libs/rs/rs.spec +++ b/libs/rs/rs.spec @@ -329,10 +329,7 @@ ProgramStoreCreate { ProgramRasterCreate { direct - param bool pointSmooth - param bool lineSmooth param bool pointSprite - param float lineWidth param RsCullMode cull ret RsProgramRaster } diff --git a/libs/rs/rsProgramRaster.cpp b/libs/rs/rsProgramRaster.cpp index 945b5ec..94bfe42 100644 --- a/libs/rs/rsProgramRaster.cpp +++ b/libs/rs/rsProgramRaster.cpp @@ -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); } @@ -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) { @@ -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(); @@ -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(); @@ -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(); } diff --git a/libs/rs/rsProgramRaster.h b/libs/rs/rsProgramRaster.h index 09d7d54..20af30a 100644 --- a/libs/rs/rsProgramRaster.h +++ b/libs/rs/rsProgramRaster.h @@ -33,19 +33,13 @@ public: static ProgramRaster *createFromStream(Context *rsc, IStream *stream); static ObjectBaseRef<ProgramRaster> getProgramRaster(Context *rsc, - bool pointSmooth, - bool lineSmooth, bool pointSprite, - float lineWidth, RsCullMode cull); struct Hal { mutable void *drv; struct State { - bool pointSmooth; - bool lineSmooth; bool pointSprite; - float lineWidth; RsCullMode cull; }; State state; @@ -58,10 +52,7 @@ protected: private: ProgramRaster(Context *rsc, - bool pointSmooth, - bool lineSmooth, bool pointSprite, - float lineWidth, RsCullMode cull); }; |