diff options
| author | 2010-02-12 11:27:01 -0800 | |
|---|---|---|
| committer | 2010-02-12 11:27:01 -0800 | |
| commit | 79b646ffe51c532f00b69dc4967ee51ca28986cf (patch) | |
| tree | 64dc779a8ee4d21f322499bbefa11e5972741be3 /libs/rs/rsProgramRaster.cpp | |
| parent | 1e90ab542d675616e9370ab7e5add99d7af12587 (diff) | |
| parent | 0b9bbb6dc5d7dabecf23e8c6bb4a267ba8c34fe8 (diff) | |
am 0b9bbb6d: DO NOT MERGE. Merge Froyo renderscript to Eclair to support live wallpapers on droid. This gives the necessary CPU reduction to allow the wallpapers to work on the slower CPU.
Merge commit '0b9bbb6dc5d7dabecf23e8c6bb4a267ba8c34fe8' into eclair-plus-aosp
* commit '0b9bbb6dc5d7dabecf23e8c6bb4a267ba8c34fe8':
DO NOT MERGE. Merge Froyo renderscript to Eclair to support live wallpapers on droid. This gives the necessary CPU reduction to allow the wallpapers to work on the slower CPU.
Diffstat (limited to 'libs/rs/rsProgramRaster.cpp')
| -rw-r--r-- | libs/rs/rsProgramRaster.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libs/rs/rsProgramRaster.cpp b/libs/rs/rsProgramRaster.cpp index 51ae7cf61f16..13887d15e74e 100644 --- a/libs/rs/rsProgramRaster.cpp +++ b/libs/rs/rsProgramRaster.cpp @@ -25,12 +25,10 @@ using namespace android::renderscript; ProgramRaster::ProgramRaster(Context *rsc, - Element *in, - Element *out, bool pointSmooth, bool lineSmooth, bool pointSprite) : - Program(rsc, in, out) + Program(rsc) { mAllocFile = __FILE__; mAllocLine = __LINE__; @@ -86,6 +84,14 @@ void ProgramRaster::setupGL(const Context *rsc, ProgramRasterState *state) } } +void ProgramRaster::setupGL2(const Context *rsc, ProgramRasterState *state) +{ + if (state->mLast.get() == this) { + return; + } + state->mLast.set(this); +} + ProgramRasterState::ProgramRasterState() @@ -98,7 +104,7 @@ ProgramRasterState::~ProgramRasterState() void ProgramRasterState::init(Context *rsc, int32_t w, int32_t h) { - ProgramRaster *pr = new ProgramRaster(rsc, NULL, NULL, false, false, false); + ProgramRaster *pr = new ProgramRaster(rsc, false, false, false); mDefault.set(pr); } @@ -118,8 +124,6 @@ RsProgramRaster rsi_ProgramRasterCreate(Context * rsc, RsElement in, RsElement o bool pointSprite) { ProgramRaster *pr = new ProgramRaster(rsc, - static_cast<Element *>(in), - static_cast<Element *>(out), pointSmooth, lineSmooth, pointSprite); |