summaryrefslogtreecommitdiff
path: root/cpp/ScriptC.cpp
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2012-10-31 16:03:16 -0700
committerTim Murray <timmurray@google.com>2012-11-05 16:34:59 -0800
commit84bf2b877024aaa154b66e0f2338d54bdabd855a (patch)
tree64fcf3429697d1d609182a7ae769eb3d89e1f272 /cpp/ScriptC.cpp
parentc36a74dfcf0c1a9af6b6411aa80f7be31694425c (diff)
Move to smart pointers for refcounting RS contexts
Change-Id: I0dc6adc4e02c7427a4234c549d3555a501fe5f90
Diffstat (limited to 'cpp/ScriptC.cpp')
-rw-r--r--cpp/ScriptC.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/cpp/ScriptC.cpp b/cpp/ScriptC.cpp
index 39b17d47..3a1909d7 100644
--- a/cpp/ScriptC.cpp
+++ b/cpp/ScriptC.cpp
@@ -14,22 +14,20 @@
* limitations under the License.
*/
-#define LOG_TAG "libRS_cpp"
-
#include <utils/Log.h>
#include <malloc.h>
-#include "ScriptC.h"
+#include "RenderScript.h"
using namespace android;
using namespace renderscriptCpp;
-ScriptC::ScriptC(RenderScript *rs,
+ScriptC::ScriptC(sp<RS> rs,
const void *codeTxt, size_t codeLength,
const char *cachedName, size_t cachedNameLength,
const char *cacheDir, size_t cacheDirLength)
: Script(NULL, rs) {
- mID = rsScriptCCreate(rs->mContext, cachedName, cachedNameLength,
+ mID = rsScriptCCreate(rs->getContext(), cachedName, cachedNameLength,
cacheDir, cacheDirLength, (const char *)codeTxt, codeLength);
}