TypeThunkerpublic class TypeThunker extends Type
Fields Summary |
---|
android.renderscript.Type | mN | static HashMap | mMap |
Constructors Summary |
---|
TypeThunker(RenderScript rs, android.renderscript.Type t)
super(0, rs);
mN = t;
try {
internalCalc();
mElement = new ElementThunker(rs, t.getElement());
} catch (android.renderscript.RSRuntimeException e) {
throw ExceptionThunker.convertException(e);
}
synchronized(mMap) {
mMap.put(mN, this);
}
|
Methods Summary |
---|
static Type | create(RenderScript rs, Element e, int dx, int dy, int dz, boolean dmip, boolean dfaces, int yuv)
ElementThunker et = (ElementThunker)e;
RenderScriptThunker rst = (RenderScriptThunker)rs;
try {
android.renderscript.Type.Builder tb =
new android.renderscript.Type.Builder(rst.mN, et.mN);
if (dx > 0) tb.setX(dx);
if (dy > 0) tb.setY(dy);
if (dz > 0) tb.setZ(dz);
if (dmip) tb.setMipmaps(dmip);
if (dfaces) tb.setFaces(dfaces);
if (yuv > 0) tb.setYuvFormat(yuv);
android.renderscript.Type nt = tb.create();
TypeThunker tt = new TypeThunker(rs, nt);
tt.internalCalc();
return tt;
} catch (android.renderscript.RSRuntimeException exc) {
throw ExceptionThunker.convertException(exc);
}
| static Type | find(android.renderscript.Type nt)
return mMap.get(nt);
| android.renderscript.Type | getNObj()
return mN;
| void | internalCalc()
mDimX = mN.getX();
mDimY = mN.getY();
mDimZ = mN.getZ();
mDimFaces = mN.hasFaces();
mDimMipmaps = mN.hasMipmaps();
mDimYuv = mN.getYuv();
calcElementCount();
|
|