summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2011-04-22 14:24:17 -0700
committerJason Sams <rjsams@android.com>2011-04-22 14:25:07 -0700
commit21cd43cbba5ffef3ab666dff52e720a824c2a09a (patch)
tree0f80ad71f1b1e9fc10818732a938761cf5c69ceb
parente2b3304e40c99a91762d27a441ac8fcef4834a3d (diff)
downloadframeworks_base-21cd43cbba5ffef3ab666dff52e720a824c2a09a.zip
frameworks_base-21cd43cbba5ffef3ab666dff52e720a824c2a09a.tar.gz
frameworks_base-21cd43cbba5ffef3ab666dff52e720a824c2a09a.tar.bz2
Add matrix logging.
Change-Id: I42fb61747cf1ddf9b367faf6ce9109429d34e9cf
-rw-r--r--libs/rs/rsMatrix4x4.cpp7
-rw-r--r--libs/rs/rsMatrix4x4.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/libs/rs/rsMatrix4x4.cpp b/libs/rs/rsMatrix4x4.cpp
index 2d90a98..f34af47 100644
--- a/libs/rs/rsMatrix4x4.cpp
+++ b/libs/rs/rsMatrix4x4.cpp
@@ -305,3 +305,10 @@ void Matrix4x4::vectorMultiply(float *out, const float *in) const {
out[2] = (m[2] * in[0]) + (m[6] * in[1]) + (m[10] * in[2]) + m[14];
out[3] = (m[3] * in[0]) + (m[7] * in[1]) + (m[11] * in[2]) + m[15];
}
+
+void Matrix4x4::logv(const char *s) const {
+ LOGV("%s {%f, %f, %f, %f", s, m[0], m[4], m[8], m[12]);
+ LOGV("%s %f, %f, %f, %f", s, m[1], m[5], m[9], m[13]);
+ LOGV("%s %f, %f, %f, %f", s, m[2], m[6], m[10], m[14]);
+ LOGV("%s %f, %f, %f, %f}", s, m[3], m[7], m[11], m[15]);
+}
diff --git a/libs/rs/rsMatrix4x4.h b/libs/rs/rsMatrix4x4.h
index abf34a3..d30184f 100644
--- a/libs/rs/rsMatrix4x4.h
+++ b/libs/rs/rsMatrix4x4.h
@@ -54,6 +54,7 @@ struct Matrix4x4 : public rs_matrix4x4 {
bool inverseTranspose();
void transpose();
+ void logv(const char *s) const;
void multiply(const rs_matrix4x4 *rhs) {