Home | History | Annotate | Download | only in gpu

Lines Matching defs:GrEffect

20 class GrEffect;
24 * A Wrapper class for GrEffect. Its ref-count will track owners that may use effects to enqueue
28 * the underlying GrEffect.
34 GrEffect* get() { return fEffect; }
35 const GrEffect* get() const { return fEffect; }
37 const GrEffect* operator-> () { return fEffect; }
38 const GrEffect* operator-> () const { return fEffect; }
44 friend class GrEffect; // to construct these
46 explicit GrEffectRef(GrEffect* effect);
50 GrEffect* fEffect;
59 GrEffect objects *must* be immutable: after being constructed, their fields may not change.
61 GrEffect subclass objects should be created by factory functions that return GrEffectRef.
62 There is no public way to wrap a GrEffect in a GrEffectRef. Thus, a factory should be a static
63 member function of a GrEffect subclass.
65 Because almost no code should ever handle a GrEffect outside of a GrEffectRef, we privately
68 class GrEffect : private GrRefCnt {
70 SK_DECLARE_INST_COUNT(GrEffect)
72 virtual ~GrEffect();
98 GrTBackendEffectFactory. It is templated on the subclass of GrEffect. The subclass must have
103 class MyCustomEffect : public GrEffect {
177 GrEffect() : fEffectRef(NULL) {};
179 /** This should be called by GrEffect subclass factories. See the comment on AutoEffectUnref for
181 static GrEffectRef* CreateEffectRef(GrEffect* effect) {
190 static const GrEffectRef* CreateEffectRef(const GrEffect* effect) {
191 return CreateEffectRef(const_cast<GrEffect*>(effect));
197 class EffectSubclass : public GrEffect {
206 AutoEffectUnref(GrEffect* effect) : fEffect(effect) { }
208 operator GrEffect*() { return fEffect; }
210 GrEffect* fEffect;
213 /** Helper for getting the GrEffect out of a GrEffectRef and down-casting to a GrEffect subclass
216 static const T& CastEffect(const GrEffect& effectRef) {
221 bool isEqual(const GrEffect& other) const {
240 virtual bool onIsEqual(const GrEffect& other) const = 0;
245 friend class GrEffectStage; // to rewrap GrEffect in GrEffectRef when restoring an effect-stage
255 inline GrEffectRef::GrEffectRef(GrEffect* effect) {