Skip to content

Commit 043f5ce

Browse files
author
Alex Sakhartchouk
committed
More rearrangement and renaming.
Change-Id: Ia922c5bff1734a29b786ba95065f81c8dedf90cd
1 parent b09aaec commit 043f5ce

File tree

7 files changed

+127
-128
lines changed

7 files changed

+127
-128
lines changed

libs/rs/scriptc/rs_core.rsh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2011 The Android Open Source Project
2+
* Copyright (C) 2011-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.
@@ -33,16 +33,12 @@
3333
#include "rs_debug.rsh"
3434
#include "rs_element.rsh"
3535
#include "rs_math.rsh"
36-
#include "rs_mesh.rsh"
3736
#include "rs_matrix.rsh"
3837
#include "rs_object.rsh"
39-
#include "rs_program.rsh"
4038
#include "rs_quaternion.rsh"
4139
#include "rs_sampler.rsh"
4240
#include "rs_time.rsh"
4341

44-
45-
4642
/**
4743
* Send a message back to the client. Will not block and returns true
4844
* if the message was sendable and false if the fifo was full.

libs/rs/scriptc/rs_graphics.rsh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2011 The Android Open Source Project
2+
* Copyright (C) 2011-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.
@@ -23,6 +23,9 @@
2323
#ifndef __RS_GRAPHICS_RSH__
2424
#define __RS_GRAPHICS_RSH__
2525

26+
#include "rs_mesh.rsh"
27+
#include "rs_program.rsh"
28+
2629
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
2730
/**
2831
* Set the color target used for all subsequent rendering calls

libs/rs/scriptc/rs_mesh.rsh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
* data
5555
*/
5656
extern uint32_t __attribute__((overloadable))
57-
rsMeshGetVertexAllocationCount(rs_mesh m);
57+
rsgMeshGetVertexAllocationCount(rs_mesh m);
5858

5959
/**
6060
* @param m mesh to get data from
@@ -63,31 +63,31 @@ extern uint32_t __attribute__((overloadable))
6363
* containing index data
6464
*/
6565
extern uint32_t __attribute__((overloadable))
66-
rsMeshGetPrimitiveCount(rs_mesh m);
66+
rsgMeshGetPrimitiveCount(rs_mesh m);
6767

6868
/**
6969
* @param m mesh to get data from
7070
* @param index index of the vertex allocation
7171
* @return allocation containing vertex data
7272
*/
7373
extern rs_allocation __attribute__((overloadable))
74-
rsMeshGetVertexAllocation(rs_mesh m, uint32_t index);
74+
rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index);
7575

7676
/**
7777
* @param m mesh to get data from
7878
* @param index index of the index allocation
7979
* @return allocation containing index data
8080
*/
8181
extern rs_allocation __attribute__((overloadable))
82-
rsMeshGetIndexAllocation(rs_mesh m, uint32_t index);
82+
rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index);
8383

8484
/**
8585
* @param m mesh to get data from
8686
* @param index index of the primitive
8787
* @return primitive describing how the mesh is rendered
8888
*/
8989
extern rs_primitive __attribute__((overloadable))
90-
rsMeshGetPrimitive(rs_mesh m, uint32_t index);
90+
rsgMeshGetPrimitive(rs_mesh m, uint32_t index);
9191

9292
#endif // __RS_MESH_RSH__
9393

libs/rs/scriptc/rs_program.rsh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
* @param ps
5656
*/
5757
extern rs_depth_func __attribute__((overloadable))
58-
rsProgramStoreGetDepthFunc(rs_program_store ps);
58+
rsgProgramStoreGetDepthFunc(rs_program_store ps);
5959

6060
/**
6161
* @hide
@@ -64,15 +64,15 @@ extern rs_depth_func __attribute__((overloadable))
6464
* @param ps
6565
*/
6666
extern bool __attribute__((overloadable))
67-
rsProgramStoreGetDepthMask(rs_program_store ps);
67+
rsgProgramStoreGetDepthMask(rs_program_store ps);
6868
/**
6969
* @hide
7070
* Get program store red component color mask
7171
*
7272
* @param ps
7373
*/
7474
extern bool __attribute__((overloadable))
75-
rsProgramStoreGetColorMaskR(rs_program_store ps);
75+
rsgProgramStoreGetColorMaskR(rs_program_store ps);
7676

7777
/**
7878
* @hide
@@ -81,7 +81,7 @@ extern bool __attribute__((overloadable))
8181
* @param ps
8282
*/
8383
extern bool __attribute__((overloadable))
84-
rsProgramStoreGetColorMaskG(rs_program_store ps);
84+
rsgProgramStoreGetColorMaskG(rs_program_store ps);
8585

8686
/**
8787
* @hide
@@ -90,7 +90,7 @@ extern bool __attribute__((overloadable))
9090
* @param ps
9191
*/
9292
extern bool __attribute__((overloadable))
93-
rsProgramStoreGetColorMaskB(rs_program_store ps);
93+
rsgProgramStoreGetColorMaskB(rs_program_store ps);
9494

9595
/**
9696
* @hide
@@ -99,7 +99,7 @@ extern bool __attribute__((overloadable))
9999
* @param ps
100100
*/
101101
extern bool __attribute__((overloadable))
102-
rsProgramStoreGetColorMaskA(rs_program_store ps);
102+
rsgProgramStoreGetColorMaskA(rs_program_store ps);
103103

104104
/**
105105
* @hide
@@ -108,7 +108,7 @@ extern bool __attribute__((overloadable))
108108
* @param ps
109109
*/
110110
extern rs_blend_src_func __attribute__((overloadable))
111-
rsProgramStoreGetBlendSrcFunc(rs_program_store ps);
111+
rsgProgramStoreGetBlendSrcFunc(rs_program_store ps);
112112

113113
/**
114114
* @hide
@@ -117,7 +117,7 @@ extern rs_blend_src_func __attribute__((overloadable))
117117
* @param ps
118118
*/
119119
extern rs_blend_dst_func __attribute__((overloadable))
120-
rsProgramStoreGetBlendDstFunc(rs_program_store ps);
120+
rsgProgramStoreGetBlendDstFunc(rs_program_store ps);
121121

122122
/**
123123
* @hide
@@ -126,7 +126,7 @@ extern rs_blend_dst_func __attribute__((overloadable))
126126
* @param ps
127127
*/
128128
extern bool __attribute__((overloadable))
129-
rsProgramStoreGetDitherEnabled(rs_program_store ps);
129+
rsgProgramStoreGetDitherEnabled(rs_program_store ps);
130130

131131
/**
132132
* @hide
@@ -135,7 +135,7 @@ extern bool __attribute__((overloadable))
135135
* @param pr
136136
*/
137137
extern bool __attribute__((overloadable))
138-
rsProgramRasterGetPointSpriteEnabled(rs_program_raster pr);
138+
rsgProgramRasterGetPointSpriteEnabled(rs_program_raster pr);
139139

140140
/**
141141
* @hide
@@ -144,7 +144,7 @@ extern bool __attribute__((overloadable))
144144
* @param pr
145145
*/
146146
extern rs_cull_mode __attribute__((overloadable))
147-
rsProgramRasterGetCullMode(rs_program_raster pr);
147+
rsgProgramRasterGetCullMode(rs_program_raster pr);
148148

149149

150150

tests/RenderScriptTests/tests/src/com/android/rs/test/mesh.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@ rs_allocation indexAlloc2;
1111
static bool test_mesh_getters() {
1212
bool failed = false;
1313

14-
_RS_ASSERT(rsMeshGetVertexAllocationCount(mesh) == 2);
15-
_RS_ASSERT(rsMeshGetPrimitiveCount(mesh) == 3);
14+
_RS_ASSERT(rsgMeshGetVertexAllocationCount(mesh) == 2);
15+
_RS_ASSERT(rsgMeshGetPrimitiveCount(mesh) == 3);
1616

17-
rs_allocation meshV0 = rsMeshGetVertexAllocation(mesh, 0);
18-
rs_allocation meshV1 = rsMeshGetVertexAllocation(mesh, 1);
19-
rs_allocation meshV2 = rsMeshGetVertexAllocation(mesh, 2);
17+
rs_allocation meshV0 = rsgMeshGetVertexAllocation(mesh, 0);
18+
rs_allocation meshV1 = rsgMeshGetVertexAllocation(mesh, 1);
19+
rs_allocation meshV2 = rsgMeshGetVertexAllocation(mesh, 2);
2020
_RS_ASSERT(meshV0.p == vertexAlloc0.p);
2121
_RS_ASSERT(meshV1.p == vertexAlloc1.p);
2222
_RS_ASSERT(!rsIsObject(meshV2));
2323

24-
rs_allocation meshI0 = rsMeshGetIndexAllocation(mesh, 0);
25-
rs_allocation meshI1 = rsMeshGetIndexAllocation(mesh, 1);
26-
rs_allocation meshI2 = rsMeshGetIndexAllocation(mesh, 2);
27-
rs_allocation meshI3 = rsMeshGetIndexAllocation(mesh, 3);
24+
rs_allocation meshI0 = rsgMeshGetIndexAllocation(mesh, 0);
25+
rs_allocation meshI1 = rsgMeshGetIndexAllocation(mesh, 1);
26+
rs_allocation meshI2 = rsgMeshGetIndexAllocation(mesh, 2);
27+
rs_allocation meshI3 = rsgMeshGetIndexAllocation(mesh, 3);
2828
_RS_ASSERT(meshI0.p == indexAlloc0.p);
2929
_RS_ASSERT(!rsIsObject(meshI1));
3030
_RS_ASSERT(meshI2.p == indexAlloc2.p);
3131
_RS_ASSERT(!rsIsObject(meshI3));
3232

33-
rs_primitive p0 = rsMeshGetPrimitive(mesh, 0);
34-
rs_primitive p1 = rsMeshGetPrimitive(mesh, 1);
35-
rs_primitive p2 = rsMeshGetPrimitive(mesh, 2);
36-
rs_primitive p3 = rsMeshGetPrimitive(mesh, 3);
33+
rs_primitive p0 = rsgMeshGetPrimitive(mesh, 0);
34+
rs_primitive p1 = rsgMeshGetPrimitive(mesh, 1);
35+
rs_primitive p2 = rsgMeshGetPrimitive(mesh, 2);
36+
rs_primitive p3 = rsgMeshGetPrimitive(mesh, 3);
3737

3838
_RS_ASSERT(p0 == RS_PRIMITIVE_POINT);
3939
_RS_ASSERT(p1 == RS_PRIMITIVE_LINE);

tests/RenderScriptTests/tests/src/com/android/rs/test/program_raster.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ rs_program_raster cullMode;
77
static bool test_program_raster_getters() {
88
bool failed = false;
99

10-
_RS_ASSERT(rsProgramRasterGetPointSpriteEnabled(pointSpriteEnabled) == true);
11-
_RS_ASSERT(rsProgramRasterGetCullMode(pointSpriteEnabled) == RS_CULL_BACK);
10+
_RS_ASSERT(rsgProgramRasterGetPointSpriteEnabled(pointSpriteEnabled) == true);
11+
_RS_ASSERT(rsgProgramRasterGetCullMode(pointSpriteEnabled) == RS_CULL_BACK);
1212

13-
_RS_ASSERT(rsProgramRasterGetPointSpriteEnabled(cullMode) == false);
14-
_RS_ASSERT(rsProgramRasterGetCullMode(cullMode) == RS_CULL_FRONT);
13+
_RS_ASSERT(rsgProgramRasterGetPointSpriteEnabled(cullMode) == false);
14+
_RS_ASSERT(rsgProgramRasterGetCullMode(cullMode) == RS_CULL_FRONT);
1515

1616
if (failed) {
1717
rsDebug("test_program_raster_getters FAILED", 0);

0 commit comments

Comments
 (0)