Skip to content

Commit 66fb1f3

Browse files
Jason SamsAndroid (Google) Code Review
authored andcommitted
Merge "Wrapping new API with #defines to prevent old apps from using them."
2 parents f270a15 + f6576d9 commit 66fb1f3

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

libs/rs/scriptc/rs_allocation.rsh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ extern uint32_t __attribute__((overloadable))
7171
extern uint32_t __attribute__((overloadable))
7272
rsAllocationGetDimFaces(rs_allocation);
7373

74+
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
75+
7476
/**
7577
* Copy part of an allocation from another allocation.
7678
*
@@ -123,6 +125,7 @@ extern void __attribute__((overloadable))
123125
uint32_t srcMip,
124126
rs_allocation_cubemap_face srcFace);
125127

128+
#endif //defined(RS_VERSION) && (RS_VERSION >= 14)
126129

127130
/**
128131
* Extract a single element from an allocation.

libs/rs/scriptc/rs_atomic.rsh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#ifndef __RS_ATOMIC_RSH__
2424
#define __RS_ATOMIC_RSH__
2525

26+
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
2627

2728
/**
2829
* Atomic add one to the value at addr.
@@ -243,6 +244,7 @@ extern int32_t __attribute__((overloadable))
243244
extern uint32_t __attribute__((overloadable))
244245
rsAtomicCas(volatile uint32_t* addr, int32_t compareValue, int32_t newValue);
245246

247+
#endif //defined(RS_VERSION) && (RS_VERSION >= 14)
246248

247249
#endif
248250

libs/rs/scriptc/rs_graphics.rsh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#ifndef __RS_GRAPHICS_RSH__
2424
#define __RS_GRAPHICS_RSH__
2525

26+
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
2627
/**
2728
* Set the color target used for all subsequent rendering calls
2829
* @param colorTarget
@@ -64,6 +65,8 @@ extern void __attribute__((overloadable))
6465
extern uint __attribute__((overloadable))
6566
rsgFinish(void);
6667

68+
#endif //defined(RS_VERSION) && (RS_VERSION >= 14)
69+
6770
/**
6871
* Bind a new ProgramFragment to the rendering context.
6972
*
@@ -187,6 +190,8 @@ extern uint __attribute__((overloadable))
187190
extern void __attribute__((overloadable))
188191
rsgAllocationSyncAll(rs_allocation alloc);
189192

193+
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
194+
190195
/**
191196
* Sync the contents of an allocation from memory space
192197
* specified by source.
@@ -198,6 +203,8 @@ extern void __attribute__((overloadable))
198203
rsgAllocationSyncAll(rs_allocation alloc,
199204
rs_allocation_usage_type source);
200205

206+
#endif //defined(RS_VERSION) && (RS_VERSION >= 14)
207+
201208
/**
202209
* Low performance utility function for drawing a simple rectangle. Not
203210
* intended for drawing large quantities of geometry.

libs/rs/scriptc/rs_matrix.rsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ rsMatrixMultiply(rs_matrix2x2 *m, float2 in);
308308
#else
309309
/**
310310
* Multiply a vector by a matrix and return the result vector.
311-
* API version 10-13
311+
* API version 14+
312312
*/
313313
_RS_RUNTIME float4 __attribute__((overloadable))
314314
rsMatrixMultiply(const rs_matrix4x4 *m, float4 in);

libs/rs/scriptc/rs_types.rsh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ typedef float4 rs_quaternion;
366366
#define RS_PACKED __attribute__((packed, aligned(4)))
367367
#define NULL ((const void *)0)
368368

369+
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
369370

370371
/**
371372
* \brief Enum for selecting cube map faces
@@ -393,4 +394,6 @@ typedef enum {
393394
RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010
394395
} rs_allocation_usage_type;
395396

397+
#endif //defined(RS_VERSION) && (RS_VERSION >= 14)
398+
396399
#endif

0 commit comments

Comments
 (0)