Skip to content

Commit e267f5f

Browse files
stephenhinesAndroid (Google) Code Review
authored andcommitted
Merge "Add missing support for Element.FONT()."
2 parents 140af0c + 3a29141 commit e267f5f

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

api/current.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18098,6 +18098,7 @@ package android.renderscript {
1809818098
method public static android.renderscript.Element F64_2(android.renderscript.RenderScript);
1809918099
method public static android.renderscript.Element F64_3(android.renderscript.RenderScript);
1810018100
method public static android.renderscript.Element F64_4(android.renderscript.RenderScript);
18101+
method public static android.renderscript.Element FONT(android.renderscript.RenderScript);
1810118102
method public static android.renderscript.Element I16(android.renderscript.RenderScript);
1810218103
method public static android.renderscript.Element I16_2(android.renderscript.RenderScript);
1810318104
method public static android.renderscript.Element I16_3(android.renderscript.RenderScript);
@@ -18193,6 +18194,7 @@ package android.renderscript {
1819318194
enum_constant public static final android.renderscript.Element.DataType NONE;
1819418195
enum_constant public static final android.renderscript.Element.DataType RS_ALLOCATION;
1819518196
enum_constant public static final android.renderscript.Element.DataType RS_ELEMENT;
18197+
enum_constant public static final android.renderscript.Element.DataType RS_FONT;
1819618198
enum_constant public static final android.renderscript.Element.DataType RS_MESH;
1819718199
enum_constant public static final android.renderscript.Element.DataType RS_PROGRAM_FRAGMENT;
1819818200
enum_constant public static final android.renderscript.Element.DataType RS_PROGRAM_RASTER;

graphics/java/android/renderscript/Element.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ public enum DataType {
146146
RS_PROGRAM_FRAGMENT (1006, 4),
147147
RS_PROGRAM_VERTEX (1007, 4),
148148
RS_PROGRAM_RASTER (1008, 4),
149-
RS_PROGRAM_STORE (1009, 4);
149+
RS_PROGRAM_STORE (1009, 4),
150+
RS_FONT (1010, 4);
150151

151152
int mID;
152153
int mSize;
@@ -457,6 +458,13 @@ public static Element PROGRAM_STORE(RenderScript rs) {
457458
return rs.mElement_PROGRAM_STORE;
458459
}
459460

461+
public static Element FONT(RenderScript rs) {
462+
if(rs.mElement_FONT == null) {
463+
rs.mElement_FONT = createUser(rs, DataType.RS_FONT);
464+
}
465+
return rs.mElement_FONT;
466+
}
467+
460468

461469
public static Element A_8(RenderScript rs) {
462470
if(rs.mElement_A_8 == null) {

graphics/java/android/renderscript/RenderScript.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ synchronized int nPathCreate(int prim, boolean isStatic, int vtx, int loop, floa
664664
Element mElement_PROGRAM_VERTEX;
665665
Element mElement_PROGRAM_RASTER;
666666
Element mElement_PROGRAM_STORE;
667+
Element mElement_FONT;
667668

668669
Element mElement_A_8;
669670
Element mElement_RGB_565;

0 commit comments

Comments
 (0)