Skip to content

Commit 794db6c

Browse files
stephenhinesAndroid (Google) Code Review
authored andcommitted
Merge "GFX api cleanup 1.5 of 2" into jb-dev
2 parents 57b0988 + e619de6 commit 794db6c

File tree

4 files changed

+84
-35
lines changed

4 files changed

+84
-35
lines changed

api/current.txt

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19094,14 +19094,14 @@ package android.renderscript {
1909419094
method public int getVertexAllocationCount();
1909519095
}
1909619096

19097-
public static class Mesh.AllocationBuilder {
19098-
ctor public Mesh.AllocationBuilder(android.renderscript.RenderScript);
19099-
method public android.renderscript.Mesh.AllocationBuilder addIndexSetAllocation(android.renderscript.Allocation, android.renderscript.Mesh.Primitive);
19100-
method public android.renderscript.Mesh.AllocationBuilder addIndexSetType(android.renderscript.Mesh.Primitive);
19101-
method public android.renderscript.Mesh.AllocationBuilder addVertexAllocation(android.renderscript.Allocation) throws java.lang.IllegalStateException;
19102-
method public android.renderscript.Mesh create();
19103-
method public int getCurrentIndexSetIndex();
19104-
method public int getCurrentVertexTypeIndex();
19097+
public static deprecated class Mesh.AllocationBuilder {
19098+
ctor public deprecated Mesh.AllocationBuilder(android.renderscript.RenderScript);
19099+
method public deprecated android.renderscript.Mesh.AllocationBuilder addIndexSetAllocation(android.renderscript.Allocation, android.renderscript.Mesh.Primitive);
19100+
method public deprecated android.renderscript.Mesh.AllocationBuilder addIndexSetType(android.renderscript.Mesh.Primitive);
19101+
method public deprecated android.renderscript.Mesh.AllocationBuilder addVertexAllocation(android.renderscript.Allocation) throws java.lang.IllegalStateException;
19102+
method public deprecated android.renderscript.Mesh create();
19103+
method public deprecated int getCurrentIndexSetIndex();
19104+
method public deprecated int getCurrentVertexTypeIndex();
1910519105
}
1910619106

1910719107
public static class Mesh.Builder {
@@ -19127,18 +19127,18 @@ package android.renderscript {
1912719127
enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE_STRIP;
1912819128
}
1912919129

19130-
public static class Mesh.TriangleMeshBuilder {
19131-
ctor public Mesh.TriangleMeshBuilder(android.renderscript.RenderScript, int, int);
19132-
method public android.renderscript.Mesh.TriangleMeshBuilder addTriangle(int, int, int);
19133-
method public android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float);
19134-
method public android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float, float);
19135-
method public android.renderscript.Mesh create(boolean);
19136-
method public android.renderscript.Mesh.TriangleMeshBuilder setColor(float, float, float, float);
19137-
method public android.renderscript.Mesh.TriangleMeshBuilder setNormal(float, float, float);
19138-
method public android.renderscript.Mesh.TriangleMeshBuilder setTexture(float, float);
19139-
field public static final int COLOR = 1; // 0x1
19140-
field public static final int NORMAL = 2; // 0x2
19141-
field public static final int TEXTURE_0 = 256; // 0x100
19130+
public static deprecated class Mesh.TriangleMeshBuilder {
19131+
ctor public deprecated Mesh.TriangleMeshBuilder(android.renderscript.RenderScript, int, int);
19132+
method public deprecated android.renderscript.Mesh.TriangleMeshBuilder addTriangle(int, int, int);
19133+
method public deprecated android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float);
19134+
method public deprecated android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float, float);
19135+
method public deprecated android.renderscript.Mesh create(boolean);
19136+
method public deprecated android.renderscript.Mesh.TriangleMeshBuilder setColor(float, float, float, float);
19137+
method public deprecated android.renderscript.Mesh.TriangleMeshBuilder setNormal(float, float, float);
19138+
method public deprecated android.renderscript.Mesh.TriangleMeshBuilder setTexture(float, float);
19139+
field public static final deprecated int COLOR = 1; // 0x1
19140+
field public static final deprecated int NORMAL = 2; // 0x2
19141+
field public static final deprecated int TEXTURE_0 = 256; // 0x100
1914219142
}
1914319143

1914419144
public class Program extends android.renderscript.BaseObj {
@@ -19341,18 +19341,18 @@ package android.renderscript {
1934119341
ctor public RSRuntimeException(java.lang.String);
1934219342
}
1934319343

19344-
public class RSSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback {
19345-
ctor public RSSurfaceView(android.content.Context);
19346-
ctor public RSSurfaceView(android.content.Context, android.util.AttributeSet);
19347-
method public android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
19348-
method public void destroyRenderScriptGL();
19349-
method public android.renderscript.RenderScriptGL getRenderScriptGL();
19350-
method public void pause();
19351-
method public void resume();
19352-
method public void setRenderScriptGL(android.renderscript.RenderScriptGL);
19353-
method public void surfaceChanged(android.view.SurfaceHolder, int, int, int);
19354-
method public void surfaceCreated(android.view.SurfaceHolder);
19355-
method public void surfaceDestroyed(android.view.SurfaceHolder);
19344+
public deprecated class RSSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback {
19345+
ctor public deprecated RSSurfaceView(android.content.Context);
19346+
ctor public deprecated RSSurfaceView(android.content.Context, android.util.AttributeSet);
19347+
method public deprecated android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
19348+
method public deprecated void destroyRenderScriptGL();
19349+
method public deprecated android.renderscript.RenderScriptGL getRenderScriptGL();
19350+
method public deprecated void pause();
19351+
method public deprecated void resume();
19352+
method public deprecated void setRenderScriptGL(android.renderscript.RenderScriptGL);
19353+
method public deprecated void surfaceChanged(android.view.SurfaceHolder, int, int, int);
19354+
method public deprecated void surfaceCreated(android.view.SurfaceHolder);
19355+
method public deprecated void surfaceDestroyed(android.view.SurfaceHolder);
1935619356
}
1935719357

1935819358
public class RSTextureView extends android.view.TextureView implements android.view.TextureView.SurfaceTextureListener {
@@ -19417,7 +19417,7 @@ package android.renderscript {
1941719417
method public void pause();
1941819418
method public void resume();
1941919419
method public void setSurface(android.view.SurfaceHolder, int, int);
19420-
method public void setSurfaceTexture(android.graphics.SurfaceTexture, int, int);
19420+
method public deprecated void setSurfaceTexture(android.graphics.SurfaceTexture, int, int);
1942119421
}
1942219422

1942319423
public static class RenderScriptGL.SurfaceConfig {

graphics/java/android/renderscript/Mesh.java

Lines changed: 29 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.
@@ -373,6 +373,7 @@ public Mesh create() {
373373
}
374374

375375
/**
376+
* @deprecated in API 16
376377
* Mesh builder object. It starts empty and requires the user to
377378
* add all the vertex and index allocations that comprise the
378379
* mesh
@@ -391,6 +392,9 @@ class Entry {
391392

392393
Vector mIndexTypes;
393394

395+
/**
396+
* @deprecated in API 16
397+
**/
394398
public AllocationBuilder(RenderScript rs) {
395399
mRS = rs;
396400
mVertexTypeCount = 0;
@@ -399,6 +403,7 @@ public AllocationBuilder(RenderScript rs) {
399403
}
400404

401405
/**
406+
* @deprecated in API 16
402407
* @return internal index of the last vertex buffer type added to
403408
* builder
404409
**/
@@ -407,6 +412,7 @@ public int getCurrentVertexTypeIndex() {
407412
}
408413

409414
/**
415+
* @deprecated in API 16
410416
* @return internal index of the last index set added to the
411417
* builder
412418
**/
@@ -415,6 +421,7 @@ public int getCurrentIndexSetIndex() {
415421
}
416422

417423
/**
424+
* @deprecated in API 16
418425
* Adds an allocation containing vertex buffer data to the
419426
* builder
420427
*
@@ -434,6 +441,7 @@ public AllocationBuilder addVertexAllocation(Allocation a) throws IllegalStateEx
434441
}
435442

436443
/**
444+
* @deprecated in API 16
437445
* Adds an allocation containing index buffer data and index type
438446
* to the builder
439447
*
@@ -451,6 +459,7 @@ public AllocationBuilder addIndexSetAllocation(Allocation a, Primitive p) {
451459
}
452460

453461
/**
462+
* @deprecated in API 16
454463
* Adds an index set type to the builder
455464
*
456465
* @param p index set primitive type
@@ -466,6 +475,7 @@ public AllocationBuilder addIndexSetType(Primitive p) {
466475
}
467476

468477
/**
478+
* @deprecated in API 16
469479
* Create a Mesh object from the current state of the builder
470480
*
471481
**/
@@ -507,6 +517,7 @@ public Mesh create() {
507517
}
508518

509519
/**
520+
* @deprecated in API 16
510521
* Builder that allows creation of a mesh object point by point
511522
* and triangle by triangle
512523
*
@@ -533,11 +544,21 @@ public static class TriangleMeshBuilder {
533544
int mVtxSize;
534545
int mFlags;
535546

547+
/**
548+
* @deprecated in API 16
549+
**/
536550
public static final int COLOR = 0x0001;
551+
/**
552+
* @deprecated in API 16
553+
**/
537554
public static final int NORMAL = 0x0002;
555+
/**
556+
* @deprecated in API 16
557+
**/
538558
public static final int TEXTURE_0 = 0x0100;
539559

540560
/**
561+
* @deprecated in API 16
541562
* @param rs Context to which the mesh will belong.
542563
* @param vtxSize specifies whether the vertex is a float2 or
543564
* float3
@@ -593,6 +614,7 @@ private void latch() {
593614
}
594615

595616
/**
617+
* @deprecated in API 16
596618
* Adds a float2 vertex to the mesh
597619
*
598620
* @param x position x
@@ -613,6 +635,7 @@ public TriangleMeshBuilder addVertex(float x, float y) {
613635
}
614636

615637
/**
638+
* @deprecated in API 16
616639
* Adds a float3 vertex to the mesh
617640
*
618641
* @param x position x
@@ -636,6 +659,7 @@ public TriangleMeshBuilder addVertex(float x, float y, float z) {
636659
}
637660

638661
/**
662+
* @deprecated in API 16
639663
* Sets the texture coordinate for the vertices that are added after this method call.
640664
*
641665
* @param s texture coordinate s
@@ -653,6 +677,7 @@ public TriangleMeshBuilder setTexture(float s, float t) {
653677
}
654678

655679
/**
680+
* @deprecated in API 16
656681
* Sets the normal vector for the vertices that are added after this method call.
657682
*
658683
* @param x normal vector x
@@ -672,6 +697,7 @@ public TriangleMeshBuilder setNormal(float x, float y, float z) {
672697
}
673698

674699
/**
700+
* @deprecated in API 16
675701
* Sets the color for the vertices that are added after this method call.
676702
*
677703
* @param r red component
@@ -693,6 +719,7 @@ public TriangleMeshBuilder setColor(float r, float g, float b, float a) {
693719
}
694720

695721
/**
722+
* @deprecated in API 16
696723
* Adds a new triangle to the mesh builder
697724
*
698725
* @param idx1 index of the first vertex in the triangle
@@ -719,6 +746,7 @@ public TriangleMeshBuilder addTriangle(int idx1, int idx2, int idx3) {
719746
}
720747

721748
/**
749+
* @deprecated in API 16
722750
* Creates the mesh object from the current state of the builder
723751
*
724752
* @param uploadToBufferObject specifies whether the vertex data

graphics/java/android/renderscript/RSSurfaceView.java

Lines changed: 21 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.view.SurfaceView;
3131

3232
/**
33+
* @deprecated in API 16
3334
* The Surface View for a graphics renderscript (RenderScriptGL) to draw on.
3435
*
3536
* <div class="special reference">
@@ -43,6 +44,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
4344
private RenderScriptGL mRS;
4445

4546
/**
47+
* @deprecated in API 16
4648
* Standard View constructor. In order to render something, you
4749
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
4850
* register a renderer.
@@ -54,6 +56,7 @@ public RSSurfaceView(Context context) {
5456
}
5557

5658
/**
59+
* @deprecated in API 16
5760
* Standard View constructor. In order to render something, you
5861
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
5962
* register a renderer.
@@ -72,6 +75,7 @@ private void init() {
7275
}
7376

7477
/**
78+
* @deprecated in API 16
7579
* This method is part of the SurfaceHolder.Callback interface, and is
7680
* not normally called or subclassed by clients of RSSurfaceView.
7781
*/
@@ -80,6 +84,7 @@ public void surfaceCreated(SurfaceHolder holder) {
8084
}
8185

8286
/**
87+
* @deprecated in API 16
8388
* This method is part of the SurfaceHolder.Callback interface, and is
8489
* not normally called or subclassed by clients of RSSurfaceView.
8590
*/
@@ -93,6 +98,7 @@ public void surfaceDestroyed(SurfaceHolder holder) {
9398
}
9499

95100
/**
101+
* @deprecated in API 16
96102
* This method is part of the SurfaceHolder.Callback interface, and is
97103
* not normally called or subclassed by clients of RSSurfaceView.
98104
*/
@@ -105,6 +111,7 @@ public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
105111
}
106112

107113
/**
114+
* @deprecated in API 16
108115
* Inform the view that the activity is paused. The owner of this view must
109116
* call this method when the activity is paused. Calling this method will
110117
* pause the rendering thread.
@@ -117,6 +124,7 @@ public void pause() {
117124
}
118125

119126
/**
127+
* @deprecated in API 16
120128
* Inform the view that the activity is resumed. The owner of this view must
121129
* call this method when the activity is resumed. Calling this method will
122130
* recreate the OpenGL display and resume the rendering
@@ -129,23 +137,35 @@ public void resume() {
129137
}
130138
}
131139

140+
/**
141+
* @deprecated in API 16
142+
**/
132143
public RenderScriptGL createRenderScriptGL(RenderScriptGL.SurfaceConfig sc) {
133144
RenderScriptGL rs = new RenderScriptGL(this.getContext(), sc);
134145
setRenderScriptGL(rs);
135146
return rs;
136147
}
137148

149+
/**
150+
* @deprecated in API 16
151+
**/
138152
public void destroyRenderScriptGL() {
139153
synchronized (this) {
140154
mRS.destroy();
141155
mRS = null;
142156
}
143157
}
144158

159+
/**
160+
* @deprecated in API 16
161+
**/
145162
public void setRenderScriptGL(RenderScriptGL rs) {
146163
mRS = rs;
147164
}
148165

166+
/**
167+
* @deprecated in API 16
168+
**/
149169
public RenderScriptGL getRenderScriptGL() {
150170
return mRS;
151171
}

graphics/java/android/renderscript/RenderScriptGL.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public void setSurface(SurfaceHolder sur, int w, int h) {
206206
}
207207

208208
/**
209+
* @deprecated in API 16
209210
* Bind an os surface
210211
*
211212
* @param w

0 commit comments

Comments
 (0)