Lines Matching refs:GrEffect

20 class GrEffect;
25 * A Wrapper class for GrEffect. Its ref-count will track owners that may use effects to enqueue
29 * the underlying GrEffect.
40 GrEffect* get() { return fEffect; }
41 const GrEffect* get() const { return fEffect; }
43 const GrEffect* operator-> () { return fEffect; }
44 const GrEffect* operator-> () const { return fEffect; }
57 friend class GrEffect; // to construct these
59 explicit GrEffectRef(GrEffect* effect);
61 GrEffect* fEffect;
70 GrEffect objects *must* be immutable: after being constructed, their fields may not change.
72 GrEffect subclass objects should be created by factory functions that return GrEffectRef.
73 There is no public way to wrap a GrEffect in a GrEffectRef. Thus, a factory should be a static
74 member function of a GrEffect subclass.
76 Because almost no code should ever handle a GrEffect directly outside of a GrEffectRef, we
83 class GrEffect : private SkRefCnt {
85 SK_DECLARE_INST_COUNT(GrEffect)
87 virtual ~GrEffect();
103 GrTBackendEffectFactory. It is templated on the subclass of GrEffect. The subclass must have
108 class MyCustomEffect : public GrEffect {
210 * pointer). The GrCoordTransform is typically a member field of the GrEffect subclass. When the
219 * GrTextureAccess is typically a member field of the GrEffect subclass. This must only be
224 GrEffect()
231 /** This should be called by GrEffect subclass factories. See the comment on AutoEffectUnref for
233 static GrEffectRef* CreateEffectRef(GrEffect* effect) {
242 static const GrEffectRef* CreateEffectRef(const GrEffect* effect) {
243 return CreateEffectRef(const_cast<GrEffect*>(effect));
247 static GrEffectRef* CreateStaticEffectRef(void* refStorage, GrEffect* effect) {
257 class EffectSubclass : public GrEffect {
266 AutoEffectUnref(GrEffect* effect) : fEffect(effect) { }
268 operator GrEffect*() { return fEffect; }
270 GrEffect* fEffect;
273 /** Helper for getting the GrEffect out of a GrEffectRef and down-casting to a GrEffect subclass
276 static const T& CastEffect(const GrEffect& effectRef) {
302 bool isEqual(const GrEffect& other) const {
315 SkDEBUGCODE(void assertEquality(const GrEffect& other) const;)
320 virtual bool onIsEqual(const GrEffect& other) const = 0;
325 friend class GrEffectStage; // to rewrap GrEffect in GrEffectRef when restoring an effect-stage
342 inline GrEffectRef::GrEffectRef(GrEffect* effect) {
359 static GrEffect* NAME##_Effect SkNEW_PLACEMENT_ARGS(g_##NAME##_Storage.get(), EFFECT_CLASS, ARGS);\
360 static SkAutoTDestroy<GrEffect> NAME##_ad(NAME##_Effect); \
361 static GrEffectRef* NAME(GrEffect::CreateStaticEffectRef(NAME##_RefLocation, NAME##_Effect)); \