summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsType.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-02-22 15:37:51 -0800
committerJason Sams <rjsams@android.com>2010-02-22 15:37:51 -0800
commit2978bfc6ad79c8f1138d34a704ce5b3d3d70d2c1 (patch)
treee87e3477880e64454f57cbc00cf22aea71e762a4 /libs/rs/rsType.cpp
parent33285c37abee6d95d0ac55cd7e9889cdc8d96d14 (diff)
downloadframeworks_base-2978bfc6ad79c8f1138d34a704ce5b3d3d70d2c1.zip
frameworks_base-2978bfc6ad79c8f1138d34a704ce5b3d3d70d2c1.tar.gz
frameworks_base-2978bfc6ad79c8f1138d34a704ce5b3d3d70d2c1.tar.bz2
beging np2 extension check work.
Diffstat (limited to 'libs/rs/rsType.cpp')
-rw-r--r--libs/rs/rsType.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/rs/rsType.cpp b/libs/rs/rsType.cpp
index 9d24c6c..c09e979 100644
--- a/libs/rs/rsType.cpp
+++ b/libs/rs/rsType.cpp
@@ -283,6 +283,24 @@ void Type::dumpLOGV(const char *prefix) const
mElement->dumpLOGV(buf);
}
+bool Type::getIsNp2() const
+{
+ uint32_t x = getDimX();
+ uint32_t y = getDimY();
+ uint32_t z = getDimZ();
+
+ if (x && (x & (x-1))) {
+ return true;
+ }
+ if (y && (y & (y-1))) {
+ return true;
+ }
+ if (z && (z & (z-1))) {
+ return true;
+ }
+ return false;
+}
+
//////////////////////////////////////////////////
//