Lines Matching refs:rs

75 #define CREATE_USER(N, T) android::RSC::sp<const Element> Element::N(android::RSC::sp<RS> rs) { \
76 if (rs->mElements.N == NULL) { \
77 rs->mElements.N = (createUser(rs, RS_TYPE_##T)); \
79 return rs->mElements.N; \
102 #define CREATE_PIXEL(N, T, K) android::RSC::sp<const Element> Element::N(android::RSC::sp<RS> rs) { \
103 if (rs->mElements.N == NULL) { \
104 rs->mElements.N = createPixel(rs, RS_TYPE_##T, RS_KIND_##K); \
106 return rs->mElements.N; \
116 #define CREATE_VECTOR(N, T) android::RSC::sp<const Element> Element::N##_2(android::RSC::sp<RS> rs) { \
117 if (rs->mElements.N##_2 == NULL) { \
118 rs->mElements.N##_2 = createVector(rs, RS_TYPE_##T, 2); \
120 return rs->mElements.N##_2; \
122 android::RSC::sp<const Element> Element::N##_3(android::RSC::sp<RS> rs) { \
123 if (rs->mElements.N##_3 == NULL) { \
124 rs->mElements.N##_3 = createVector(rs, RS_TYPE_##T, 3); \
126 return rs->mElements.N##_3; \
128 android::RSC::sp<const Element> Element::N##_4(android::RSC::sp<RS> rs) { \
129 if (rs->mElements.N##_4 == NULL) { \
130 rs->mElements.N##_4 = createVector(rs, RS_TYPE_##T, 4); \
132 return rs->mElements.N##_4; \
169 Element::Element(void *id, android::RSC::sp<RS> rs,
172 std::vector<uint32_t> &arraySizes) : BaseObj(id, rs) {
243 Element::Element(void *id, android::RSC::sp<RS> rs,
245 BaseObj(id, rs)
273 android::RSC::sp<const Element> Element::createUser(android::RSC::sp<RS> rs, RsDataType dt) {
274 void * id = RS::dispatch->ElementCreate(rs->getContext(), dt, RS_KIND_USER, false, 1);
275 return new Element(id, rs, dt, RS_KIND_USER, false, 1);
278 android::RSC::sp<const Element> Element::createVector(android::RSC::sp<RS> rs, RsDataType dt, uint32_t size) {
280 rs->throwError(RS_ERROR_INVALID_PARAMETER, "Vector size out of range 2-4.");
283 void *id = RS::dispatch->ElementCreate(rs->getContext(), dt, RS_KIND_USER, false, size);
284 return new Element(id, rs, dt, RS_KIND_USER, false, size);
287 android::RSC::sp<const Element> Element::createPixel(android::RSC::sp<RS> rs, RsDataType dt, RsDataKind dk) {
294 rs->throwError(RS_ERROR_INVALID_PARAMETER, "Unsupported DataKind");
302 rs->throwError(RS_ERROR_INVALID_PARAMETER, "Unsupported DataType");
306 rs->throwError(RS_ERROR_INVALID_PARAMETER, "Bad kind and type combo");
310 rs->throwError(RS_ERROR_INVALID_PARAMETER, "Bad kind and type combo");
314 rs->throwError(RS_ERROR_INVALID_PARAMETER, "Bad kind and type combo");
318 rs->throwError(RS_ERROR_INVALID_PARAMETER, "Bad kind and type combo");
340 void * id = RS::dispatch->ElementCreate(rs->getContext(), dt, dk, true, size);
341 return new Element(id, rs, dt, dk, true, size);
360 Element::Builder::Builder(android::RSC::sp<RS> rs) {
361 mRS = rs;