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/rsProgramFragment.h | |
| 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/rsProgramFragment.h')
| -rw-r--r-- | libs/rs/rsProgramFragment.h | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/libs/rs/rsProgramFragment.h b/libs/rs/rsProgramFragment.h index e26c6e8a35fd..9fa565d4cf8d 100644 --- a/libs/rs/rsProgramFragment.h +++ b/libs/rs/rsProgramFragment.h @@ -28,40 +28,23 @@ class ProgramFragmentState; class ProgramFragment : public Program { public: - const static uint32_t MAX_TEXTURE = 2; - - - - ProgramFragment(Context *, Element *in, Element *out, bool pointSpriteEnable); + ProgramFragment(Context *, const uint32_t * params, uint32_t paramLength); + ProgramFragment(Context *rsc, const char * shaderText, + uint32_t shaderLength, const uint32_t * params, + uint32_t paramLength); virtual ~ProgramFragment(); virtual void setupGL(const Context *, ProgramFragmentState *); + virtual void setupGL2(const Context *, ProgramFragmentState *, ShaderCache *sc); - - - void bindTexture(uint32_t slot, Allocation *); - void bindSampler(uint32_t slot, Sampler *); - void setType(uint32_t slot, const Element *, uint32_t dim); - - void setEnvMode(uint32_t slot, RsTexEnvMode); - void setTexEnable(uint32_t slot, bool); - - + virtual void createShader(); + virtual void loadShader(Context *rsc); + virtual void init(Context *rsc); protected: - // The difference between Textures and Constants is how they are accessed - // Texture lookups go though a sampler which in effect converts normalized - // coordinates into type specific. Multiple samples may also be taken - // and filtered. - // - // Constants are strictly accessed by programetic loads. - ObjectBaseRef<Allocation> mTextures[MAX_TEXTURE]; - ObjectBaseRef<Sampler> mSamplers[MAX_TEXTURE]; - ObjectBaseRef<const Element> mTextureFormats[MAX_TEXTURE]; - uint32_t mTextureDimensions[MAX_TEXTURE]; - - // Hacks to create a program for now + uint32_t mTextureFormats[MAX_TEXTURE]; + uint32_t mTextureDimensions[MAX_TEXTURE]; RsTexEnvMode mEnvModes[MAX_TEXTURE]; uint32_t mTextureEnableMask; bool mPointSpriteEnable; |