summaryrefslogtreecommitdiff
path: root/rsSampler.h
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2011-09-23 17:05:04 -0700
committerAlex Sakhartchouk <alexst@google.com>2011-10-15 09:33:05 -0700
commit407f8ca5a1cd2269dba356f40ab32a5ff934a6a2 (patch)
treef59147545bd39300b0d82fdc70280f2e64571a56 /rsSampler.h
parent881b4da237e98f99d44b8c1951ff10597381e272 (diff)
downloadrs-407f8ca5a1cd2269dba356f40ab32a5ff934a6a2.tar.gz
Adding getter functions for script side RS objects.
Multiproject change involving on device linker Change-Id: I321e8caa6ca23b3fe2c96c78cdcfc15e51f88823
Diffstat (limited to 'rsSampler.h')
-rw-r--r--rsSampler.h37
1 files changed, 22 insertions, 15 deletions
diff --git a/rsSampler.h b/rsSampler.h
index e698132d..654cd9ce 100644
--- a/rsSampler.h
+++ b/rsSampler.h
@@ -27,23 +27,16 @@ namespace renderscript {
const static uint32_t RS_MAX_SAMPLER_SLOT = 16;
class SamplerState;
-
+/*****************************************************************************
+ * CAUTION
+ *
+ * Any layout changes for this class may require a corresponding change to be
+ * made to frameworks/compile/libbcc/lib/ScriptCRT/rs_core.c, which contains
+ * a partial copy of the information below.
+ *
+ *****************************************************************************/
class Sampler : public ObjectBase {
public:
- static ObjectBaseRef<Sampler> getSampler(Context *,
- RsSamplerValue magFilter,
- RsSamplerValue minFilter,
- RsSamplerValue wrapS,
- RsSamplerValue wrapT,
- RsSamplerValue wrapR,
- float aniso = 1.0f);
- void bindToContext(SamplerState *, uint32_t slot);
- void unbindFromContext(SamplerState *);
-
- virtual void serialize(OStream *stream) const;
- virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_SAMPLER; }
- static Sampler *createFromStream(Context *rsc, IStream *stream);
-
struct Hal {
mutable void *drv;
@@ -59,6 +52,20 @@ public:
};
Hal mHal;
+ static ObjectBaseRef<Sampler> getSampler(Context *,
+ RsSamplerValue magFilter,
+ RsSamplerValue minFilter,
+ RsSamplerValue wrapS,
+ RsSamplerValue wrapT,
+ RsSamplerValue wrapR,
+ float aniso = 1.0f);
+ void bindToContext(SamplerState *, uint32_t slot);
+ void unbindFromContext(SamplerState *);
+
+ virtual void serialize(OStream *stream) const;
+ virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_SAMPLER; }
+ static Sampler *createFromStream(Context *rsc, IStream *stream);
+
protected:
int32_t mBoundSlot;