Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef ANDROID_RS_STRUCTURED_COMPONENT_H |
| 18 | #define ANDROID_RS_STRUCTURED_COMPONENT_H |
| 19 | |
Jason Sams | 4b962e5 | 2009-06-22 17:15:15 -0700 | [diff] [blame] | 20 | #include "rsUtils.h" |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 21 | #include "rsObjectBase.h" |
| 22 | |
| 23 | // --------------------------------------------------------------------------- |
| 24 | namespace android { |
| 25 | namespace renderscript { |
| 26 | |
| 27 | class Component : public ObjectBase |
| 28 | { |
| 29 | public: |
| 30 | enum DataType { |
| 31 | FLOAT, |
| 32 | UNSIGNED, |
| 33 | SIGNED |
| 34 | }; |
| 35 | |
| 36 | enum DataKind { |
| 37 | NONE, |
| 38 | RED, GREEN, BLUE, ALPHA, LUMINANCE, INTENSITY, |
| 39 | X, Y, Z, W, |
| 40 | S, T, Q, R, |
| 41 | NX, NY, NZ, |
| 42 | INDEX, |
| 43 | USER |
| 44 | }; |
| 45 | |
| 46 | |
| 47 | Component(DataKind dk, DataType dt, bool isNormalized, uint32_t bits); |
| 48 | virtual ~Component(); |
| 49 | |
| 50 | DataType getType() const {return mType;} |
| 51 | bool getIsNormalized() const {return mIsNormalized;} |
| 52 | DataKind getKind() const {return mKind;} |
| 53 | uint32_t getBits() const {return mBits;} |
| 54 | |
| 55 | protected: |
| 56 | |
| 57 | DataType mType; |
| 58 | bool mIsNormalized; |
| 59 | DataKind mKind; |
| 60 | uint32_t mBits; |
| 61 | |
| 62 | private: |
| 63 | Component(); |
| 64 | }; |
| 65 | |
| 66 | |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | #endif //ANDROID_RS_STRUCTURED_COMPONENT_H |
| 71 | |