renderscript-v8

16:51:08.708 INFO  jd.cli.Main - Decompiling renderscript-v8.jar
package android.support.v8.renderscript;

public enum Sampler$Value
{
  NEAREST(0),  LINEAR(1),  LINEAR_MIP_LINEAR(2),  LINEAR_MIP_NEAREST(5),  WRAP(3),  CLAMP(4),  MIRRORED_REPEAT(6);
  
  int mID;
  
  private Sampler$Value(int id)
  {
    mID = id;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.Sampler.Value
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public class Int4
{
  public int x;
  public int y;
  public int z;
  public int w;
  
  public Int4() {}
  
  public Int4(int initX, int initY, int initZ, int initW)
  {
    x = initX;
    y = initY;
    z = initZ;
    w = initW;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.Int4
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

import android.renderscript.RSRuntimeException;
import android.renderscript.Type.Builder;
import java.util.HashMap;

class TypeThunker
  extends Type
{
  android.renderscript.Type mN;
  
  android.renderscript.Type getNObj()
  {
    return mN;
  }
  
  static HashMap<android.renderscript.Type, Type> mMap = new HashMap();
  
  void internalCalc()
  {
    mDimX = mN.getX();
    mDimY = mN.getY();
    mDimZ = mN.getZ();
    mDimFaces = mN.hasFaces();
    mDimMipmaps = mN.hasMipmaps();
    mDimYuv = mN.getYuv();
    calcElementCount();
  }
  
  TypeThunker(RenderScript rs, android.renderscript.Type t)
  {
    super(0, rs);
    mN = t;
    try
    {
      internalCalc();
      mElement = new ElementThunker(rs, t.getElement());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
    synchronized (mMap)
    {
      mMap.put(mN, this);
    }
  }
  
  static Type find(android.renderscript.Type nt)
  {
    return (Type)mMap.get(nt);
  }
  
  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
    {
      Type.Builder tb = new Type.Builder(mN, 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 (RSRuntimeException exc)
    {
      throw ExceptionThunker.convertException(exc);
    }
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.TypeThunker
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public class Short4
{
  public short x;
  public short y;
  public short z;
  public short w;
  
  public Short4() {}
  
  public Short4(short initX, short initY, short initZ, short initW)
  {
    x = initX;
    y = initY;
    z = initZ;
    w = initW;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.Short4
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public class Double2
{
  public double x;
  public double y;
  
  public Double2() {}
  
  public Double2(double initX, double initY)
  {
    x = initX;
    y = initY;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.Double2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public enum Allocation$MipmapControl
{
  MIPMAP_NONE(0),  MIPMAP_FULL(1),  MIPMAP_ON_SYNC_TO_TEXTURE(2);
  
  int mID;
  
  private Allocation$MipmapControl(int id)
  {
    mID = id;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.Allocation.MipmapControl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public class ScriptIntrinsic3DLUT
  extends ScriptIntrinsic
{
  private Allocation mLUT;
  private Element mElement;
  
  protected ScriptIntrinsic3DLUT(int id, RenderScript rs, Element e)
  {
    super(id, rs);
    mElement = e;
  }
  
  public static ScriptIntrinsic3DLUT create(RenderScript rs, Element e)
  {
    if (RenderScript.isNative)
    {
      RenderScriptThunker rst = (RenderScriptThunker)rs;
      return ScriptIntrinsic3DLUTThunker.create(rs, e);
    }
    int id = rs.nScriptIntrinsicCreate(8, e.getID(rs));
    if (!e.isCompatible(Element.U8_4(rs))) {
      throw new RSIllegalArgumentException("Element must be compatible with uchar4.");
    }
    return new ScriptIntrinsic3DLUT(id, rs, e);
  }
  
  public void setLUT(Allocation lut)
  {
    Type t = lut.getType();
    if (t.getZ() == 0) {
      throw new RSIllegalArgumentException("LUT must be 3d.");
    }
    if (!t.getElement().isCompatible(mElement)) {
      throw new RSIllegalArgumentException("LUT element type must match.");
    }
    mLUT = lut;
    setVar(0, mLUT);
  }
  
  public void forEach(Allocation ain, Allocation aout)
  {
    forEach(0, ain, aout, null);
  }
  
  public Script.KernelID getKernelID()
  {
    return createKernelID(0, 3, null, null);
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.ScriptIntrinsic3DLUT
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

class SamplerThunker$1 {}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.SamplerThunker.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

import android.renderscript.Element.Builder;
import android.renderscript.RSRuntimeException;

class ElementThunker$BuilderThunker
{
  Element.Builder mN;
  
  public ElementThunker$BuilderThunker(RenderScript rs)
  {
    RenderScriptThunker rst = (RenderScriptThunker)rs;
    try
    {
      mN = new Element.Builder(mN);
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public void add(Element e, String name, int arraySize)
  {
    ElementThunker et = (ElementThunker)e;
    try
    {
      mN.add(mN, name, arraySize);
    }
    catch (RSRuntimeException exc)
    {
      throw ExceptionThunker.convertException(exc);
    }
  }
  
  public Element create(RenderScript rs)
  {
    try
    {
      android.renderscript.Element e = mN.create();
      return new ElementThunker(rs, e);
    }
    catch (RSRuntimeException exc)
    {
      throw ExceptionThunker.convertException(exc);
    }
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.ElementThunker.BuilderThunker
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public enum Element$DataKind
{
  USER(0),  PIXEL_L(7),  PIXEL_A(8),  PIXEL_LA(9),  PIXEL_RGB(10),  PIXEL_RGBA(11),  PIXEL_DEPTH(12),  PIXEL_YUV(13);
  
  int mID;
  
  private Element$DataKind(int id)
  {
    mID = id;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.Element.DataKind
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public class Byte4
{
  public byte x;
  public byte y;
  public byte z;
  public byte w;
  
  public Byte4() {}
  
  public Byte4(byte initX, byte initY, byte initZ, byte initW)
  {
    x = initX;
    y = initY;
    z = initZ;
    w = initW;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.Byte4
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public enum Type$CubemapFace
{
  POSITIVE_X(0),  NEGATIVE_X(1),  POSITIVE_Y(2),  NEGATIVE_Y(3),  POSITIVE_Z(4),  NEGATIVE_Z(5);
  
  int mID;
  
  private Type$CubemapFace(int id)
  {
    mID = id;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.Type.CubemapFace
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public class Sampler$Builder
{
  RenderScript mRS;
  Sampler.Value mMin;
  Sampler.Value mMag;
  Sampler.Value mWrapS;
  Sampler.Value mWrapT;
  Sampler.Value mWrapR;
  float mAniso;
  
  public Sampler$Builder(RenderScript rs)
  {
    mRS = rs;
    mMin = Sampler.Value.NEAREST;
    mMag = Sampler.Value.NEAREST;
    mWrapS = Sampler.Value.WRAP;
    mWrapT = Sampler.Value.WRAP;
    mWrapR = Sampler.Value.WRAP;
    mAniso = 1.0F;
  }
  
  public void setMinification(Sampler.Value v)
  {
    if ((v == Sampler.Value.NEAREST) || (v == Sampler.Value.LINEAR) || (v == Sampler.Value.LINEAR_MIP_LINEAR) || (v == Sampler.Value.LINEAR_MIP_NEAREST)) {
      mMin = v;
    } else {
      throw new IllegalArgumentException("Invalid value");
    }
  }
  
  public void setMagnification(Sampler.Value v)
  {
    if ((v == Sampler.Value.NEAREST) || (v == Sampler.Value.LINEAR)) {
      mMag = v;
    } else {
      throw new IllegalArgumentException("Invalid value");
    }
  }
  
  public void setWrapS(Sampler.Value v)
  {
    if ((v == Sampler.Value.WRAP) || (v == Sampler.Value.CLAMP) || (v == Sampler.Value.MIRRORED_REPEAT)) {
      mWrapS = v;
    } else {
      throw new IllegalArgumentException("Invalid value");
    }
  }
  
  public void setWrapT(Sampler.Value v)
  {
    if ((v == Sampler.Value.WRAP) || (v == Sampler.Value.CLAMP) || (v == Sampler.Value.MIRRORED_REPEAT)) {
      mWrapT = v;
    } else {
      throw new IllegalArgumentException("Invalid value");
    }
  }
  
  public void setAnisotropy(float v)
  {
    if (v >= 0.0F) {
      mAniso = v;
    } else {
      throw new IllegalArgumentException("Invalid value");
    }
  }
  
  public Sampler create()
  {
    if (RenderScript.isNative)
    {
      RenderScriptThunker rst = (RenderScriptThunker)mRS;
      SamplerThunker.Builder b = new SamplerThunker.Builder(rst);
      b.setMinification(mMin);
      b.setMagnification(mMag);
      b.setWrapS(mWrapS);
      b.setWrapT(mWrapT);
      b.setAnisotropy(mAniso);
      return b.create();
    }
    mRS.validate();
    int id = mRS.nSamplerCreate(mMag.mID, mMin.mID, mWrapS.mID, mWrapT.mID, mWrapR.mID, mAniso);
    
    Sampler sampler = new Sampler(id, mRS);
    mMin = mMin;
    mMag = mMag;
    mWrapS = mWrapS;
    mWrapT = mWrapT;
    mWrapR = mWrapR;
    mAniso = mAniso;
    return sampler;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.Sampler.Builder
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

import android.renderscript.BaseObj;
import android.renderscript.RSRuntimeException;
import android.renderscript.Sampler.Builder;

class SamplerThunker
  extends Sampler
{
  android.renderscript.Sampler mN;
  
  protected SamplerThunker(int id, RenderScript rs)
  {
    super(id, rs);
  }
  
  BaseObj getNObj()
  {
    return mN;
  }
  
  static android.renderscript.Sampler.Value convertValue(Sampler.Value v)
  {
    switch (v)
    {
    case NEAREST: 
      return android.renderscript.Sampler.Value.NEAREST;
    case LINEAR: 
      return android.renderscript.Sampler.Value.LINEAR;
    case LINEAR_MIP_LINEAR: 
      return android.renderscript.Sampler.Value.LINEAR_MIP_LINEAR;
    case LINEAR_MIP_NEAREST: 
      return android.renderscript.Sampler.Value.LINEAR_MIP_NEAREST;
    case WRAP: 
      return android.renderscript.Sampler.Value.WRAP;
    case CLAMP: 
      return android.renderscript.Sampler.Value.CLAMP;
    case MIRRORED_REPEAT: 
      return android.renderscript.Sampler.Value.MIRRORED_REPEAT;
    }
    return null;
  }
  
  public static class Builder
  {
    RenderScriptThunker mRS;
    Sampler.Value mMin;
    Sampler.Value mMag;
    Sampler.Value mWrapS;
    Sampler.Value mWrapT;
    Sampler.Value mWrapR;
    float mAniso;
    
    public Builder(RenderScriptThunker rs)
    {
      mRS = rs;
      mMin = Sampler.Value.NEAREST;
      mMag = Sampler.Value.NEAREST;
      mWrapS = Sampler.Value.WRAP;
      mWrapT = Sampler.Value.WRAP;
      mWrapR = Sampler.Value.WRAP;
    }
    
    public void setMinification(Sampler.Value v)
    {
      if ((v == Sampler.Value.NEAREST) || (v == Sampler.Value.LINEAR) || (v == Sampler.Value.LINEAR_MIP_LINEAR) || (v == Sampler.Value.LINEAR_MIP_NEAREST)) {
        mMin = v;
      } else {
        throw new IllegalArgumentException("Invalid value");
      }
    }
    
    public void setMagnification(Sampler.Value v)
    {
      if ((v == Sampler.Value.NEAREST) || (v == Sampler.Value.LINEAR)) {
        mMag = v;
      } else {
        throw new IllegalArgumentException("Invalid value");
      }
    }
    
    public void setWrapS(Sampler.Value v)
    {
      if ((v == Sampler.Value.WRAP) || (v == Sampler.Value.CLAMP) || (v == Sampler.Value.MIRRORED_REPEAT)) {
        mWrapS = v;
      } else {
        throw new IllegalArgumentException("Invalid value");
      }
    }
    
    public void setWrapT(Sampler.Value v)
    {
      if ((v == Sampler.Value.WRAP) || (v == Sampler.Value.CLAMP) || (v == Sampler.Value.MIRRORED_REPEAT)) {
        mWrapT = v;
      } else {
        throw new IllegalArgumentException("Invalid value");
      }
    }
    
    public void setAnisotropy(float v)
    {
      if (v >= 0.0F) {
        mAniso = v;
      } else {
        throw new IllegalArgumentException("Invalid value");
      }
    }
    
    public Sampler create()
    {
      mRS.validate();
      try
      {
        Sampler.Builder b = new Sampler.Builder(mRS.mN);
        b.setMinification(SamplerThunker.convertValue(mMin));
        b.setMagnification(SamplerThunker.convertValue(mMag));
        b.setWrapS(SamplerThunker.convertValue(mWrapS));
        b.setWrapT(SamplerThunker.convertValue(mWrapT));
        b.setAnisotropy(mAniso);
        android.renderscript.Sampler s = b.create();
        
        SamplerThunker sampler = new SamplerThunker(0, mRS);
        mMin = mMin;
        mMag = mMag;
        mWrapS = mWrapS;
        mWrapT = mWrapT;
        mWrapR = mWrapR;
        mAniso = mAniso;
        mN = s;
        
        return sampler;
      }
      catch (RSRuntimeException e)
      {
        throw ExceptionThunker.convertException(e);
      }
    }
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.SamplerThunker
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

import android.renderscript.RSRuntimeException;

class ScriptIntrinsic3DLUTThunker
  extends ScriptIntrinsic3DLUT
{
  android.renderscript.ScriptIntrinsic3DLUT mN;
  
  android.renderscript.ScriptIntrinsic3DLUT getNObj()
  {
    return mN;
  }
  
  private ScriptIntrinsic3DLUTThunker(int id, RenderScript rs, Element e)
  {
    super(id, rs, e);
  }
  
  public static ScriptIntrinsic3DLUTThunker create(RenderScript rs, Element e)
  {
    RenderScriptThunker rst = (RenderScriptThunker)rs;
    ElementThunker et = (ElementThunker)e;
    
    ScriptIntrinsic3DLUTThunker lut = new ScriptIntrinsic3DLUTThunker(0, rs, e);
    try
    {
      mN = android.renderscript.ScriptIntrinsic3DLUT.create(mN, et.getNObj());
    }
    catch (RSRuntimeException exc)
    {
      throw ExceptionThunker.convertException(exc);
    }
    return lut;
  }
  
  public void setLUT(Allocation lut)
  {
    AllocationThunker lutt = (AllocationThunker)lut;
    try
    {
      mN.setLUT(lutt.getNObj());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public void forEach(Allocation ain, Allocation aout)
  {
    AllocationThunker aint = (AllocationThunker)ain;
    AllocationThunker aoutt = (AllocationThunker)aout;
    try
    {
      mN.forEach(aint.getNObj(), aoutt.getNObj());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public Script.KernelID getKernelID()
  {
    Script.KernelID k = createKernelID(0, 3, null, null);
    try
    {
      mN = mN.getKernelID();
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
    return k;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.ScriptIntrinsic3DLUTThunker
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

import android.util.Log;

public class FieldPacker
{
  private android.renderscript.FieldPacker mN;
  private final byte[] mData;
  private int mPos;
  private int mLen;
  
  public FieldPacker(int len)
  {
    mPos = 0;
    mLen = len;
    mData = new byte[len];
    if (RenderScript.shouldThunk()) {
      mN = new android.renderscript.FieldPacker(len);
    }
  }
  
  public void align(int v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.align(v);
      return;
    }
    if ((v <= 0) || ((v & v - 1) != 0)) {
      throw new RSIllegalArgumentException("argument must be a non-negative non-zero power of 2: " + v);
    }
    while ((mPos & v - 1) != 0) {
      mData[(mPos++)] = 0;
    }
  }
  
  public void reset()
  {
    if (RenderScript.shouldThunk())
    {
      mN.reset();
      return;
    }
    mPos = 0;
  }
  
  public void reset(int i)
  {
    if (RenderScript.shouldThunk())
    {
      mN.reset(i);
      return;
    }
    if ((i < 0) || (i >= mLen)) {
      throw new RSIllegalArgumentException("out of range argument: " + i);
    }
    mPos = i;
  }
  
  public void skip(int i)
  {
    if (RenderScript.shouldThunk())
    {
      mN.skip(i);
      return;
    }
    int res = mPos + i;
    if ((res < 0) || (res > mLen)) {
      throw new RSIllegalArgumentException("out of range argument: " + i);
    }
    mPos = res;
  }
  
  public void addI8(byte v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI8(v);
      return;
    }
    mData[(mPos++)] = v;
  }
  
  public void addI16(short v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI16(v);
      return;
    }
    align(2);
    mData[(mPos++)] = ((byte)(v & 0xFF));
    mData[(mPos++)] = ((byte)(v >> 8));
  }
  
  public void addI32(int v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI32(v);
      return;
    }
    align(4);
    mData[(mPos++)] = ((byte)(v & 0xFF));
    mData[(mPos++)] = ((byte)(v >> 8 & 0xFF));
    mData[(mPos++)] = ((byte)(v >> 16 & 0xFF));
    mData[(mPos++)] = ((byte)(v >> 24 & 0xFF));
  }
  
  public void addI64(long v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI64(v);
      return;
    }
    align(8);
    mData[(mPos++)] = ((byte)(int)(v & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 8 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 16 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 24 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 32 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 40 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 48 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 56 & 0xFF));
  }
  
  public void addU8(short v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU8(v);
      return;
    }
    if ((v < 0) || (v > 255)) {
      throw new IllegalArgumentException("Saving value out of range for type");
    }
    mData[(mPos++)] = ((byte)v);
  }
  
  public void addU16(int v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU16(v);
      return;
    }
    if ((v < 0) || (v > 65535))
    {
      Log.e("rs", "FieldPacker.addU16( " + v + " )");
      throw new IllegalArgumentException("Saving value out of range for type");
    }
    align(2);
    mData[(mPos++)] = ((byte)(v & 0xFF));
    mData[(mPos++)] = ((byte)(v >> 8));
  }
  
  public void addU32(long v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU32(v);
      return;
    }
    if ((v < 0L) || (v > 4294967295L))
    {
      Log.e("rs", "FieldPacker.addU32( " + v + " )");
      throw new IllegalArgumentException("Saving value out of range for type");
    }
    align(4);
    mData[(mPos++)] = ((byte)(int)(v & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 8 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 16 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 24 & 0xFF));
  }
  
  public void addU64(long v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU64(v);
      return;
    }
    if (v < 0L)
    {
      Log.e("rs", "FieldPacker.addU64( " + v + " )");
      throw new IllegalArgumentException("Saving value out of range for type");
    }
    align(8);
    mData[(mPos++)] = ((byte)(int)(v & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 8 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 16 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 24 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 32 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 40 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 48 & 0xFF));
    mData[(mPos++)] = ((byte)(int)(v >> 56 & 0xFF));
  }
  
  public void addF32(float v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addF32(v);
      return;
    }
    addI32(Float.floatToRawIntBits(v));
  }
  
  public void addF64(double v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addF64(v);
      return;
    }
    addI64(Double.doubleToRawLongBits(v));
  }
  
  public void addObj(BaseObj obj)
  {
    if (RenderScript.shouldThunk())
    {
      if (obj != null) {
        mN.addObj(obj.getNObj());
      } else {
        mN.addObj(null);
      }
      return;
    }
    if (obj != null) {
      addI32(obj.getID(null));
    } else {
      addI32(0);
    }
  }
  
  public void addF32(Float2 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addF32(new android.renderscript.Float2(x, y));
      return;
    }
    addF32(x);
    addF32(y);
  }
  
  public void addF32(Float3 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addF32(new android.renderscript.Float3(x, y, z));
      return;
    }
    addF32(x);
    addF32(y);
    addF32(z);
  }
  
  public void addF32(Float4 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addF32(new android.renderscript.Float4(x, y, z, w));
      return;
    }
    addF32(x);
    addF32(y);
    addF32(z);
    addF32(w);
  }
  
  public void addF64(Double2 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addF64(new android.renderscript.Double2(x, y));
      return;
    }
    addF64(x);
    addF64(y);
  }
  
  public void addF64(Double3 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addF64(new android.renderscript.Double3(x, y, z));
      return;
    }
    addF64(x);
    addF64(y);
    addF64(z);
  }
  
  public void addF64(Double4 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addF64(new android.renderscript.Double4(x, y, z, w));
      return;
    }
    addF64(x);
    addF64(y);
    addF64(z);
    addF64(w);
  }
  
  public void addI8(Byte2 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI8(new android.renderscript.Byte2(x, y));
      return;
    }
    addI8(x);
    addI8(y);
  }
  
  public void addI8(Byte3 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI8(new android.renderscript.Byte3(x, y, z));
      return;
    }
    addI8(x);
    addI8(y);
    addI8(z);
  }
  
  public void addI8(Byte4 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI8(new android.renderscript.Byte4(x, y, z, w));
      return;
    }
    addI8(x);
    addI8(y);
    addI8(z);
    addI8(w);
  }
  
  public void addU8(Short2 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU8(new android.renderscript.Short2(x, y));
      return;
    }
    addU8(x);
    addU8(y);
  }
  
  public void addU8(Short3 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU8(new android.renderscript.Short3(x, y, z));
      return;
    }
    addU8(x);
    addU8(y);
    addU8(z);
  }
  
  public void addU8(Short4 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU8(new android.renderscript.Short4(x, y, z, w));
      return;
    }
    addU8(x);
    addU8(y);
    addU8(z);
    addU8(w);
  }
  
  public void addI16(Short2 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI16(new android.renderscript.Short2(x, y));
      return;
    }
    addI16(x);
    addI16(y);
  }
  
  public void addI16(Short3 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI16(new android.renderscript.Short3(x, y, z));
      return;
    }
    addI16(x);
    addI16(y);
    addI16(z);
  }
  
  public void addI16(Short4 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI16(new android.renderscript.Short4(x, y, z, w));
      return;
    }
    addI16(x);
    addI16(y);
    addI16(z);
    addI16(w);
  }
  
  public void addU16(Int2 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU16(new android.renderscript.Int2(x, y));
      return;
    }
    addU16(x);
    addU16(y);
  }
  
  public void addU16(Int3 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU16(new android.renderscript.Int3(x, y, z));
      return;
    }
    addU16(x);
    addU16(y);
    addU16(z);
  }
  
  public void addU16(Int4 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU16(new android.renderscript.Int4(x, y, z, w));
      return;
    }
    addU16(x);
    addU16(y);
    addU16(z);
    addU16(w);
  }
  
  public void addI32(Int2 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI32(new android.renderscript.Int2(x, y));
      return;
    }
    addI32(x);
    addI32(y);
  }
  
  public void addI32(Int3 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI32(new android.renderscript.Int3(x, y, z));
      return;
    }
    addI32(x);
    addI32(y);
    addI32(z);
  }
  
  public void addI32(Int4 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI32(new android.renderscript.Int4(x, y, z, w));
      return;
    }
    addI32(x);
    addI32(y);
    addI32(z);
    addI32(w);
  }
  
  public void addU32(Long2 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU32(new android.renderscript.Long2(x, y));
      return;
    }
    addU32(x);
    addU32(y);
  }
  
  public void addU32(Long3 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU32(new android.renderscript.Long3(x, y, z));
      return;
    }
    addU32(x);
    addU32(y);
    addU32(z);
  }
  
  public void addU32(Long4 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU32(new android.renderscript.Long4(x, y, z, w));
      return;
    }
    addU32(x);
    addU32(y);
    addU32(z);
    addU32(w);
  }
  
  public void addI64(Long2 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI64(new android.renderscript.Long2(x, y));
      return;
    }
    addI64(x);
    addI64(y);
  }
  
  public void addI64(Long3 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI64(new android.renderscript.Long3(x, y, z));
      return;
    }
    addI64(x);
    addI64(y);
    addI64(z);
  }
  
  public void addI64(Long4 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addI64(new android.renderscript.Long4(x, y, z, w));
      return;
    }
    addI64(x);
    addI64(y);
    addI64(z);
    addI64(w);
  }
  
  public void addU64(Long2 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU64(new android.renderscript.Long2(x, y));
      return;
    }
    addU64(x);
    addU64(y);
  }
  
  public void addU64(Long3 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU64(new android.renderscript.Long3(x, y, z));
      return;
    }
    addU64(x);
    addU64(y);
    addU64(z);
  }
  
  public void addU64(Long4 v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addU64(new android.renderscript.Long4(x, y, z, w));
      return;
    }
    addU64(x);
    addU64(y);
    addU64(z);
    addU64(w);
  }
  
  public void addMatrix(Matrix4f v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addMatrix(new android.renderscript.Matrix4f(v.getArray()));
      return;
    }
    for (int i = 0; i < mMat.length; i++) {
      addF32(mMat[i]);
    }
  }
  
  public void addMatrix(Matrix3f v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addMatrix(new android.renderscript.Matrix3f(v.getArray()));
      return;
    }
    for (int i = 0; i < mMat.length; i++) {
      addF32(mMat[i]);
    }
  }
  
  public void addMatrix(Matrix2f v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addMatrix(new android.renderscript.Matrix2f(v.getArray()));
      return;
    }
    for (int i = 0; i < mMat.length; i++) {
      addF32(mMat[i]);
    }
  }
  
  public void addBoolean(boolean v)
  {
    if (RenderScript.shouldThunk())
    {
      mN.addBoolean(v);
      return;
    }
    addI8((byte)(v ? 1 : 0));
  }
  
  public final byte[] getData()
  {
    if (RenderScript.shouldThunk()) {
      return mN.getData();
    }
    return mData;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.FieldPacker
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public class ScriptIntrinsicLUT
  extends ScriptIntrinsic
{
  private final Matrix4f mMatrix = new Matrix4f();
  private Allocation mTables;
  private final byte[] mCache = new byte['?'];
  private boolean mDirty = true;
  
  protected ScriptIntrinsicLUT(int id, RenderScript rs)
  {
    super(id, rs);
  }
  
  public static ScriptIntrinsicLUT create(RenderScript rs, Element e)
  {
    if (RenderScript.isNative)
    {
      RenderScriptThunker rst = (RenderScriptThunker)rs;
      return ScriptIntrinsicLUTThunker.create(rs, e);
    }
    int id = rs.nScriptIntrinsicCreate(3, e.getID(rs));
    
    ScriptIntrinsicLUT si = new ScriptIntrinsicLUT(id, rs);
    mTables = Allocation.createSized(rs, Element.U8(rs), 1024);
    for (int ct = 0; ct < 256; ct++)
    {
      mCache[ct] = ((byte)ct);
      mCache[(ct + 256)] = ((byte)ct);
      mCache[(ct + 512)] = ((byte)ct);
      mCache[(ct + 768)] = ((byte)ct);
    }
    si.setVar(0, mTables);
    return si;
  }
  
  private void validate(int index, int value)
  {
    if ((index < 0) || (index > 255)) {
      throw new RSIllegalArgumentException("Index out of range (0-255).");
    }
    if ((value < 0) || (value > 255)) {
      throw new RSIllegalArgumentException("Value out of range (0-255).");
    }
  }
  
  public void setRed(int index, int value)
  {
    validate(index, value);
    mCache[index] = ((byte)value);
    mDirty = true;
  }
  
  public void setGreen(int index, int value)
  {
    validate(index, value);
    mCache[(index + 256)] = ((byte)value);
    mDirty = true;
  }
  
  public void setBlue(int index, int value)
  {
    validate(index, value);
    mCache[(index + 512)] = ((byte)value);
    mDirty = true;
  }
  
  public void setAlpha(int index, int value)
  {
    validate(index, value);
    mCache[(index + 768)] = ((byte)value);
    mDirty = true;
  }
  
  public void forEach(Allocation ain, Allocation aout)
  {
    if (mDirty)
    {
      mDirty = false;
      mTables.copyFromUnchecked(mCache);
    }
    forEach(0, ain, aout, null);
  }
  
  public Script.KernelID getKernelID()
  {
    return createKernelID(0, 3, null, null);
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.ScriptIntrinsicLUT
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public class RSInvalidStateException
  extends RSRuntimeException
{
  public RSInvalidStateException(String string)
  {
    super(string);
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.RSInvalidStateException
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public class RSDriverException
  extends RSRuntimeException
{
  public RSDriverException(String string)
  {
    super(string);
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.RSDriverException
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

import android.renderscript.RSRuntimeException;
import android.renderscript.ScriptGroup.Builder;

class ScriptGroupThunker
  extends ScriptGroup
{
  android.renderscript.ScriptGroup mN;
  
  android.renderscript.ScriptGroup getNObj()
  {
    return mN;
  }
  
  ScriptGroupThunker(int id, RenderScript rs)
  {
    super(id, rs);
  }
  
  public void setInput(Script.KernelID s, Allocation a)
  {
    AllocationThunker at = (AllocationThunker)a;
    try
    {
      mN.setInput(mN, at.getNObj());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public void setOutput(Script.KernelID s, Allocation a)
  {
    AllocationThunker at = (AllocationThunker)a;
    try
    {
      mN.setOutput(mN, at.getNObj());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public void execute()
  {
    try
    {
      mN.execute();
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public static final class Builder
  {
    ScriptGroup.Builder bN;
    RenderScript mRS;
    
    Builder(RenderScript rs)
    {
      RenderScriptThunker rst = (RenderScriptThunker)rs;
      mRS = rs;
      try
      {
        bN = new ScriptGroup.Builder(mN);
      }
      catch (RSRuntimeException e)
      {
        throw ExceptionThunker.convertException(e);
      }
    }
    
    public Builder addKernel(Script.KernelID k)
    {
      try
      {
        bN.addKernel(mN);
      }
      catch (RSRuntimeException e)
      {
        throw ExceptionThunker.convertException(e);
      }
      return this;
    }
    
    public Builder addConnection(Type t, Script.KernelID from, Script.FieldID to)
    {
      TypeThunker tt = (TypeThunker)t;
      try
      {
        bN.addConnection(tt.getNObj(), mN, mN);
      }
      catch (RSRuntimeException e)
      {
        throw ExceptionThunker.convertException(e);
      }
      return this;
    }
    
    public Builder addConnection(Type t, Script.KernelID from, Script.KernelID to)
    {
      TypeThunker tt = (TypeThunker)t;
      try
      {
        bN.addConnection(tt.getNObj(), mN, mN);
      }
      catch (RSRuntimeException e)
      {
        throw ExceptionThunker.convertException(e);
      }
      return this;
    }
    
    public ScriptGroupThunker create()
    {
      ScriptGroupThunker sg = new ScriptGroupThunker(0, mRS);
      try
      {
        mN = bN.create();
      }
      catch (RSRuntimeException e)
      {
        throw ExceptionThunker.convertException(e);
      }
      return sg;
    }
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.ScriptGroupThunker
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

public class Script$Builder
{
  RenderScript mRS;
  
  Script$Builder(RenderScript rs)
  {
    mRS = rs;
  }
}

/* Location:
 * Qualified Name:     android.support.v8.renderscript.Script.Builder
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package android.support.v8.renderscript;

import android.renderscript.RSRuntimeException;

class ScriptIntrinsicBlendThunker
  extends ScriptIntrinsicBlend
{
  android.renderscript.ScriptIntrinsicBlend mN;
  
  android.renderscript.ScriptIntrinsicBlend getNObj()
  {
    return mN;
  }
  
  ScriptIntrinsicBlendThunker(int id, RenderScript rs)
  {
    super(id, rs);
  }
  
  public static ScriptIntrinsicBlendThunker create(RenderScript rs, Element e)
  {
    RenderScriptThunker rst = (RenderScriptThunker)rs;
    ElementThunker et = (ElementThunker)e;
    
    ScriptIntrinsicBlendThunker blend = new ScriptIntrinsicBlendThunker(0, rs);
    try
    {
      mN = android.renderscript.ScriptIntrinsicBlend.create(mN, et.getNObj());
    }
    catch (RSRuntimeException exc)
    {
      throw ExceptionThunker.convertException(exc);
    }
    return blend;
  }
  
  public void forEachClear(Allocation ain, Allocation aout)
  {
    AllocationThunker aint = (AllocationThunker)ain;
    AllocationThunker aoutt = (AllocationThunker)aout;
    try
    {
      mN.forEachClear(aint.getNObj(), aoutt.getNObj());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public Script.KernelID getKernelIDClear()
  {
    Script.KernelID k = createKernelID(0, 3, null, null);
    try
    {
      mN = mN.getKernelIDClear();
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
    return k;
  }
  
  public void forEachSrc(Allocation ain, Allocation aout)
  {
    AllocationThunker aint = (AllocationThunker)ain;
    AllocationThunker aoutt = (AllocationThunker)aout;
    try
    {
      mN.forEachSrc(aint.getNObj(), aoutt.getNObj());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public Script.KernelID getKernelIDSrc()
  {
    Script.KernelID k = createKernelID(1, 3, null, null);
    try
    {
      mN = mN.getKernelIDSrc();
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
    return k;
  }
  
  public void forEachDst(Allocation ain, Allocation aout)
  {
    AllocationThunker aint = (AllocationThunker)ain;
    AllocationThunker aoutt = (AllocationThunker)aout;
    try
    {
      mN.forEachDst(aint.getNObj(), aoutt.getNObj());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public Script.KernelID getKernelIDDst()
  {
    Script.KernelID k = createKernelID(2, 3, null, null);
    try
    {
      mN = mN.getKernelIDDst();
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
    return k;
  }
  
  public void forEachSrcOver(Allocation ain, Allocation aout)
  {
    AllocationThunker aint = (AllocationThunker)ain;
    AllocationThunker aoutt = (AllocationThunker)aout;
    try
    {
      mN.forEachSrcOver(aint.getNObj(), aoutt.getNObj());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public Script.KernelID getKernelIDSrcOver()
  {
    Script.KernelID k = createKernelID(3, 3, null, null);
    try
    {
      mN = mN.getKernelIDSrcOver();
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
    return k;
  }
  
  public void forEachDstOver(Allocation ain, Allocation aout)
  {
    AllocationThunker aint = (AllocationThunker)ain;
    AllocationThunker aoutt = (AllocationThunker)aout;
    try
    {
      mN.forEachDstOver(aint.getNObj(), aoutt.getNObj());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public Script.KernelID getKernelIDDstOver()
  {
    Script.KernelID k = createKernelID(4, 3, null, null);
    try
    {
      mN = mN.getKernelIDDstOver();
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
    return k;
  }
  
  public void forEachSrcIn(Allocation ain, Allocation aout)
  {
    AllocationThunker aint = (AllocationThunker)ain;
    AllocationThunker aoutt = (AllocationThunker)aout;
    try
    {
      mN.forEachSrcIn(aint.getNObj(), aoutt.getNObj());
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
  }
  
  public Script.KernelID getKernelIDSrcIn()
  {
    Script.KernelID k = createKernelID(5, 3, null, null);
    try
    {
      mN = mN.getKernelIDSrcIn();
    }
    catch (RSRuntimeException e)
    {
      throw ExceptionThunker.convertException(e);
    }
    return k;
  }
  
  public void forEachDstIn(Allocation ain, Allocation aout)
  {
    AllocationThunker aint = (AllocationThunker)ain;
    AllocationThunker aoutt = (AllocationThunker)aout;
    try
    {
      mN.forEachDstIn(aint.getNObj(), aoutt.getNObj());
    }
    catch (RSRun
1 2 3 4 5 6 7

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd