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
diff --git a/cpp/Sampler.cpp b/cpp/Sampler.cpp
index a1f4669..767d626 100644
--- a/cpp/Sampler.cpp
+++ b/cpp/Sampler.cpp
@@ -51,7 +51,7 @@
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);
}