Fix intrinsic creation to use the appropriate types.
Change-Id: I9f919ad410d8dac843da01afa9b14bd0d6b355ad
diff --git a/cpp/ScriptIntrinsics.cpp b/cpp/ScriptIntrinsics.cpp
index 2150d40..7436351 100644
--- a/cpp/ScriptIntrinsics.cpp
+++ b/cpp/ScriptIntrinsics.cpp
@@ -23,12 +23,12 @@
using namespace android;
using namespace renderscriptCpp;
-ScriptIntrinsic::ScriptIntrinsic(sp<RS> rs, int id, Element *e)
+ScriptIntrinsic::ScriptIntrinsic(sp<RS> rs, int id, sp<const Element> e)
: Script(NULL, rs) {
- mID = rsScriptIntrinsicCreate(rs->getContext(), id, e);
+ mID = rsScriptIntrinsicCreate(rs->getContext(), id, e->getID());
}
-ScriptIntrinsicBlend::ScriptIntrinsicBlend(sp<RS> rs, Element *e)
+ScriptIntrinsicBlend::ScriptIntrinsicBlend(sp<RS> rs, sp<const Element> e)
: ScriptIntrinsic(rs, RS_SCRIPT_INTRINSIC_ID_BLEND, e) {
}
@@ -95,7 +95,7 @@
Script::forEach(35, in, out, NULL, 0);
}
-ScriptIntrinsicBlur::ScriptIntrinsicBlur(sp<RS> rs, Element *e)
+ScriptIntrinsicBlur::ScriptIntrinsicBlur(sp<RS> rs, sp<const Element> e)
: ScriptIntrinsic(rs, RS_SCRIPT_INTRINSIC_ID_BLUR, e) {
}