summaryrefslogtreecommitdiff
path: root/libs/rs/rsProgramRaster.h
diff options
context:
space:
mode:
author Alex Sakhartchouk <alexst@google.com> 2011-08-16 13:09:46 -0700
committer Alex Sakhartchouk <alexst@google.com> 2011-08-16 13:09:46 -0700
commit117abdbc67123654d0754b686c5bbdee6b44bcdd (patch)
tree7531e3083956f7fc2db9310253425c32e9743b8f /libs/rs/rsProgramRaster.h
parent065fa8deb178f00ad9957d3212ec2620c46f78e4 (diff)
Fixing asynchronous performance issues.
Change-Id: I10f02cd37a33a6c655814d24e0a4291dc044fba3
Diffstat (limited to 'libs/rs/rsProgramRaster.h')
-rw-r--r--libs/rs/rsProgramRaster.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/libs/rs/rsProgramRaster.h b/libs/rs/rsProgramRaster.h
index efdb94874197..09d7d5432c9a 100644
--- a/libs/rs/rsProgramRaster.h
+++ b/libs/rs/rsProgramRaster.h
@@ -27,19 +27,17 @@ class ProgramRasterState;
class ProgramRaster : public ProgramBase {
public:
- ProgramRaster(Context *rsc,
- bool pointSmooth,
- bool lineSmooth,
- bool pointSprite,
- float lineWidth,
- RsCullMode cull);
- virtual ~ProgramRaster();
-
virtual void setup(const Context *, ProgramRasterState *);
virtual void serialize(OStream *stream) const;
virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_RASTER; }
static ProgramRaster *createFromStream(Context *rsc, IStream *stream);
+ static ObjectBaseRef<ProgramRaster> getProgramRaster(Context *rsc,
+ bool pointSmooth,
+ bool lineSmooth,
+ bool pointSprite,
+ float lineWidth,
+ RsCullMode cull);
struct Hal {
mutable void *drv;
@@ -55,6 +53,17 @@ public:
Hal mHal;
protected:
+ virtual void preDestroy() const;
+ virtual ~ProgramRaster();
+
+private:
+ ProgramRaster(Context *rsc,
+ bool pointSmooth,
+ bool lineSmooth,
+ bool pointSprite,
+ float lineWidth,
+ RsCullMode cull);
+
};
class ProgramRasterState {
@@ -66,6 +75,9 @@ public:
ObjectBaseRef<ProgramRaster> mDefault;
ObjectBaseRef<ProgramRaster> mLast;
+
+ // Cache of all existing raster programs.
+ Vector<ProgramRaster *> mRasterPrograms;
};