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

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

Merge "GFX api cleanup 1 of 2" into jb-dev

parents a4e2ec64 65c80f82
Loading
Loading
Loading
Loading
+56 −56
Original line number Diff line number Diff line
@@ -18753,7 +18753,7 @@ package android.renderscript {
    method public static android.renderscript.Element I8_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element I8_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element I8_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element MATRIX4X4(android.renderscript.RenderScript);
    method public static deprecated android.renderscript.Element MATRIX4X4(android.renderscript.RenderScript);
    method public static android.renderscript.Element MATRIX_2X2(android.renderscript.RenderScript);
    method public static android.renderscript.Element MATRIX_3X3(android.renderscript.RenderScript);
    method public static android.renderscript.Element MATRIX_4X4(android.renderscript.RenderScript);
@@ -18908,27 +18908,27 @@ package android.renderscript {
    method public void skip(int);
  }
  public class FileA3D extends android.renderscript.BaseObj {
    method public static android.renderscript.FileA3D createFromAsset(android.renderscript.RenderScript, android.content.res.AssetManager, java.lang.String);
    method public static android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.lang.String);
    method public static android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.io.File);
    method public static android.renderscript.FileA3D createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int);
    method public android.renderscript.FileA3D.IndexEntry getIndexEntry(int);
    method public int getIndexEntryCount();
  public deprecated class FileA3D extends android.renderscript.BaseObj {
    method public static deprecated android.renderscript.FileA3D createFromAsset(android.renderscript.RenderScript, android.content.res.AssetManager, java.lang.String);
    method public static deprecated android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.lang.String);
    method public static deprecated android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.io.File);
    method public static deprecated android.renderscript.FileA3D createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int);
    method public deprecated android.renderscript.FileA3D.IndexEntry getIndexEntry(int);
    method public deprecated int getIndexEntryCount();
  }
  public static final class FileA3D.EntryType extends java.lang.Enum {
  public static final deprecated class FileA3D.EntryType extends java.lang.Enum {
    method public static android.renderscript.FileA3D.EntryType valueOf(java.lang.String);
    method public static final android.renderscript.FileA3D.EntryType[] values();
    enum_constant public static final android.renderscript.FileA3D.EntryType MESH;
    enum_constant public static final android.renderscript.FileA3D.EntryType UNKNOWN;
    enum_constant public static final deprecated android.renderscript.FileA3D.EntryType MESH;
    enum_constant public static final deprecated android.renderscript.FileA3D.EntryType UNKNOWN;
  }
  public static class FileA3D.IndexEntry {
    method public android.renderscript.FileA3D.EntryType getEntryType();
    method public android.renderscript.Mesh getMesh();
    method public java.lang.String getName();
    method public android.renderscript.BaseObj getObject();
  public static deprecated class FileA3D.IndexEntry {
    method public deprecated android.renderscript.FileA3D.EntryType getEntryType();
    method public deprecated android.renderscript.Mesh getMesh();
    method public deprecated java.lang.String getName();
    method public deprecated android.renderscript.BaseObj getObject();
  }
  public class Float2 {
@@ -18955,21 +18955,21 @@ package android.renderscript {
    field public float z;
  }
  public class Font extends android.renderscript.BaseObj {
    method public static android.renderscript.Font create(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, android.renderscript.Font.Style, float);
    method public static android.renderscript.Font createFromAsset(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
    method public static android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
    method public static android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.io.File, float);
    method public static android.renderscript.Font createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int, float);
  public deprecated class Font extends android.renderscript.BaseObj {
    method public static deprecated android.renderscript.Font create(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, android.renderscript.Font.Style, float);
    method public static deprecated android.renderscript.Font createFromAsset(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
    method public static deprecated android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
    method public static deprecated android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.io.File, float);
    method public static deprecated android.renderscript.Font createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int, float);
  }
  public static final class Font.Style extends java.lang.Enum {
  public static final deprecated class Font.Style extends java.lang.Enum {
    method public static android.renderscript.Font.Style valueOf(java.lang.String);
    method public static final android.renderscript.Font.Style[] values();
    enum_constant public static final android.renderscript.Font.Style BOLD;
    enum_constant public static final android.renderscript.Font.Style BOLD_ITALIC;
    enum_constant public static final android.renderscript.Font.Style ITALIC;
    enum_constant public static final android.renderscript.Font.Style NORMAL;
    enum_constant public static final deprecated android.renderscript.Font.Style BOLD;
    enum_constant public static final deprecated android.renderscript.Font.Style BOLD_ITALIC;
    enum_constant public static final deprecated android.renderscript.Font.Style ITALIC;
    enum_constant public static final deprecated android.renderscript.Font.Style NORMAL;
  }
  public class Int2 {
@@ -19179,33 +19179,33 @@ package android.renderscript {
    method public android.renderscript.ProgramFragment create();
  }
  public class ProgramFragmentFixedFunction extends android.renderscript.ProgramFragment {
  public deprecated class ProgramFragmentFixedFunction extends android.renderscript.ProgramFragment {
  }
  public static class ProgramFragmentFixedFunction.Builder {
    ctor public ProgramFragmentFixedFunction.Builder(android.renderscript.RenderScript);
    method public android.renderscript.ProgramFragmentFixedFunction create();
    method public android.renderscript.ProgramFragmentFixedFunction.Builder setPointSpriteTexCoordinateReplacement(boolean);
    method public android.renderscript.ProgramFragmentFixedFunction.Builder setTexture(android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode, android.renderscript.ProgramFragmentFixedFunction.Builder.Format, int) throws java.lang.IllegalArgumentException;
    method public android.renderscript.ProgramFragmentFixedFunction.Builder setVaryingColor(boolean);
    field public static final int MAX_TEXTURE = 2; // 0x2
  public static deprecated class ProgramFragmentFixedFunction.Builder {
    ctor public deprecated ProgramFragmentFixedFunction.Builder(android.renderscript.RenderScript);
    method public deprecated android.renderscript.ProgramFragmentFixedFunction create();
    method public deprecated android.renderscript.ProgramFragmentFixedFunction.Builder setPointSpriteTexCoordinateReplacement(boolean);
    method public deprecated android.renderscript.ProgramFragmentFixedFunction.Builder setTexture(android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode, android.renderscript.ProgramFragmentFixedFunction.Builder.Format, int) throws java.lang.IllegalArgumentException;
    method public deprecated android.renderscript.ProgramFragmentFixedFunction.Builder setVaryingColor(boolean);
    field public static final deprecated int MAX_TEXTURE = 2; // 0x2
  }
  public static final class ProgramFragmentFixedFunction.Builder.EnvMode extends java.lang.Enum {
  public static final deprecated class ProgramFragmentFixedFunction.Builder.EnvMode extends java.lang.Enum {
    method public static android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode valueOf(java.lang.String);
    method public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode[] values();
    enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode DECAL;
    enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode MODULATE;
    enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode REPLACE;
    enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode DECAL;
    enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode MODULATE;
    enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode REPLACE;
  }
  public static final class ProgramFragmentFixedFunction.Builder.Format extends java.lang.Enum {
  public static final deprecated class ProgramFragmentFixedFunction.Builder.Format extends java.lang.Enum {
    method public static android.renderscript.ProgramFragmentFixedFunction.Builder.Format valueOf(java.lang.String);
    method public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format[] values();
    enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format ALPHA;
    enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format LUMINANCE_ALPHA;
    enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGB;
    enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGBA;
    enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format ALPHA;
    enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format LUMINANCE_ALPHA;
    enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGB;
    enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGBA;
  }
  public class ProgramRaster extends android.renderscript.BaseObj {
@@ -19307,22 +19307,22 @@ package android.renderscript {
    method public android.renderscript.ProgramVertex create();
  }
  public class ProgramVertexFixedFunction extends android.renderscript.ProgramVertex {
    method public void bindConstants(android.renderscript.ProgramVertexFixedFunction.Constants);
  public deprecated class ProgramVertexFixedFunction extends android.renderscript.ProgramVertex {
    method public deprecated void bindConstants(android.renderscript.ProgramVertexFixedFunction.Constants);
  }
  public static class ProgramVertexFixedFunction.Builder {
    ctor public ProgramVertexFixedFunction.Builder(android.renderscript.RenderScript);
    method public android.renderscript.ProgramVertexFixedFunction create();
    method public android.renderscript.ProgramVertexFixedFunction.Builder setTextureMatrixEnable(boolean);
  public static deprecated class ProgramVertexFixedFunction.Builder {
    ctor public deprecated ProgramVertexFixedFunction.Builder(android.renderscript.RenderScript);
    method public deprecated android.renderscript.ProgramVertexFixedFunction create();
    method public deprecated android.renderscript.ProgramVertexFixedFunction.Builder setTextureMatrixEnable(boolean);
  }
  public static class ProgramVertexFixedFunction.Constants {
    ctor public ProgramVertexFixedFunction.Constants(android.renderscript.RenderScript);
    method public void destroy();
    method public void setModelview(android.renderscript.Matrix4f);
    method public void setProjection(android.renderscript.Matrix4f);
    method public void setTexture(android.renderscript.Matrix4f);
  public static deprecated class ProgramVertexFixedFunction.Constants {
    ctor public deprecated ProgramVertexFixedFunction.Constants(android.renderscript.RenderScript);
    method public deprecated void destroy();
    method public deprecated void setModelview(android.renderscript.Matrix4f);
    method public deprecated void setProjection(android.renderscript.Matrix4f);
    method public deprecated void setTexture(android.renderscript.Matrix4f);
  }
  public class RSDriverException extends android.renderscript.RSRuntimeException {
+3 −0
Original line number Diff line number Diff line
@@ -724,6 +724,9 @@ public class Element extends BaseObj {
        }
        return rs.mElement_MATRIX_4X4;
    }

    /** @deprecated use MATRIX_4X4
    */
    public static Element MATRIX4X4(RenderScript rs) {
        return MATRIX_4X4(rs);
    }
+16 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2008 The Android Open Source Project
 * Copyright (C) 2008-2012 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@ import android.util.Log;
import android.util.TypedValue;

/**
 * @deprecated in API 16
 * FileA3D allows users to load Renderscript objects from files
 * or resources stored on disk. It could be used to load items
 * such as 3D geometry data converted to a Renderscript format from
@@ -41,16 +42,19 @@ import android.util.TypedValue;
public class FileA3D extends BaseObj {

    /**
    * @deprecated in API 16
    * Specifies what renderscript object type is contained within
    * the FileA3D IndexEntry
    **/
    public enum EntryType {

        /**
        * @deprecated in API 16
        * Unknown or or invalid object, nothing will be loaded
        **/
        UNKNOWN (0),
        /**
        * @deprecated in API 16
        * Renderscript Mesh object
        **/
        MESH (1);
@@ -66,6 +70,7 @@ public class FileA3D extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * IndexEntry contains information about one of the Renderscript
    * objects inside the file's index. It could be used to query the
    * object's type and also name and load the object itself if
@@ -80,6 +85,7 @@ public class FileA3D extends BaseObj {
        BaseObj mLoadedObj;

        /**
        * @deprecated in API 16
        * Returns the name of a renderscript object the index entry
        * describes
        *
@@ -92,6 +98,7 @@ public class FileA3D extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * Returns the type of a renderscript object the index entry
        * describes
        * @return type of a renderscript object the index entry
@@ -102,6 +109,7 @@ public class FileA3D extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * Used to load the object described by the index entry
        * @return base renderscript object described by the entry
        */
@@ -112,6 +120,7 @@ public class FileA3D extends BaseObj {
        }

        /**
        * @deprecated in API 16
        * Used to load the mesh described by the index entry, object
        * described by the index entry must be a renderscript mesh
        *
@@ -182,6 +191,7 @@ public class FileA3D extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * Returns the number of objects stored inside the a3d file
    *
    * @return the number of objects stored inside the a3d file
@@ -194,6 +204,7 @@ public class FileA3D extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * Returns an index entry from the list of all objects inside
    * FileA3D
    *
@@ -209,6 +220,7 @@ public class FileA3D extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * Creates a FileA3D object from an asset stored on disk
    *
    * @param rs Context to which the object will belong.
@@ -230,6 +242,7 @@ public class FileA3D extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * Creates a FileA3D object from a file stored on disk
    *
    * @param rs Context to which the object will belong.
@@ -249,6 +262,7 @@ public class FileA3D extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * Creates a FileA3D object from a file stored on disk
    *
    * @param rs Context to which the object will belong.
@@ -261,6 +275,7 @@ public class FileA3D extends BaseObj {
    }

    /**
    * @deprecated in API 16
    * Creates a FileA3D object from an application resource
    *
    * @param rs Context to which the object will belong.
+28 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2008 The Android Open Source Project
 * Copyright (C) 2008-2012 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@ import android.util.Log;
import android.util.TypedValue;

/**
 * @deprecated in API 16
 * <p>This class gives users a simple way to draw hardware accelerated text. 
 * Internally, the glyphs are rendered using the Freetype library and an internal cache of
 * rendered glyph bitmaps is maintained. Each font object represents a combination of a typeface,
@@ -71,10 +72,25 @@ public class Font extends BaseObj {

    private static Map<String, FontFamily> sFontFamilyMap;

    /**
     * @deprecated in API 16
     */
    public enum Style {
        /**
         * @deprecated in API 16
         */
        NORMAL,
        /**
         * @deprecated in API 16
         */
        BOLD,
        /**
         * @deprecated in API 16
         */
        ITALIC,
        /**
         * @deprecated in API 16
         */
        BOLD_ITALIC;
    }

@@ -139,6 +155,7 @@ public class Font extends BaseObj {
    }

    /**
     * @deprecated in API 16
     * Takes a specific file name as an argument
     */
    static public Font createFromFile(RenderScript rs, Resources res, String path, float pointSize) {
@@ -154,10 +171,16 @@ public class Font extends BaseObj {
        return rsFont;
    }

    /**
     * @deprecated in API 16
     */
    static public Font createFromFile(RenderScript rs, Resources res, File path, float pointSize) {
        return createFromFile(rs, res, path.getAbsolutePath(), pointSize);
    }

    /**
     * @deprecated in API 16
     */
    static public Font createFromAsset(RenderScript rs, Resources res, String path, float pointSize) {
        rs.validate();
        AssetManager mgr = res.getAssets();
@@ -171,6 +194,9 @@ public class Font extends BaseObj {
        return rsFont;
    }

    /**
     * @deprecated in API 16
     */
    static public Font createFromResource(RenderScript rs, Resources res, int id, float pointSize) {
        String name = "R." + Integer.toString(id);

@@ -200,6 +226,7 @@ public class Font extends BaseObj {
    }

    /**
     * @deprecated in API 16
     * Accepts one of the following family names as an argument
     * and will attempt to produce the best match with a system font:
     *
+40 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2008 The Android Open Source Project
 * Copyright (C) 2008-2012 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ import android.util.Log;


/**
 * @deprecated in API 16
 * <p>ProgramFragmentFixedFunction is a helper class that provides
 * a way to make a simple fragment shader without writing any
 * GLSL code. This class allows for display of constant color, interpolated
@@ -34,11 +35,15 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
    }

    static class InternalBuilder extends BaseProgramBuilder {
        /**
         * @deprecated in API 16
         */
        public InternalBuilder(RenderScript rs) {
            super(rs);
        }

        /**
         * @deprecated in API 16
         * Creates ProgramFragmentFixedFunction from the current state
         * of the builder
         *
@@ -75,7 +80,13 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
        }
    }

    /**
     * @deprecated in API 16
     */
    public static class Builder {
        /**
         * @deprecated in API 16
         */
        public static final int MAX_TEXTURE = 2;
        int mNumTextures;
        boolean mPointSpriteEnable;
@@ -84,13 +95,23 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
        RenderScript mRS;

        /**
         * @deprecated in API 16
         * EnvMode describes how textures are combined with the existing
         * color in the fixed function fragment shader
         *
         **/
        public enum EnvMode {
            /**
             * @deprecated in API 16
             **/
            REPLACE (1),
            /**
             * @deprecated in API 16
             **/
            MODULATE (2),
            /**
             * @deprecated in API 16
             **/
            DECAL (3);

            int mID;
@@ -100,14 +121,27 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
        }

        /**
         * @deprecated in API 16
         * Format describes the pixel format of textures in the fixed
         * function fragment shader and how they are sampled
         *
         **/
        public enum Format {
            /**
             * @deprecated in API 16
             **/
            ALPHA (1),
            /**
             * @deprecated in API 16
             **/
            LUMINANCE_ALPHA (2),
            /**
             * @deprecated in API 16
             **/
            RGB (3),
            /**
             * @deprecated in API 16
             **/
            RGBA (4);

            int mID;
@@ -191,6 +225,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
        }

        /**
         * @deprecated
         * Creates a builder for fixed function fragment program
         *
         * @param rs Context to which the program will belong.
@@ -202,6 +237,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
        }

        /**
         * @deprecated in API 16
         * Adds a texture to be fetched as part of the fixed function
         * fragment program
         *
@@ -224,6 +260,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
        }

        /**
         * @deprecated in API 16
         * Specifies whether the texture coordinate passed from the
         * vertex program is replaced with an openGL internal point
         * sprite texture coordinate
@@ -235,6 +272,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
        }

        /**
         * @deprecated in API 16
         * Specifies whether the varying color passed from the vertex
         * program or the constant color set on the fragment program is
         * used in the final color calculation in the fixed function
@@ -247,6 +285,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
        }

        /**
         * @deprecated in API 16
        * Creates the fixed function fragment program from the current
        * state of the builder.
        *
Loading