Cache element type in allocation hal.

Change-Id: I7351eab942dd8d46b8a4aac1f501f33d4d2e463b
diff --git a/rsAllocation.cpp b/rsAllocation.cpp
index 8c6fedc..ca747e7 100644
--- a/rsAllocation.cpp
+++ b/rsAllocation.cpp
@@ -60,6 +60,7 @@
     mHal.state.hasMipmaps = type->getDimLOD();
     mHal.state.elementSizeBytes = type->getElementSizeBytes();
     mHal.state.hasReferences = mHal.state.type->getElement()->getHasReferences();
+    mHal.state.eType = mHal.state.type->getElement()->getType();
 }
 
 Allocation::~Allocation() {
diff --git a/rsAllocation.h b/rsAllocation.h
index 5a945f1..4fccf9d 100644
--- a/rsAllocation.h
+++ b/rsAllocation.h
@@ -65,6 +65,7 @@
             int32_t surfaceTextureID;
             ANativeWindow *wndSurface;
             SurfaceTexture *surfaceTexture;
+            RsDataType eType;
         };
         State state;