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

Commit 7054b486 authored by Dave Burke's avatar Dave Burke Committed by Android Git Automerger
Browse files

am 7156645c: am 2ed09ea4: Merge "GFX api cleanup 2 of 2" into jb-dev

* commit '7156645c':
  GFX api cleanup 2 of 2
parents 455af7f7 7156645c
Loading
Loading
Loading
Loading
+81 −81
Original line number Diff line number Diff line
@@ -19088,12 +19088,12 @@ package android.renderscript {
    method public void transpose();
  }
  public class Mesh extends android.renderscript.BaseObj {
    method public android.renderscript.Allocation getIndexSetAllocation(int);
    method public android.renderscript.Mesh.Primitive getPrimitive(int);
    method public int getPrimitiveCount();
    method public android.renderscript.Allocation getVertexAllocation(int);
    method public int getVertexAllocationCount();
  public deprecated class Mesh extends android.renderscript.BaseObj {
    method public deprecated android.renderscript.Allocation getIndexSetAllocation(int);
    method public deprecated android.renderscript.Mesh.Primitive getPrimitive(int);
    method public deprecated int getPrimitiveCount();
    method public deprecated android.renderscript.Allocation getVertexAllocation(int);
    method public deprecated int getVertexAllocationCount();
  }
  public static deprecated class Mesh.AllocationBuilder {
@@ -19106,27 +19106,27 @@ package android.renderscript {
    method public deprecated int getCurrentVertexTypeIndex();
  }
  public static class Mesh.Builder {
    ctor public Mesh.Builder(android.renderscript.RenderScript, int);
    method public android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Type, android.renderscript.Mesh.Primitive);
    method public android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Mesh.Primitive);
    method public android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Element, int, android.renderscript.Mesh.Primitive);
    method public android.renderscript.Mesh.Builder addVertexType(android.renderscript.Type) throws java.lang.IllegalStateException;
    method public android.renderscript.Mesh.Builder addVertexType(android.renderscript.Element, int) throws java.lang.IllegalStateException;
    method public android.renderscript.Mesh create();
    method public int getCurrentIndexSetIndex();
    method public int getCurrentVertexTypeIndex();
  public static deprecated class Mesh.Builder {
    ctor public deprecated Mesh.Builder(android.renderscript.RenderScript, int);
    method public deprecated android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Type, android.renderscript.Mesh.Primitive);
    method public deprecated android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Mesh.Primitive);
    method public deprecated android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Element, int, android.renderscript.Mesh.Primitive);
    method public deprecated android.renderscript.Mesh.Builder addVertexType(android.renderscript.Type) throws java.lang.IllegalStateException;
    method public deprecated android.renderscript.Mesh.Builder addVertexType(android.renderscript.Element, int) throws java.lang.IllegalStateException;
    method public deprecated android.renderscript.Mesh create();
    method public deprecated int getCurrentIndexSetIndex();
    method public deprecated int getCurrentVertexTypeIndex();
  }
  public static final class Mesh.Primitive extends java.lang.Enum {
  public static final deprecated class Mesh.Primitive extends java.lang.Enum {
    method public static android.renderscript.Mesh.Primitive valueOf(java.lang.String);
    method public static final android.renderscript.Mesh.Primitive[] values();
    enum_constant public static final android.renderscript.Mesh.Primitive LINE;
    enum_constant public static final android.renderscript.Mesh.Primitive LINE_STRIP;
    enum_constant public static final android.renderscript.Mesh.Primitive POINT;
    enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE;
    enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE_FAN;
    enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE_STRIP;
    enum_constant public static final deprecated android.renderscript.Mesh.Primitive LINE;
    enum_constant public static final deprecated android.renderscript.Mesh.Primitive LINE_STRIP;
    enum_constant public static final deprecated android.renderscript.Mesh.Primitive POINT;
    enum_constant public static final deprecated android.renderscript.Mesh.Primitive TRIANGLE;
    enum_constant public static final deprecated android.renderscript.Mesh.Primitive TRIANGLE_FAN;
    enum_constant public static final deprecated android.renderscript.Mesh.Primitive TRIANGLE_STRIP;
  }
  public static deprecated class Mesh.TriangleMeshBuilder {
@@ -19173,12 +19173,12 @@ package android.renderscript {
    enum_constant public static final android.renderscript.Program.TextureType TEXTURE_CUBE;
  }
  public class ProgramFragment extends android.renderscript.Program {
  public deprecated class ProgramFragment extends android.renderscript.Program {
  }
  public static class ProgramFragment.Builder extends android.renderscript.Program.BaseProgramBuilder {
    ctor public ProgramFragment.Builder(android.renderscript.RenderScript);
    method public android.renderscript.ProgramFragment create();
  public static deprecated class ProgramFragment.Builder extends android.renderscript.Program.BaseProgramBuilder {
    ctor public deprecated ProgramFragment.Builder(android.renderscript.RenderScript);
    method public deprecated android.renderscript.ProgramFragment create();
  }
  public deprecated class ProgramFragmentFixedFunction extends android.renderscript.ProgramFragment {
@@ -19210,27 +19210,27 @@ package android.renderscript {
    enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGBA;
  }
  public class ProgramRaster extends android.renderscript.BaseObj {
    method public static android.renderscript.ProgramRaster CULL_BACK(android.renderscript.RenderScript);
    method public static android.renderscript.ProgramRaster CULL_FRONT(android.renderscript.RenderScript);
    method public static android.renderscript.ProgramRaster CULL_NONE(android.renderscript.RenderScript);
    method public android.renderscript.ProgramRaster.CullMode getCullMode();
    method public boolean isPointSpriteEnabled();
  public deprecated class ProgramRaster extends android.renderscript.BaseObj {
    method public static deprecated android.renderscript.ProgramRaster CULL_BACK(android.renderscript.RenderScript);
    method public static deprecated android.renderscript.ProgramRaster CULL_FRONT(android.renderscript.RenderScript);
    method public static deprecated android.renderscript.ProgramRaster CULL_NONE(android.renderscript.RenderScript);
    method public deprecated android.renderscript.ProgramRaster.CullMode getCullMode();
    method public deprecated boolean isPointSpriteEnabled();
  }
  public static class ProgramRaster.Builder {
    ctor public ProgramRaster.Builder(android.renderscript.RenderScript);
    method public android.renderscript.ProgramRaster create();
    method public android.renderscript.ProgramRaster.Builder setCullMode(android.renderscript.ProgramRaster.CullMode);
    method public android.renderscript.ProgramRaster.Builder setPointSpriteEnabled(boolean);
  public static deprecated class ProgramRaster.Builder {
    ctor public deprecated ProgramRaster.Builder(android.renderscript.RenderScript);
    method public deprecated android.renderscript.ProgramRaster create();
    method public deprecated android.renderscript.ProgramRaster.Builder setCullMode(android.renderscript.ProgramRaster.CullMode);
    method public deprecated android.renderscript.ProgramRaster.Builder setPointSpriteEnabled(boolean);
  }
  public static final class ProgramRaster.CullMode extends java.lang.Enum {
  public static final deprecated class ProgramRaster.CullMode extends java.lang.Enum {
    method public static android.renderscript.ProgramRaster.CullMode valueOf(java.lang.String);
    method public static final android.renderscript.ProgramRaster.CullMode[] values();
    enum_constant public static final android.renderscript.ProgramRaster.CullMode BACK;
    enum_constant public static final android.renderscript.ProgramRaster.CullMode FRONT;
    enum_constant public static final android.renderscript.ProgramRaster.CullMode NONE;
    enum_constant public static final deprecated android.renderscript.ProgramRaster.CullMode BACK;
    enum_constant public static final deprecated android.renderscript.ProgramRaster.CullMode FRONT;
    enum_constant public static final deprecated android.renderscript.ProgramRaster.CullMode NONE;
  }
  public class ProgramStore extends android.renderscript.BaseObj {
@@ -19298,15 +19298,15 @@ package android.renderscript {
    enum_constant public static final android.renderscript.ProgramStore.DepthFunc NOT_EQUAL;
  }
  public class ProgramVertex extends android.renderscript.Program {
    method public android.renderscript.Element getInput(int);
    method public int getInputCount();
  public deprecated class ProgramVertex extends android.renderscript.Program {
    method public deprecated android.renderscript.Element getInput(int);
    method public deprecated int getInputCount();
  }
  public static class ProgramVertex.Builder extends android.renderscript.Program.BaseProgramBuilder {
    ctor public ProgramVertex.Builder(android.renderscript.RenderScript);
    method public android.renderscript.ProgramVertex.Builder addInput(android.renderscript.Element) throws java.lang.IllegalStateException;
    method public android.renderscript.ProgramVertex create();
  public static deprecated class ProgramVertex.Builder extends android.renderscript.Program.BaseProgramBuilder {
    ctor public deprecated ProgramVertex.Builder(android.renderscript.RenderScript);
    method public deprecated android.renderscript.ProgramVertex.Builder addInput(android.renderscript.Element) throws java.lang.IllegalStateException;
    method public deprecated android.renderscript.ProgramVertex create();
  }
  public deprecated class ProgramVertexFixedFunction extends android.renderscript.ProgramVertex {
@@ -19357,19 +19357,19 @@ package android.renderscript {
    method public deprecated void surfaceDestroyed(android.view.SurfaceHolder);
  }
  public class RSTextureView extends android.view.TextureView implements android.view.TextureView.SurfaceTextureListener {
    ctor public RSTextureView(android.content.Context);
    ctor public RSTextureView(android.content.Context, android.util.AttributeSet);
    method public android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
    method public void destroyRenderScriptGL();
    method public android.renderscript.RenderScriptGL getRenderScriptGL();
    method public void onSurfaceTextureAvailable(android.graphics.SurfaceTexture, int, int);
    method public boolean onSurfaceTextureDestroyed(android.graphics.SurfaceTexture);
    method public void onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture, int, int);
    method public void onSurfaceTextureUpdated(android.graphics.SurfaceTexture);
    method public void pause();
    method public void resume();
    method public void setRenderScriptGL(android.renderscript.RenderScriptGL);
  public deprecated class RSTextureView extends android.view.TextureView implements android.view.TextureView.SurfaceTextureListener {
    ctor public deprecated RSTextureView(android.content.Context);
    ctor public deprecated RSTextureView(android.content.Context, android.util.AttributeSet);
    method public deprecated android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
    method public deprecated void destroyRenderScriptGL();
    method public deprecated android.renderscript.RenderScriptGL getRenderScriptGL();
    method public deprecated void onSurfaceTextureAvailable(android.graphics.SurfaceTexture, int, int);
    method public deprecated boolean onSurfaceTextureDestroyed(android.graphics.SurfaceTexture);
    method public deprecated void onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture, int, int);
    method public deprecated void onSurfaceTextureUpdated(android.graphics.SurfaceTexture);
    method public deprecated void pause();
    method public deprecated void resume();
    method public deprecated void setRenderScriptGL(android.renderscript.RenderScriptGL);
  }
  public class RenderScript {
@@ -19407,28 +19407,28 @@ package android.renderscript {
    field protected int mLength;
  }
  public class RenderScriptGL extends android.renderscript.RenderScript {
    ctor public RenderScriptGL(android.content.Context, android.renderscript.RenderScriptGL.SurfaceConfig);
    method public void bindProgramFragment(android.renderscript.ProgramFragment);
    method public void bindProgramRaster(android.renderscript.ProgramRaster);
    method public void bindProgramStore(android.renderscript.ProgramStore);
    method public void bindProgramVertex(android.renderscript.ProgramVertex);
    method public void bindRootScript(android.renderscript.Script);
    method public int getHeight();
    method public int getWidth();
    method public void pause();
    method public void resume();
    method public void setSurface(android.view.SurfaceHolder, int, int);
  public deprecated class RenderScriptGL extends android.renderscript.RenderScript {
    ctor public deprecated RenderScriptGL(android.content.Context, android.renderscript.RenderScriptGL.SurfaceConfig);
    method public deprecated void bindProgramFragment(android.renderscript.ProgramFragment);
    method public deprecated void bindProgramRaster(android.renderscript.ProgramRaster);
    method public deprecated void bindProgramStore(android.renderscript.ProgramStore);
    method public deprecated void bindProgramVertex(android.renderscript.ProgramVertex);
    method public deprecated void bindRootScript(android.renderscript.Script);
    method public deprecated int getHeight();
    method public deprecated int getWidth();
    method public deprecated void pause();
    method public deprecated void resume();
    method public deprecated void setSurface(android.view.SurfaceHolder, int, int);
    method public deprecated void setSurfaceTexture(android.graphics.SurfaceTexture, int, int);
  }
  public static class RenderScriptGL.SurfaceConfig {
    ctor public RenderScriptGL.SurfaceConfig();
    ctor public RenderScriptGL.SurfaceConfig(android.renderscript.RenderScriptGL.SurfaceConfig);
    method public void setAlpha(int, int);
    method public void setColor(int, int);
    method public void setDepth(int, int);
    method public void setSamples(int, int, float);
  public static deprecated class RenderScriptGL.SurfaceConfig {
    ctor public deprecated RenderScriptGL.SurfaceConfig();
    ctor public deprecated RenderScriptGL.SurfaceConfig(android.renderscript.RenderScriptGL.SurfaceConfig);
    method public deprecated void setAlpha(int, int);
    method public deprecated void setColor(int, int);
    method public deprecated void setDepth(int, int);
    method public deprecated void setSamples(int, int, float);
  }
  public class Sampler extends android.renderscript.BaseObj {
+23 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import java.util.Vector;
import android.util.Log;

/**
 * @deprecated in API 16
 * <p>This class is a container for geometric data displayed with
 * Renderscript. Internally, a mesh is a collection of allocations that
 * represent vertex data (positions, normals, texture
@@ -40,33 +41,40 @@ import android.util.Log;
public class Mesh extends BaseObj {

    /**
    * @deprecated in API 16
    * Describes the way mesh vertex data is interpreted when rendering
    *
    **/
    public enum Primitive {
        /**
        * @deprecated in API 16
        * Vertex data will be rendered as a series of points
        */
        POINT (0),
        /**
        * @deprecated in API 16
        * Vertex pairs will be rendered as lines
        */
        LINE (1),
        /**
        * @deprecated in API 16
        * Vertex data will be rendered as a connected line strip
        */
        LINE_STRIP (2),
        /**
        * @deprecated in API 16
        * Vertices will be rendered as individual triangles
        */
        TRIANGLE (3),
        /**
        * @deprecated in API 16
        * Vertices will be rendered as a connected triangle strip
        * defined by the first three vertices with each additional
        * triangle defined by a new vertex
        */
        TRIANGLE_STRIP (4),
        /**
        * @deprecated in API 16
        * Vertices will be rendered as a sequence of triangles that all
        * share first vertex as the origin
        */
@@ -87,6 +95,7 @@ public class Mesh extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * @return number of allocations containing vertex data
    *
    **/
@@ -97,6 +106,7 @@ public class Mesh extends BaseObj {
        return mVertexBuffers.length;
    }
    /**
    * @deprecated in API 16
    * @param slot index in the list of allocations to return
    * @return vertex data allocation at the given index
    *
@@ -106,6 +116,7 @@ public class Mesh extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * @return number of primitives or index sets in the mesh
    *
    **/
@@ -117,6 +128,7 @@ public class Mesh extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * @param slot locaton within the list of index set allocation
    * @return allocation containing primtive index data or null if
    *         the index data is not specified explicitly
@@ -126,6 +138,7 @@ public class Mesh extends BaseObj {
        return mIndexBuffers[slot];
    }
    /**
    * @deprecated in API 16
    * @param slot locaiton within the list of index set primitives
    * @return index set primitive type
    *
@@ -168,6 +181,7 @@ public class Mesh extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * Mesh builder object. It starts empty and requires you to
    * add the types necessary to create vertex and index
    * allocations.
@@ -190,6 +204,7 @@ public class Mesh extends BaseObj {
        Vector mIndexTypes;

        /**
        * @deprecated in API 16
        * Creates builder object
        * @param rs Context to which the mesh will belong.
        * @param usage specifies how the mesh allocations are to be
@@ -205,6 +220,7 @@ public class Mesh extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * @return internal index of the last vertex buffer type added to
        *         builder
        **/
@@ -213,6 +229,7 @@ public class Mesh extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * @return internal index of the last index set added to the
        *         builder
        **/
@@ -221,6 +238,7 @@ public class Mesh extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * Adds a vertex data type to the builder object
        *
        * @param t type of the vertex data allocation to be created
@@ -240,6 +258,7 @@ public class Mesh extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * Adds a vertex data type to the builder object
        *
        * @param e element describing the vertex data layout
@@ -261,6 +280,7 @@ public class Mesh extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * Adds an index set data type to the builder object
        *
        * @param t type of the index set data, could be null
@@ -279,6 +299,7 @@ public class Mesh extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * Adds an index set primitive type to the builder object
        *
        * @param p primitive type
@@ -296,6 +317,7 @@ public class Mesh extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * Adds an index set data type to the builder object
        *
        * @param e element describing the index set data layout
@@ -321,6 +343,7 @@ public class Mesh extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * Create a Mesh object from the current state of the builder
        *
        **/
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.util.Log;


/**
 * @deprecated in API 16
 * <p>The Renderscript fragment program, also known as fragment shader is responsible
 * for manipulating pixel data in a user defined way. It's constructed from a GLSL
 * shader string containing the program body, textures inputs, and a Type object
@@ -41,8 +42,12 @@ public class ProgramFragment extends Program {
        super(id, rs);
    }

    /**
     * @deprecated in API 16
     */
    public static class Builder extends BaseProgramBuilder {
        /**
         * @deprecated in API 16
         * Create a builder object.
         *
         * @param rs Context to which the program will belong.
@@ -52,6 +57,7 @@ public class ProgramFragment extends Program {
        }

        /**
         * @deprecated in API 16
         * Creates ProgramFragment from the current state of the builder
         *
         * @return  ProgramFragment
+39 −0
Original line number Diff line number Diff line
@@ -21,14 +21,27 @@ import android.util.Log;


/**
 * @deprecated in API 16
 * Program raster is primarily used to specify whether point sprites are enabled and to control
 * the culling mode. By default, back faces are culled.
 **/
public class ProgramRaster extends BaseObj {

    /**
     * @deprecated in API 16
     **/
    public enum CullMode {
        /**
         * @deprecated in API 16
         **/
        BACK (0),
        /**
         * @deprecated in API 16
         **/
        FRONT (1),
        /**
         * @deprecated in API 16
         **/
        NONE (2);

        int mID;
@@ -48,6 +61,7 @@ public class ProgramRaster extends BaseObj {
    }

    /**
     * @deprecated in API 16
     * Specifies whether vertices are rendered as screen aligned
     * elements of a specified size
     * @return whether point sprites are enabled
@@ -57,6 +71,7 @@ public class ProgramRaster extends BaseObj {
    }

    /**
     * @deprecated in API 16
     * Specifies how triangles are culled based on their orientation
     * @return cull mode
     */
@@ -64,6 +79,9 @@ public class ProgramRaster extends BaseObj {
        return mCullMode;
    }

    /**
     * @deprecated in API 16
     */
    public static ProgramRaster CULL_BACK(RenderScript rs) {
        if(rs.mProgramRaster_CULL_BACK == null) {
            ProgramRaster.Builder builder = new ProgramRaster.Builder(rs);
@@ -73,6 +91,9 @@ public class ProgramRaster extends BaseObj {
        return rs.mProgramRaster_CULL_BACK;
    }

    /**
     * @deprecated in API 16
     */
    public static ProgramRaster CULL_FRONT(RenderScript rs) {
        if(rs.mProgramRaster_CULL_FRONT == null) {
            ProgramRaster.Builder builder = new ProgramRaster.Builder(rs);
@@ -82,6 +103,9 @@ public class ProgramRaster extends BaseObj {
        return rs.mProgramRaster_CULL_FRONT;
    }

    /**
     * @deprecated in API 16
     */
    public static ProgramRaster CULL_NONE(RenderScript rs) {
        if(rs.mProgramRaster_CULL_NONE == null) {
            ProgramRaster.Builder builder = new ProgramRaster.Builder(rs);
@@ -91,27 +115,42 @@ public class ProgramRaster extends BaseObj {
        return rs.mProgramRaster_CULL_NONE;
    }

    /**
     * @deprecated in API 16
     */
    public static class Builder {
        RenderScript mRS;
        boolean mPointSprite;
        CullMode mCullMode;

        /**
         * @deprecated in API 16
         */
        public Builder(RenderScript rs) {
            mRS = rs;
            mPointSprite = false;
            mCullMode = CullMode.BACK;
        }

        /**
         * @deprecated in API 16
         */
        public Builder setPointSpriteEnabled(boolean enable) {
            mPointSprite = enable;
            return this;
        }

        /**
         * @deprecated in API 16
         */
        public Builder setCullMode(CullMode m) {
            mCullMode = m;
            return this;
        }

        /**
         * @deprecated in API 16
         */
        public ProgramRaster create() {
            mRS.validate();
            int id = mRS.nProgramRasterCreate(mPointSprite, mCullMode.mID);
+7 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import android.util.Log;


/**
 * @deprecated in API 16
 * ProgramVertex, also know as a vertex shader, describes a
 * stage in the graphics pipeline responsible for manipulating
 * geometric data in a user-defined way.
@@ -55,6 +56,7 @@ public class ProgramVertex extends Program {
    }

    /**
     * @deprecated in API 16
     * @return number of input attribute elements
     */
    public int getInputCount() {
@@ -62,6 +64,7 @@ public class ProgramVertex extends Program {
    }

    /**
     * @deprecated in API 16
     * @param slot location of the input to return
     * @return input attribute element
     */
@@ -73,6 +76,7 @@ public class ProgramVertex extends Program {
    }

    /**
    * @deprecated in API 16
    * Builder class for creating ProgramVertex objects.
    * The builder starts empty and the user must minimally provide
    * the GLSL shader code, and the varying inputs. Constant, or
@@ -82,6 +86,7 @@ public class ProgramVertex extends Program {
    **/
    public static class Builder extends BaseProgramBuilder {
        /**
         * @deprecated in API 16
         * Create a builder object.
         *
         * @param rs Context to which the program will belong.
@@ -91,6 +96,7 @@ public class ProgramVertex extends Program {
        }

        /**
         * @deprecated in API 16
         * Add varying inputs to the program
         *
         * @param e element describing the layout of the varying input
@@ -110,6 +116,7 @@ public class ProgramVertex extends Program {
        }

        /**
         * @deprecated in API 16
         * Creates ProgramVertex from the current state of the builder
         *
         * @return  ProgramVertex
Loading