Lines Matching refs:Element
35 ScriptIntrinsic::ScriptIntrinsic(sp<RS> rs, int id, sp<const Element> e)
46 sp<ScriptIntrinsic3DLUT> ScriptIntrinsic3DLUT::create(const sp<RS>& rs, const sp<const Element>& e) {
47 if (e->isCompatible(Element::U8_4(rs)) == false) {
48 rs->throwError(RS_ERROR_INVALID_ELEMENT, "Element not supported for intrinsic");
54 ScriptIntrinsic3DLUT::ScriptIntrinsic3DLUT(sp<RS> rs, sp<const Element> e)
61 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "3DLUT forEach element mismatch");
69 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "setLUT element does not match");
80 sp<ScriptIntrinsicBlend> ScriptIntrinsicBlend::create(const sp<RS>& rs, const sp<const Element>& e) {
81 if (e->isCompatible(Element::U8_4(rs)) == false) {
82 rs->throwError(RS_ERROR_INVALID_ELEMENT, "Element not supported for intrinsic");
88 ScriptIntrinsicBlend::ScriptIntrinsicBlend(sp<RS> rs, sp<const Element> e)
95 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
103 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
111 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
119 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
127 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
135 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
143 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
151 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
159 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
167 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
175 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
183 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
191 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
199 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
207 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blend");
215 sp<ScriptIntrinsicBlur> ScriptIntrinsicBlur::create(const sp<RS>& rs, const sp<const Element>& e) {
216 if ((e->isCompatible(Element::U8_4(rs)) == false) &&
217 (e->isCompatible(Element::U8(rs)) == false)) {
218 rs->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blur");
224 ScriptIntrinsicBlur::ScriptIntrinsicBlur(sp<RS> rs, sp<const Element> e)
231 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blur input");
239 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element in blur output");
256 return new ScriptIntrinsicColorMatrix(rs, Element::RGBA_8888(rs));
259 ScriptIntrinsicColorMatrix::ScriptIntrinsicColorMatrix(sp<RS> rs, sp<const Element> e)
267 if (!(in->getType()->getElement()->isCompatible(Element::U8(mRS))) &&
268 !(in->getType()->getElement()->isCompatible(Element::U8_2(mRS))) &&
269 !(in->getType()->getElement()->isCompatible(Element::U8_3(mRS))) &&
270 !(in->getType()->getElement()->isCompatible(Element::U8_4(mRS))) &&
271 !(in->getType()->getElement()->isCompatible(Element::F32(mRS))) &&
272 !(in->getType()->getElement()->isCompatible(Element::F32_2(mRS))) &&
273 !(in->getType()->getElement()->isCompatible(Element::F32_3(mRS))) &&
274 !(in->getType()->getElement()->isCompatible(Element::F32_4(mRS)))) {
275 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for ColorMatrix");
279 if (!(out->getType()->getElement()->isCompatible(Element::U8(mRS))) &&
280 !(out->getType()->getElement()->isCompatible(Element::U8_2(mRS))) &&
281 !(out->getType()->getElement()->isCompatible(Element::U8_3(mRS))) &&
282 !(out->getType()->getElement()->isCompatible(Element::U8_4(mRS))) &&
283 !(out->getType()->getElement()->isCompatible(Element::F32(mRS))) &&
284 !(out->getType()->getElement()->isCompatible(Element::F32_2(mRS))) &&
285 !(out->getType()->getElement()->isCompatible(Element::F32_3(mRS))) &&
286 !(out->getType()->getElement()->isCompatible(Element::F32_4(mRS)))) {
287 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for ColorMatrix");
348 sp<ScriptIntrinsicConvolve3x3> ScriptIntrinsicConvolve3x3::create(const sp<RS>& rs, const sp<const Element>& e) {
349 if (!(e->isCompatible(Element::U8(rs))) &&
350 !(e->isCompatible(Element::U8_2(rs))) &&
351 !(e->isCompatible(Element::U8_3(rs))) &&
352 !(e->isCompatible(Element::U8_4(rs))) &&
353 !(e->isCompatible(Element::F32(rs))) &&
354 !(e->isCompatible(Element::F32_2(rs))) &&
355 !(e->isCompatible(Element::F32_3(rs))) &&
356 !(e->isCompatible(Element::F32_4(rs)))) {
357 rs->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for Convolve3x3");
364 ScriptIntrinsicConvolve3x3::ScriptIntrinsicConvolve3x3(sp<RS> rs, sp<const Element> e)
371 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Element mismatch in Convolve3x3");
379 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Element mismatch in Convolve3x3");
389 sp<ScriptIntrinsicConvolve5x5> ScriptIntrinsicConvolve5x5::create(const sp<RS>& rs, const sp<const Element>& e) {
390 if (!(e->isCompatible(Element::U8(rs))) &&
391 !(e->isCompatible(Element::U8_2(rs))) &&
392 !(e->isCompatible(Element::U8_3(rs))) &&
393 !(e->isCompatible(Element::U8_4(rs))) &&
394 !(e->isCompatible(Element::F32(rs))) &&
395 !(e->isCompatible(Element::F32_2(rs))) &&
396 !(e->isCompatible(Element::F32_3(rs))) &&
397 !(e->isCompatible(Element::F32_4(rs)))) {
398 rs->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for Convolve5x5");
405 ScriptIntrinsicConvolve5x5::ScriptIntrinsicConvolve5x5(sp<RS> rs, sp<const Element> e)
412 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Element mismatch in Convolve5x5 input");
420 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Element mismatch in Convolve5x5 output");
431 sp<ScriptIntrinsicHistogram> ScriptIntrinsicHistogram::create(const sp<RS>& rs, const sp<const Element>& e) {
435 ScriptIntrinsicHistogram::ScriptIntrinsicHistogram(sp<RS> rs, sp<const Element> e)
441 if (!(out->getType()->getElement()->isCompatible(Element::U32(mRS))) &&
442 !(out->getType()->getElement()->isCompatible(Element::U32_2(mRS))) &&
443 !(out->getType()->getElement()->isCompatible(Element::U32_3(mRS))) &&
444 !(out->getType()->getElement()->isCompatible(Element::U32_4(mRS))) &&
445 !(out->getType()->getElement()->isCompatible(Element::I32(mRS))) &&
446 !(out->getType()->getElement()->isCompatible(Element::I32_2(mRS))) &&
447 !(out->getType()->getElement()->isCompatible(Element::I32_3(mRS))) &&
448 !(out->getType()->getElement()->isCompatible(Element::I32_4(mRS)))) {
449 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for Histogram output");
488 if (!(ain->getType()->getElement()->isCompatible(Element::U8(mRS))) &&
489 !(ain->getType()->getElement()->isCompatible(Element::U8_4(mRS)))) {
506 if (!(ain->getType()->getElement()->isCompatible(Element::U8(mRS))) &&
507 !(ain->getType()->getElement()->isCompatible(Element::U8_4(mRS)))) {
516 sp<ScriptIntrinsicLUT> ScriptIntrinsicLUT::create(const sp<RS>& rs, const sp<const Element>& e) {
517 if (!(e->isCompatible(Element::U8_4(rs)))) {
518 rs->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for LUT");
524 ScriptIntrinsicLUT::ScriptIntrinsicLUT(sp<RS> rs, sp<const Element> e)
526 LUT = Allocation::createSized(rs, Element::U8(rs), 1024);
541 if (!(ain->getType()->getElement()->isCompatible(Element::U8_4(mRS))) ||
542 !(aout->getType()->getElement()->isCompatible(Element::U8_4(mRS)))) {
543 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for LUT");
585 ScriptIntrinsicResize::ScriptIntrinsicResize(sp<RS> rs, sp<const Element> e)
595 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Resize forEach element mismatch");
601 if (!(ain->getType()->getElement()->isCompatible(Element::U8(mRS))) &&
602 !(ain->getType()->getElement()->isCompatible(Element::U8_2(mRS))) &&
603 !(ain->getType()->getElement()->isCompatible(Element::U8_3(mRS))) &&
604 !(ain->getType()->getElement()->isCompatible(Element::U8_4(mRS))) &&
605 !(ain->getType()->getElement()->isCompatible(Element::F32(mRS))) &&
606 !(ain->getType()->getElement()->isCompatible(Element::F32_2(mRS))) &&
607 !(ain->getType()->getElement()->isCompatible(Element::F32_3(mRS))) &&
608 !(ain->getType()->getElement()->isCompatible(Element::F32_4(mRS)))) {
609 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for Resize Input");
618 sp<ScriptIntrinsicYuvToRGB> ScriptIntrinsicYuvToRGB::create(const sp<RS>& rs, const sp<const Element>& e) {
619 if (!(e->isCompatible(Element::U8_4(rs)))) {
620 rs->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for YuvToRGB");
626 ScriptIntrinsicYuvToRGB::ScriptIntrinsicYuvToRGB(sp<RS> rs, sp<const Element> e)
632 if (!(in->getType()->getElement()->isCompatible(Element::YUV(mRS)))) {
633 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for input in YuvToRGB");
641 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for output in YuvToRGB");