summaryrefslogtreecommitdiffstats
path: root/cpp/Sampler.cpp
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-11-26 15:38:31 -0800
committerStephen Hines <srhines@google.com>2013-11-26 16:56:30 -0800
commit8a588bd9d34088ed89ef2c192c32ea2301e601bc (patch)
tree8c55a31502d2edba474c7460c3db56cc37fff898 /cpp/Sampler.cpp
parentb98626d1da831c5ced7d74d374a3242cbb82c3a5 (diff)
downloadandroid_frameworks_rs-8a588bd9d34088ed89ef2c192c32ea2301e601bc.tar.gz
android_frameworks_rs-8a588bd9d34088ed89ef2c192c32ea2301e601bc.tar.bz2
android_frameworks_rs-8a588bd9d34088ed89ef2c192c32ea2301e601bc.zip
Fix problems with NDK Sampler implementation.
Creation methods should be static and we need to use the proper Context pointer for the dispatch methods. Change-Id: I43c25a7348c9a9aa9a2a82e184d4ac644625800b
Diffstat (limited to 'cpp/Sampler.cpp')
-rw-r--r--cpp/Sampler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/Sampler.cpp b/cpp/Sampler.cpp
index a1f46691..767d626e 100644
--- a/cpp/Sampler.cpp
+++ b/cpp/Sampler.cpp
@@ -51,7 +51,7 @@ float Sampler::getAnisotropy() {
sp<Sampler> Sampler::create(sp<RS> rs, RsSamplerValue min, RsSamplerValue mag, RsSamplerValue wrapS, RsSamplerValue wrapT, float anisotropy) {
// we aren't supporting wrapR in C++ API atm, so always pass wrap for that
- void* id = RS::dispatch->SamplerCreate(rs.get(), min, mag, wrapS, wrapT, RS_SAMPLER_WRAP, anisotropy);
+ void* id = RS::dispatch->SamplerCreate(rs->getContext(), min, mag, wrapS, wrapT, RS_SAMPLER_WRAP, anisotropy);
return new Sampler(rs, id);
}