diff options
| author | Jason Sams <rjsams@android.com> | 2010-02-12 11:27:01 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-02-12 11:27:01 -0800 |
| commit | 79b646ffe51c532f00b69dc4967ee51ca28986cf (patch) | |
| tree | 64dc779a8ee4d21f322499bbefa11e5972741be3 /libs/rs/rsComponent.h | |
| parent | 1e90ab542d675616e9370ab7e5add99d7af12587 (diff) | |
| parent | 0b9bbb6dc5d7dabecf23e8c6bb4a267ba8c34fe8 (diff) | |
| download | frameworks_base-79b646ffe51c532f00b69dc4967ee51ca28986cf.zip frameworks_base-79b646ffe51c532f00b69dc4967ee51ca28986cf.tar.gz frameworks_base-79b646ffe51c532f00b69dc4967ee51ca28986cf.tar.bz2 | |
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/rsComponent.h')
| -rw-r--r-- | libs/rs/rsComponent.h | 71 |
1 files changed, 31 insertions, 40 deletions
diff --git a/libs/rs/rsComponent.h b/libs/rs/rsComponent.h index 5366cc4..71de324 100644 --- a/libs/rs/rsComponent.h +++ b/libs/rs/rsComponent.h @@ -14,65 +14,56 @@ * limitations under the License. */ -#ifndef ANDROID_RS_STRUCTURED_COMPONENT_H -#define ANDROID_RS_STRUCTURED_COMPONENT_H +#ifndef ANDROID_COMPONENT_H +#define ANDROID_COMPONENT_H #include "rsUtils.h" -#include "rsObjectBase.h" // --------------------------------------------------------------------------- namespace android { namespace renderscript { -class Component : public ObjectBase + +// An element is a group of Components that occupies one cell in a structure. +class Component { public: - enum DataType { - FLOAT, - UNSIGNED, - SIGNED - }; - - enum DataKind { - USER, - RED, GREEN, BLUE, ALPHA, LUMINANCE, INTENSITY, - X, Y, Z, W, - S, T, Q, R, - NX, NY, NZ, - INDEX, - POINT_SIZE - }; - + Component(); + ~Component(); - Component(Context *rsc, DataKind dk, DataType dt, bool isNorm, uint32_t bits, const char *); - virtual ~Component(); - - DataType getType() const {return mType;} - bool getIsNormalized() const {return mIsNormalized;} - DataKind getKind() const {return mKind;} - uint32_t getBits() const {return mBits;} + void set(RsDataType dt, RsDataKind dk, bool norm, uint32_t vecSize=1); uint32_t getGLType() const; - const char * getCType() const; - - const char * getComponentName() const {return mName.string();} - virtual void dumpLOGV(const char *prefix) const; + uint32_t getGLFormat() const; + String8 getCType() const; + String8 getGLSLType() const; + void dumpLOGV(const char *prefix) const; + + + RsDataType getType() const {return mType;} + RsDataKind getKind() const {return mKind;} + bool getIsNormalized() const {return mNormalized;} + uint32_t getVectorSize() const {return mVectorSize;} + bool getIsFloat() const {return mIsFloat;} + bool getIsSigned() const {return mIsSigned;} + uint32_t getBits() const {return mBits;} protected: + RsDataType mType; + RsDataKind mKind; + bool mNormalized; + uint32_t mVectorSize; - DataType mType; - bool mIsNormalized; - DataKind mKind; + // derived uint32_t mBits; - String8 mName; - -private: - Component(Context *rsc); + uint32_t mTypeBits; + bool mIsFloat; + bool mIsSigned; + bool mIsPixel; }; - } } -#endif //ANDROID_RS_STRUCTURED_COMPONENT_H +#endif |
