Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6b693b9 authored by Jason Sams's avatar Jason Sams Committed by Android (Google) Code Review
Browse files

Merge "unhide RS apis"

parents 647d010b 6a420b5e
Loading
Loading
Loading
Loading
+17 −0
Original line number Original line Diff line number Diff line
@@ -26924,6 +26924,10 @@ package android.renderscript {
    method public static android.renderscript.Element A_8(android.renderscript.RenderScript);
    method public static android.renderscript.Element A_8(android.renderscript.RenderScript);
    method public static android.renderscript.Element BOOLEAN(android.renderscript.RenderScript);
    method public static android.renderscript.Element BOOLEAN(android.renderscript.RenderScript);
    method public static android.renderscript.Element ELEMENT(android.renderscript.RenderScript);
    method public static android.renderscript.Element ELEMENT(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_3(android.renderscript.RenderScript);
@@ -27022,6 +27026,7 @@ package android.renderscript {
    method public static android.renderscript.Element.DataType valueOf(java.lang.String);
    method public static android.renderscript.Element.DataType valueOf(java.lang.String);
    method public static final android.renderscript.Element.DataType[] values();
    method public static final android.renderscript.Element.DataType[] values();
    enum_constant public static final android.renderscript.Element.DataType BOOLEAN;
    enum_constant public static final android.renderscript.Element.DataType BOOLEAN;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_16;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_32;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_32;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_64;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_64;
    enum_constant public static final android.renderscript.Element.DataType MATRIX_2X2;
    enum_constant public static final android.renderscript.Element.DataType MATRIX_2X2;
@@ -27295,11 +27300,14 @@ package android.renderscript {
    method public static android.renderscript.RenderScript create(android.content.Context);
    method public static android.renderscript.RenderScript create(android.content.Context);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType, int);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType, int);
    method public static android.renderscript.RenderScript createMultiContext(android.content.Context, android.renderscript.RenderScript.ContextType, int, int);
    method public void destroy();
    method public void destroy();
    method public void finish();
    method public void finish();
    method public final android.content.Context getApplicationContext();
    method public final android.content.Context getApplicationContext();
    method public android.renderscript.RenderScript.RSErrorHandler getErrorHandler();
    method public android.renderscript.RenderScript.RSErrorHandler getErrorHandler();
    method public android.renderscript.RenderScript.RSMessageHandler getMessageHandler();
    method public android.renderscript.RenderScript.RSMessageHandler getMessageHandler();
    method public static long getMinorID();
    method public static void releaseAllContexts();
    method public void sendMessage(int, int[]);
    method public void sendMessage(int, int[]);
    method public void setErrorHandler(android.renderscript.RenderScript.RSErrorHandler);
    method public void setErrorHandler(android.renderscript.RenderScript.RSErrorHandler);
    method public void setMessageHandler(android.renderscript.RenderScript.RSMessageHandler);
    method public void setMessageHandler(android.renderscript.RenderScript.RSMessageHandler);
@@ -27381,9 +27389,12 @@ package android.renderscript {
  public class Script extends android.renderscript.BaseObj {
  public class Script extends android.renderscript.BaseObj {
    method public void bindAllocation(android.renderscript.Allocation, int);
    method public void bindAllocation(android.renderscript.Allocation, int);
    method protected android.renderscript.Script.FieldID createFieldID(int, android.renderscript.Element);
    method protected android.renderscript.Script.FieldID createFieldID(int, android.renderscript.Element);
    method protected android.renderscript.Script.InvokeID createInvokeID(int);
    method protected android.renderscript.Script.KernelID createKernelID(int, int, android.renderscript.Element, android.renderscript.Element);
    method protected android.renderscript.Script.KernelID createKernelID(int, int, android.renderscript.Element, android.renderscript.Element);
    method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker);
    method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker);
    method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker, android.renderscript.Script.LaunchOptions);
    method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker, android.renderscript.Script.LaunchOptions);
    method protected void forEach(int, android.renderscript.Allocation[], android.renderscript.Allocation, android.renderscript.FieldPacker);
    method protected void forEach(int, android.renderscript.Allocation[], android.renderscript.Allocation, android.renderscript.FieldPacker, android.renderscript.Script.LaunchOptions);
    method public boolean getVarB(int);
    method public boolean getVarB(int);
    method public double getVarD(int);
    method public double getVarD(int);
    method public float getVarF(int);
    method public float getVarF(int);
@@ -27421,6 +27432,9 @@ package android.renderscript {
  public static final class Script.FieldID extends android.renderscript.BaseObj {
  public static final class Script.FieldID extends android.renderscript.BaseObj {
  }
  }
  public static final class Script.InvokeID extends android.renderscript.BaseObj {
  }
  public static final class Script.KernelID extends android.renderscript.BaseObj {
  public static final class Script.KernelID extends android.renderscript.BaseObj {
  }
  }
@@ -27631,6 +27645,8 @@ package android.renderscript {
    method public static android.renderscript.Type createX(android.renderscript.RenderScript, android.renderscript.Element, int);
    method public static android.renderscript.Type createX(android.renderscript.RenderScript, android.renderscript.Element, int);
    method public static android.renderscript.Type createXY(android.renderscript.RenderScript, android.renderscript.Element, int, int);
    method public static android.renderscript.Type createXY(android.renderscript.RenderScript, android.renderscript.Element, int, int);
    method public static android.renderscript.Type createXYZ(android.renderscript.RenderScript, android.renderscript.Element, int, int, int);
    method public static android.renderscript.Type createXYZ(android.renderscript.RenderScript, android.renderscript.Element, int, int, int);
    method public int getArray(int);
    method public int getArrayCount();
    method public int getCount();
    method public int getCount();
    method public android.renderscript.Element getElement();
    method public android.renderscript.Element getElement();
    method public int getX();
    method public int getX();
@@ -27644,6 +27660,7 @@ package android.renderscript {
  public static class Type.Builder {
  public static class Type.Builder {
    ctor public Type.Builder(android.renderscript.RenderScript, android.renderscript.Element);
    ctor public Type.Builder(android.renderscript.RenderScript, android.renderscript.Element);
    method public android.renderscript.Type create();
    method public android.renderscript.Type create();
    method public android.renderscript.Type.Builder setArray(int, int);
    method public android.renderscript.Type.Builder setFaces(boolean);
    method public android.renderscript.Type.Builder setFaces(boolean);
    method public android.renderscript.Type.Builder setMipmaps(boolean);
    method public android.renderscript.Type.Builder setMipmaps(boolean);
    method public android.renderscript.Type.Builder setX(int);
    method public android.renderscript.Type.Builder setX(int);
+17 −0
Original line number Original line Diff line number Diff line
@@ -28918,6 +28918,10 @@ package android.renderscript {
    method public static android.renderscript.Element A_8(android.renderscript.RenderScript);
    method public static android.renderscript.Element A_8(android.renderscript.RenderScript);
    method public static android.renderscript.Element BOOLEAN(android.renderscript.RenderScript);
    method public static android.renderscript.Element BOOLEAN(android.renderscript.RenderScript);
    method public static android.renderscript.Element ELEMENT(android.renderscript.RenderScript);
    method public static android.renderscript.Element ELEMENT(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_3(android.renderscript.RenderScript);
@@ -29016,6 +29020,7 @@ package android.renderscript {
    method public static android.renderscript.Element.DataType valueOf(java.lang.String);
    method public static android.renderscript.Element.DataType valueOf(java.lang.String);
    method public static final android.renderscript.Element.DataType[] values();
    method public static final android.renderscript.Element.DataType[] values();
    enum_constant public static final android.renderscript.Element.DataType BOOLEAN;
    enum_constant public static final android.renderscript.Element.DataType BOOLEAN;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_16;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_32;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_32;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_64;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_64;
    enum_constant public static final android.renderscript.Element.DataType MATRIX_2X2;
    enum_constant public static final android.renderscript.Element.DataType MATRIX_2X2;
@@ -29289,11 +29294,14 @@ package android.renderscript {
    method public static android.renderscript.RenderScript create(android.content.Context);
    method public static android.renderscript.RenderScript create(android.content.Context);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType, int);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType, int);
    method public static android.renderscript.RenderScript createMultiContext(android.content.Context, android.renderscript.RenderScript.ContextType, int, int);
    method public void destroy();
    method public void destroy();
    method public void finish();
    method public void finish();
    method public final android.content.Context getApplicationContext();
    method public final android.content.Context getApplicationContext();
    method public android.renderscript.RenderScript.RSErrorHandler getErrorHandler();
    method public android.renderscript.RenderScript.RSErrorHandler getErrorHandler();
    method public android.renderscript.RenderScript.RSMessageHandler getMessageHandler();
    method public android.renderscript.RenderScript.RSMessageHandler getMessageHandler();
    method public static long getMinorID();
    method public static void releaseAllContexts();
    method public void sendMessage(int, int[]);
    method public void sendMessage(int, int[]);
    method public void setErrorHandler(android.renderscript.RenderScript.RSErrorHandler);
    method public void setErrorHandler(android.renderscript.RenderScript.RSErrorHandler);
    method public void setMessageHandler(android.renderscript.RenderScript.RSMessageHandler);
    method public void setMessageHandler(android.renderscript.RenderScript.RSMessageHandler);
@@ -29375,9 +29383,12 @@ package android.renderscript {
  public class Script extends android.renderscript.BaseObj {
  public class Script extends android.renderscript.BaseObj {
    method public void bindAllocation(android.renderscript.Allocation, int);
    method public void bindAllocation(android.renderscript.Allocation, int);
    method protected android.renderscript.Script.FieldID createFieldID(int, android.renderscript.Element);
    method protected android.renderscript.Script.FieldID createFieldID(int, android.renderscript.Element);
    method protected android.renderscript.Script.InvokeID createInvokeID(int);
    method protected android.renderscript.Script.KernelID createKernelID(int, int, android.renderscript.Element, android.renderscript.Element);
    method protected android.renderscript.Script.KernelID createKernelID(int, int, android.renderscript.Element, android.renderscript.Element);
    method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker);
    method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker);
    method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker, android.renderscript.Script.LaunchOptions);
    method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker, android.renderscript.Script.LaunchOptions);
    method protected void forEach(int, android.renderscript.Allocation[], android.renderscript.Allocation, android.renderscript.FieldPacker);
    method protected void forEach(int, android.renderscript.Allocation[], android.renderscript.Allocation, android.renderscript.FieldPacker, android.renderscript.Script.LaunchOptions);
    method public boolean getVarB(int);
    method public boolean getVarB(int);
    method public double getVarD(int);
    method public double getVarD(int);
    method public float getVarF(int);
    method public float getVarF(int);
@@ -29415,6 +29426,9 @@ package android.renderscript {
  public static final class Script.FieldID extends android.renderscript.BaseObj {
  public static final class Script.FieldID extends android.renderscript.BaseObj {
  }
  }
  public static final class Script.InvokeID extends android.renderscript.BaseObj {
  }
  public static final class Script.KernelID extends android.renderscript.BaseObj {
  public static final class Script.KernelID extends android.renderscript.BaseObj {
  }
  }
@@ -29625,6 +29639,8 @@ package android.renderscript {
    method public static android.renderscript.Type createX(android.renderscript.RenderScript, android.renderscript.Element, int);
    method public static android.renderscript.Type createX(android.renderscript.RenderScript, android.renderscript.Element, int);
    method public static android.renderscript.Type createXY(android.renderscript.RenderScript, android.renderscript.Element, int, int);
    method public static android.renderscript.Type createXY(android.renderscript.RenderScript, android.renderscript.Element, int, int);
    method public static android.renderscript.Type createXYZ(android.renderscript.RenderScript, android.renderscript.Element, int, int, int);
    method public static android.renderscript.Type createXYZ(android.renderscript.RenderScript, android.renderscript.Element, int, int, int);
    method public int getArray(int);
    method public int getArrayCount();
    method public int getCount();
    method public int getCount();
    method public android.renderscript.Element getElement();
    method public android.renderscript.Element getElement();
    method public int getX();
    method public int getX();
@@ -29638,6 +29654,7 @@ package android.renderscript {
  public static class Type.Builder {
  public static class Type.Builder {
    ctor public Type.Builder(android.renderscript.RenderScript, android.renderscript.Element);
    ctor public Type.Builder(android.renderscript.RenderScript, android.renderscript.Element);
    method public android.renderscript.Type create();
    method public android.renderscript.Type create();
    method public android.renderscript.Type.Builder setArray(int, int);
    method public android.renderscript.Type.Builder setFaces(boolean);
    method public android.renderscript.Type.Builder setFaces(boolean);
    method public android.renderscript.Type.Builder setMipmaps(boolean);
    method public android.renderscript.Type.Builder setMipmaps(boolean);
    method public android.renderscript.Type.Builder setX(int);
    method public android.renderscript.Type.Builder setX(int);
+0 −15
Original line number Original line Diff line number Diff line
@@ -119,9 +119,6 @@ public class Element extends BaseObj {
     */
     */
    public enum DataType {
    public enum DataType {
        NONE (0, 0),
        NONE (0, 0),
        /**
         *     @hide
         */
        FLOAT_16 (1, 2),
        FLOAT_16 (1, 2),
        FLOAT_32 (2, 4),
        FLOAT_32 (2, 4),
        FLOAT_64 (3, 8),
        FLOAT_64 (3, 8),
@@ -390,9 +387,6 @@ public class Element extends BaseObj {
        return rs.mElement_I64;
        return rs.mElement_I64;
    }
    }


    /**
     *     @hide
     */
    public static Element F16(RenderScript rs) {
    public static Element F16(RenderScript rs) {
        if(rs.mElement_F16 == null) {
        if(rs.mElement_F16 == null) {
            rs.mElement_F16 = createUser(rs, DataType.FLOAT_16);
            rs.mElement_F16 = createUser(rs, DataType.FLOAT_16);
@@ -534,9 +528,6 @@ public class Element extends BaseObj {
        return rs.mElement_RGBA_8888;
        return rs.mElement_RGBA_8888;
    }
    }


    /**
     *     @hide
     */
    public static Element F16_2(RenderScript rs) {
    public static Element F16_2(RenderScript rs) {
        if(rs.mElement_HALF_2 == null) {
        if(rs.mElement_HALF_2 == null) {
            rs.mElement_HALF_2 = createVector(rs, DataType.FLOAT_16, 2);
            rs.mElement_HALF_2 = createVector(rs, DataType.FLOAT_16, 2);
@@ -544,9 +535,6 @@ public class Element extends BaseObj {
        return rs.mElement_HALF_2;
        return rs.mElement_HALF_2;
    }
    }


    /**
     *     @hide
     */
    public static Element F16_3(RenderScript rs) {
    public static Element F16_3(RenderScript rs) {
        if(rs.mElement_FLOAT_3 == null) {
        if(rs.mElement_FLOAT_3 == null) {
            rs.mElement_FLOAT_3 = createVector(rs, DataType.FLOAT_16, 3);
            rs.mElement_FLOAT_3 = createVector(rs, DataType.FLOAT_16, 3);
@@ -554,9 +542,6 @@ public class Element extends BaseObj {
        return rs.mElement_HALF_3;
        return rs.mElement_HALF_3;
    }
    }


    /**
     *     @hide
     */
    public static Element F16_4(RenderScript rs) {
    public static Element F16_4(RenderScript rs) {
        if(rs.mElement_HALF_4 == null) {
        if(rs.mElement_HALF_4 == null) {
            rs.mElement_HALF_4 = createVector(rs, DataType.FLOAT_16, 4);
            rs.mElement_HALF_4 = createVector(rs, DataType.FLOAT_16, 4);
+3 −7
Original line number Original line Diff line number Diff line
@@ -139,7 +139,8 @@ public class RenderScript {
     * Returns an identifier that can be used to identify a particular
     * Returns an identifier that can be used to identify a particular
     * minor version of RS.
     * minor version of RS.
     *
     *
     * @hide
     * @return The minor RenderScript version number
     *
     */
     */
    public static long getMinorID() {
    public static long getMinorID() {
        return sMinorID;
        return sMinorID;
@@ -1321,7 +1322,6 @@ public class RenderScript {
    /**
    /**
     * Create a RenderScript context.
     * Create a RenderScript context.
     *
     *
     * @hide
     * @param ctx The context.
     * @param ctx The context.
     * @return RenderScript
     * @return RenderScript
     */
     */
@@ -1418,14 +1418,13 @@ public class RenderScript {
     /**
     /**
     * Gets or creates a RenderScript context of the specified type.
     * Gets or creates a RenderScript context of the specified type.
     *
     *
     * @hide
     * @param ctx The context.
     * @param ctx The context.
     * @param ct The type of context to be created.
     * @param ct The type of context to be created.
     * @param sdkVersion The target SDK Version.
     * @param sdkVersion The target SDK Version.
     * @param flags The OR of the CREATE_FLAG_* options desired
     * @param flags The OR of the CREATE_FLAG_* options desired
     * @return RenderScript
     * @return RenderScript
     */
     */
    public static RenderScript create(Context ctx, int sdkVersion, ContextType ct, int flags) {
    private static RenderScript create(Context ctx, int sdkVersion, ContextType ct, int flags) {
        if (sdkVersion < 23) {
        if (sdkVersion < 23) {
            return internalCreate(ctx, sdkVersion, ct, flags);
            return internalCreate(ctx, sdkVersion, ct, flags);
        }
        }
@@ -1448,8 +1447,6 @@ public class RenderScript {
    }
    }


    /**
    /**
     * @hide
     *
     * Releases all the process contexts.  This is the same as
     * Releases all the process contexts.  This is the same as
     * calling .destroy() on each unique context retreived with
     * calling .destroy() on each unique context retreived with
     * create(...). If no contexts have been created this
     * create(...). If no contexts have been created this
@@ -1486,7 +1483,6 @@ public class RenderScript {
     *
     *
     * If you need a single context please use create()
     * If you need a single context please use create()
     *
     *
     * @hide
     * @param ctx The context.
     * @param ctx The context.
     * @return RenderScript
     * @return RenderScript
     */
     */
+3 −6
Original line number Original line Diff line number Diff line
@@ -66,7 +66,6 @@ public class Script extends BaseObj {
    }
    }


    /**
    /**
     * @hide Pending API review
     * InvokeID is an identifier for an invoke function. It is used
     * InvokeID is an identifier for an invoke function. It is used
     * as an identifier for ScriptGroup creation.
     * as an identifier for ScriptGroup creation.
     *
     *
@@ -86,7 +85,6 @@ public class Script extends BaseObj {


    private final SparseArray<InvokeID> mIIDs = new SparseArray<InvokeID>();
    private final SparseArray<InvokeID> mIIDs = new SparseArray<InvokeID>();
    /**
    /**
     * @hide Pending API review
     * Only to be used by generated reflected classes.
     * Only to be used by generated reflected classes.
     */
     */
    protected InvokeID createInvokeID(int slot) {
    protected InvokeID createInvokeID(int slot) {
@@ -222,22 +220,21 @@ public class Script extends BaseObj {


    /**
    /**
     * Only intended for use by generated reflected code.
     * Only intended for use by generated reflected code.
     *
     * @hide
     */
     */
    protected void forEach(int slot, Allocation[] ains, Allocation aout,
    protected void forEach(int slot, Allocation[] ains, Allocation aout,
                           FieldPacker v) {
                           FieldPacker v) {

        // FieldPacker is kept here to support regular params in the future.
        forEach(slot, ains, aout, v, null);
        forEach(slot, ains, aout, v, null);
    }
    }


    /**
    /**
     * Only intended for use by generated reflected code.
     * Only intended for use by generated reflected code.
     *
     * @hide
     */
     */
    protected void forEach(int slot, Allocation[] ains, Allocation aout,
    protected void forEach(int slot, Allocation[] ains, Allocation aout,
                           FieldPacker v, LaunchOptions sc) {
                           FieldPacker v, LaunchOptions sc) {
        // TODO: Is this necessary if nScriptForEach calls validate as well?
        // TODO: Is this necessary if nScriptForEach calls validate as well?
        // FieldPacker is kept here to support regular params in the future.
        mRS.validate();
        mRS.validate();
        if (ains != null) {
        if (ains != null) {
            for (Allocation ain : ains) {
            for (Allocation ain : ains) {
Loading