Skip to content

Commit 65c80f8

Browse files
author
Jason Sams
committed
GFX api cleanup 1 of 2
Change-Id: Ib85784c18b1647e51f1d7cf2a4c956d17e1d2e3c
1 parent 27ef44c commit 65c80f8

File tree

6 files changed

+165
-60
lines changed

6 files changed

+165
-60
lines changed

api/current.txt

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -18753,7 +18753,7 @@ package android.renderscript {
1875318753
method public static android.renderscript.Element I8_2(android.renderscript.RenderScript);
1875418754
method public static android.renderscript.Element I8_3(android.renderscript.RenderScript);
1875518755
method public static android.renderscript.Element I8_4(android.renderscript.RenderScript);
18756-
method public static android.renderscript.Element MATRIX4X4(android.renderscript.RenderScript);
18756+
method public static deprecated android.renderscript.Element MATRIX4X4(android.renderscript.RenderScript);
1875718757
method public static android.renderscript.Element MATRIX_2X2(android.renderscript.RenderScript);
1875818758
method public static android.renderscript.Element MATRIX_3X3(android.renderscript.RenderScript);
1875918759
method public static android.renderscript.Element MATRIX_4X4(android.renderscript.RenderScript);
@@ -18908,27 +18908,27 @@ package android.renderscript {
1890818908
method public void skip(int);
1890918909
}
1891018910

18911-
public class FileA3D extends android.renderscript.BaseObj {
18912-
method public static android.renderscript.FileA3D createFromAsset(android.renderscript.RenderScript, android.content.res.AssetManager, java.lang.String);
18913-
method public static android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.lang.String);
18914-
method public static android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.io.File);
18915-
method public static android.renderscript.FileA3D createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int);
18916-
method public android.renderscript.FileA3D.IndexEntry getIndexEntry(int);
18917-
method public int getIndexEntryCount();
18911+
public deprecated class FileA3D extends android.renderscript.BaseObj {
18912+
method public static deprecated android.renderscript.FileA3D createFromAsset(android.renderscript.RenderScript, android.content.res.AssetManager, java.lang.String);
18913+
method public static deprecated android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.lang.String);
18914+
method public static deprecated android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.io.File);
18915+
method public static deprecated android.renderscript.FileA3D createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int);
18916+
method public deprecated android.renderscript.FileA3D.IndexEntry getIndexEntry(int);
18917+
method public deprecated int getIndexEntryCount();
1891818918
}
1891918919

18920-
public static final class FileA3D.EntryType extends java.lang.Enum {
18920+
public static final deprecated class FileA3D.EntryType extends java.lang.Enum {
1892118921
method public static android.renderscript.FileA3D.EntryType valueOf(java.lang.String);
1892218922
method public static final android.renderscript.FileA3D.EntryType[] values();
18923-
enum_constant public static final android.renderscript.FileA3D.EntryType MESH;
18924-
enum_constant public static final android.renderscript.FileA3D.EntryType UNKNOWN;
18923+
enum_constant public static final deprecated android.renderscript.FileA3D.EntryType MESH;
18924+
enum_constant public static final deprecated android.renderscript.FileA3D.EntryType UNKNOWN;
1892518925
}
1892618926

18927-
public static class FileA3D.IndexEntry {
18928-
method public android.renderscript.FileA3D.EntryType getEntryType();
18929-
method public android.renderscript.Mesh getMesh();
18930-
method public java.lang.String getName();
18931-
method public android.renderscript.BaseObj getObject();
18927+
public static deprecated class FileA3D.IndexEntry {
18928+
method public deprecated android.renderscript.FileA3D.EntryType getEntryType();
18929+
method public deprecated android.renderscript.Mesh getMesh();
18930+
method public deprecated java.lang.String getName();
18931+
method public deprecated android.renderscript.BaseObj getObject();
1893218932
}
1893318933

1893418934
public class Float2 {
@@ -18955,21 +18955,21 @@ package android.renderscript {
1895518955
field public float z;
1895618956
}
1895718957

18958-
public class Font extends android.renderscript.BaseObj {
18959-
method public static android.renderscript.Font create(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, android.renderscript.Font.Style, float);
18960-
method public static android.renderscript.Font createFromAsset(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
18961-
method public static android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
18962-
method public static android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.io.File, float);
18963-
method public static android.renderscript.Font createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int, float);
18958+
public deprecated class Font extends android.renderscript.BaseObj {
18959+
method public static deprecated android.renderscript.Font create(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, android.renderscript.Font.Style, float);
18960+
method public static deprecated android.renderscript.Font createFromAsset(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
18961+
method public static deprecated android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
18962+
method public static deprecated android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.io.File, float);
18963+
method public static deprecated android.renderscript.Font createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int, float);
1896418964
}
1896518965

18966-
public static final class Font.Style extends java.lang.Enum {
18966+
public static final deprecated class Font.Style extends java.lang.Enum {
1896718967
method public static android.renderscript.Font.Style valueOf(java.lang.String);
1896818968
method public static final android.renderscript.Font.Style[] values();
18969-
enum_constant public static final android.renderscript.Font.Style BOLD;
18970-
enum_constant public static final android.renderscript.Font.Style BOLD_ITALIC;
18971-
enum_constant public static final android.renderscript.Font.Style ITALIC;
18972-
enum_constant public static final android.renderscript.Font.Style NORMAL;
18969+
enum_constant public static final deprecated android.renderscript.Font.Style BOLD;
18970+
enum_constant public static final deprecated android.renderscript.Font.Style BOLD_ITALIC;
18971+
enum_constant public static final deprecated android.renderscript.Font.Style ITALIC;
18972+
enum_constant public static final deprecated android.renderscript.Font.Style NORMAL;
1897318973
}
1897418974

1897518975
public class Int2 {
@@ -19179,33 +19179,33 @@ package android.renderscript {
1917919179
method public android.renderscript.ProgramFragment create();
1918019180
}
1918119181

19182-
public class ProgramFragmentFixedFunction extends android.renderscript.ProgramFragment {
19182+
public deprecated class ProgramFragmentFixedFunction extends android.renderscript.ProgramFragment {
1918319183
}
1918419184

19185-
public static class ProgramFragmentFixedFunction.Builder {
19186-
ctor public ProgramFragmentFixedFunction.Builder(android.renderscript.RenderScript);
19187-
method public android.renderscript.ProgramFragmentFixedFunction create();
19188-
method public android.renderscript.ProgramFragmentFixedFunction.Builder setPointSpriteTexCoordinateReplacement(boolean);
19189-
method public android.renderscript.ProgramFragmentFixedFunction.Builder setTexture(android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode, android.renderscript.ProgramFragmentFixedFunction.Builder.Format, int) throws java.lang.IllegalArgumentException;
19190-
method public android.renderscript.ProgramFragmentFixedFunction.Builder setVaryingColor(boolean);
19191-
field public static final int MAX_TEXTURE = 2; // 0x2
19185+
public static deprecated class ProgramFragmentFixedFunction.Builder {
19186+
ctor public deprecated ProgramFragmentFixedFunction.Builder(android.renderscript.RenderScript);
19187+
method public deprecated android.renderscript.ProgramFragmentFixedFunction create();
19188+
method public deprecated android.renderscript.ProgramFragmentFixedFunction.Builder setPointSpriteTexCoordinateReplacement(boolean);
19189+
method public deprecated android.renderscript.ProgramFragmentFixedFunction.Builder setTexture(android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode, android.renderscript.ProgramFragmentFixedFunction.Builder.Format, int) throws java.lang.IllegalArgumentException;
19190+
method public deprecated android.renderscript.ProgramFragmentFixedFunction.Builder setVaryingColor(boolean);
19191+
field public static final deprecated int MAX_TEXTURE = 2; // 0x2
1919219192
}
1919319193

19194-
public static final class ProgramFragmentFixedFunction.Builder.EnvMode extends java.lang.Enum {
19194+
public static final deprecated class ProgramFragmentFixedFunction.Builder.EnvMode extends java.lang.Enum {
1919519195
method public static android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode valueOf(java.lang.String);
1919619196
method public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode[] values();
19197-
enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode DECAL;
19198-
enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode MODULATE;
19199-
enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode REPLACE;
19197+
enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode DECAL;
19198+
enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode MODULATE;
19199+
enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode REPLACE;
1920019200
}
1920119201

19202-
public static final class ProgramFragmentFixedFunction.Builder.Format extends java.lang.Enum {
19202+
public static final deprecated class ProgramFragmentFixedFunction.Builder.Format extends java.lang.Enum {
1920319203
method public static android.renderscript.ProgramFragmentFixedFunction.Builder.Format valueOf(java.lang.String);
1920419204
method public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format[] values();
19205-
enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format ALPHA;
19206-
enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format LUMINANCE_ALPHA;
19207-
enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGB;
19208-
enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGBA;
19205+
enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format ALPHA;
19206+
enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format LUMINANCE_ALPHA;
19207+
enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGB;
19208+
enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGBA;
1920919209
}
1921019210

1921119211
public class ProgramRaster extends android.renderscript.BaseObj {
@@ -19307,22 +19307,22 @@ package android.renderscript {
1930719307
method public android.renderscript.ProgramVertex create();
1930819308
}
1930919309

19310-
public class ProgramVertexFixedFunction extends android.renderscript.ProgramVertex {
19311-
method public void bindConstants(android.renderscript.ProgramVertexFixedFunction.Constants);
19310+
public deprecated class ProgramVertexFixedFunction extends android.renderscript.ProgramVertex {
19311+
method public deprecated void bindConstants(android.renderscript.ProgramVertexFixedFunction.Constants);
1931219312
}
1931319313

19314-
public static class ProgramVertexFixedFunction.Builder {
19315-
ctor public ProgramVertexFixedFunction.Builder(android.renderscript.RenderScript);
19316-
method public android.renderscript.ProgramVertexFixedFunction create();
19317-
method public android.renderscript.ProgramVertexFixedFunction.Builder setTextureMatrixEnable(boolean);
19314+
public static deprecated class ProgramVertexFixedFunction.Builder {
19315+
ctor public deprecated ProgramVertexFixedFunction.Builder(android.renderscript.RenderScript);
19316+
method public deprecated android.renderscript.ProgramVertexFixedFunction create();
19317+
method public deprecated android.renderscript.ProgramVertexFixedFunction.Builder setTextureMatrixEnable(boolean);
1931819318
}
1931919319

19320-
public static class ProgramVertexFixedFunction.Constants {
19321-
ctor public ProgramVertexFixedFunction.Constants(android.renderscript.RenderScript);
19322-
method public void destroy();
19323-
method public void setModelview(android.renderscript.Matrix4f);
19324-
method public void setProjection(android.renderscript.Matrix4f);
19325-
method public void setTexture(android.renderscript.Matrix4f);
19320+
public static deprecated class ProgramVertexFixedFunction.Constants {
19321+
ctor public deprecated ProgramVertexFixedFunction.Constants(android.renderscript.RenderScript);
19322+
method public deprecated void destroy();
19323+
method public deprecated void setModelview(android.renderscript.Matrix4f);
19324+
method public deprecated void setProjection(android.renderscript.Matrix4f);
19325+
method public deprecated void setTexture(android.renderscript.Matrix4f);
1932619326
}
1932719327

1932819328
public class RSDriverException extends android.renderscript.RSRuntimeException {

graphics/java/android/renderscript/Element.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,9 @@ public static Element MATRIX_4X4(RenderScript rs) {
724724
}
725725
return rs.mElement_MATRIX_4X4;
726726
}
727+
728+
/** @deprecated use MATRIX_4X4
729+
*/
727730
public static Element MATRIX4X4(RenderScript rs) {
728731
return MATRIX_4X4(rs);
729732
}

graphics/java/android/renderscript/FileA3D.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2008 The Android Open Source Project
2+
* Copyright (C) 2008-2012 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
2828
import android.util.TypedValue;
2929

3030
/**
31+
* @deprecated in API 16
3132
* FileA3D allows users to load Renderscript objects from files
3233
* or resources stored on disk. It could be used to load items
3334
* such as 3D geometry data converted to a Renderscript format from
@@ -41,16 +42,19 @@
4142
public class FileA3D extends BaseObj {
4243

4344
/**
45+
* @deprecated in API 16
4446
* Specifies what renderscript object type is contained within
4547
* the FileA3D IndexEntry
4648
**/
4749
public enum EntryType {
4850

4951
/**
52+
* @deprecated in API 16
5053
* Unknown or or invalid object, nothing will be loaded
5154
**/
5255
UNKNOWN (0),
5356
/**
57+
* @deprecated in API 16
5458
* Renderscript Mesh object
5559
**/
5660
MESH (1);
@@ -66,6 +70,7 @@ static EntryType toEntryType(int intID) {
6670
}
6771

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

8287
/**
88+
* @deprecated in API 16
8389
* Returns the name of a renderscript object the index entry
8490
* describes
8591
*
@@ -92,6 +98,7 @@ public String getName() {
9298
}
9399

94100
/**
101+
* @deprecated in API 16
95102
* Returns the type of a renderscript object the index entry
96103
* describes
97104
* @return type of a renderscript object the index entry
@@ -102,6 +109,7 @@ public EntryType getEntryType() {
102109
}
103110

104111
/**
112+
* @deprecated in API 16
105113
* Used to load the object described by the index entry
106114
* @return base renderscript object described by the entry
107115
*/
@@ -112,6 +120,7 @@ public BaseObj getObject() {
112120
}
113121

114122
/**
123+
* @deprecated in API 16
115124
* Used to load the mesh described by the index entry, object
116125
* described by the index entry must be a renderscript mesh
117126
*
@@ -182,6 +191,7 @@ private void initEntries() {
182191
}
183192

184193
/**
194+
* @deprecated in API 16
185195
* Returns the number of objects stored inside the a3d file
186196
*
187197
* @return the number of objects stored inside the a3d file
@@ -194,6 +204,7 @@ public int getIndexEntryCount() {
194204
}
195205

196206
/**
207+
* @deprecated in API 16
197208
* Returns an index entry from the list of all objects inside
198209
* FileA3D
199210
*
@@ -209,6 +220,7 @@ public IndexEntry getIndexEntry(int index) {
209220
}
210221

211222
/**
223+
* @deprecated in API 16
212224
* Creates a FileA3D object from an asset stored on disk
213225
*
214226
* @param rs Context to which the object will belong.
@@ -230,6 +242,7 @@ static public FileA3D createFromAsset(RenderScript rs, AssetManager mgr, String
230242
}
231243

232244
/**
245+
* @deprecated in API 16
233246
* Creates a FileA3D object from a file stored on disk
234247
*
235248
* @param rs Context to which the object will belong.
@@ -249,6 +262,7 @@ static public FileA3D createFromFile(RenderScript rs, String path) {
249262
}
250263

251264
/**
265+
* @deprecated in API 16
252266
* Creates a FileA3D object from a file stored on disk
253267
*
254268
* @param rs Context to which the object will belong.
@@ -261,6 +275,7 @@ static public FileA3D createFromFile(RenderScript rs, File path) {
261275
}
262276

263277
/**
278+
* @deprecated in API 16
264279
* Creates a FileA3D object from an application resource
265280
*
266281
* @param rs Context to which the object will belong.

graphics/java/android/renderscript/Font.java

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2008 The Android Open Source Project
2+
* Copyright (C) 2008-2012 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@
3030
import android.util.TypedValue;
3131

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

7273
private static Map<String, FontFamily> sFontFamilyMap;
7374

75+
/**
76+
* @deprecated in API 16
77+
*/
7478
public enum Style {
79+
/**
80+
* @deprecated in API 16
81+
*/
7582
NORMAL,
83+
/**
84+
* @deprecated in API 16
85+
*/
7686
BOLD,
87+
/**
88+
* @deprecated in API 16
89+
*/
7790
ITALIC,
91+
/**
92+
* @deprecated in API 16
93+
*/
7894
BOLD_ITALIC;
7995
}
8096

@@ -139,6 +155,7 @@ static String getFontFileName(String familyName, Style style) {
139155
}
140156

141157
/**
158+
* @deprecated in API 16
142159
* Takes a specific file name as an argument
143160
*/
144161
static public Font createFromFile(RenderScript rs, Resources res, String path, float pointSize) {
@@ -154,10 +171,16 @@ static public Font createFromFile(RenderScript rs, Resources res, String path, f
154171
return rsFont;
155172
}
156173

174+
/**
175+
* @deprecated in API 16
176+
*/
157177
static public Font createFromFile(RenderScript rs, Resources res, File path, float pointSize) {
158178
return createFromFile(rs, res, path.getAbsolutePath(), pointSize);
159179
}
160180

181+
/**
182+
* @deprecated in API 16
183+
*/
161184
static public Font createFromAsset(RenderScript rs, Resources res, String path, float pointSize) {
162185
rs.validate();
163186
AssetManager mgr = res.getAssets();
@@ -171,6 +194,9 @@ static public Font createFromAsset(RenderScript rs, Resources res, String path,
171194
return rsFont;
172195
}
173196

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

@@ -200,6 +226,7 @@ static public Font createFromResource(RenderScript rs, Resources res, int id, fl
200226
}
201227

202228
/**
229+
* @deprecated in API 16
203230
* Accepts one of the following family names as an argument
204231
* and will attempt to produce the best match with a system font:
205232
*

0 commit comments

Comments
 (0)