summaryrefslogtreecommitdiffstats
path: root/rsComponent.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2011-05-26 17:05:51 -0700
committerJason Sams <rjsams@android.com>2011-05-26 17:05:51 -0700
commita614ae175bbf97201b5e18984d814a1d3e86faa8 (patch)
tree0754ab7f705f1cb00912dd64905bc9d986ed2529 /rsComponent.cpp
parenteb4fe18dd88634330f9566cbb9e785d8c7ec5813 (diff)
downloadandroid_frameworks_rs-a614ae175bbf97201b5e18984d814a1d3e86faa8.tar.gz
android_frameworks_rs-a614ae175bbf97201b5e18984d814a1d3e86faa8.tar.bz2
android_frameworks_rs-a614ae175bbf97201b5e18984d814a1d3e86faa8.zip
Cleaup of rsComponent to remove GL types.
Change-Id: I9f82bafe42f5fb30335b15f38eb251dc1ec62e80
Diffstat (limited to 'rsComponent.cpp')
-rw-r--r--rsComponent.cpp40
1 files changed, 1 insertions, 39 deletions
diff --git a/rsComponent.cpp b/rsComponent.cpp
index e2ae0436..e65febb4 100644
--- a/rsComponent.cpp
+++ b/rsComponent.cpp
@@ -16,11 +16,6 @@
#include "rsComponent.h"
-#ifndef ANDROID_RS_SERIALIZE
-#include <GLES/gl.h>
-#include <GLES2/gl2.h>
-#endif
-
using namespace android;
using namespace android::renderscript;
@@ -181,40 +176,6 @@ bool Component::isReference() const {
return (mType >= RS_TYPE_ELEMENT);
}
-uint32_t Component::getGLType() const {
-#ifndef ANDROID_RS_SERIALIZE
- switch (mType) {
- case RS_TYPE_UNSIGNED_5_6_5: return GL_UNSIGNED_SHORT_5_6_5;
- case RS_TYPE_UNSIGNED_5_5_5_1: return GL_UNSIGNED_SHORT_5_5_5_1;
- case RS_TYPE_UNSIGNED_4_4_4_4: return GL_UNSIGNED_SHORT_4_4_4_4;
-
- //case RS_TYPE_FLOAT_16: return GL_HALF_FLOAT;
- case RS_TYPE_FLOAT_32: return GL_FLOAT;
- case RS_TYPE_UNSIGNED_8: return GL_UNSIGNED_BYTE;
- case RS_TYPE_UNSIGNED_16: return GL_UNSIGNED_SHORT;
- case RS_TYPE_SIGNED_8: return GL_BYTE;
- case RS_TYPE_SIGNED_16: return GL_SHORT;
- default: break;
- }
-#endif //ANDROID_RS_SERIALIZE
- return 0;
-}
-
-uint32_t Component::getGLFormat() const {
-#ifndef ANDROID_RS_SERIALIZE
- switch (mKind) {
- case RS_KIND_PIXEL_L: return GL_LUMINANCE;
- case RS_KIND_PIXEL_A: return GL_ALPHA;
- case RS_KIND_PIXEL_LA: return GL_LUMINANCE_ALPHA;
- case RS_KIND_PIXEL_RGB: return GL_RGB;
- case RS_KIND_PIXEL_RGBA: return GL_RGBA;
- case RS_KIND_PIXEL_DEPTH: return GL_DEPTH_COMPONENT16;
- default: break;
- }
-#endif //ANDROID_RS_SERIALIZE
- return 0;
-}
-
String8 Component::getGLSLType() const {
if (mType == RS_TYPE_SIGNED_32) {
switch (mVectorSize) {
@@ -244,6 +205,7 @@ String8 Component::getGLSLType() const {
return String8();
}
+
static const char * gTypeBasicStrings[] = {
"NONE",
"F16",