| Index: src/gpu/GrEffect.cpp
|
| diff --git a/src/gpu/GrEffect.cpp b/src/gpu/GrEffect.cpp
|
| index f952483562766fdb3e5d7f1fe1eb578cd794432a..986e80a57ee0196d04354e4a4bbfb56857c1e70e 100644
|
| --- a/src/gpu/GrEffect.cpp
|
| +++ b/src/gpu/GrEffect.cpp
|
| @@ -59,7 +59,25 @@
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -GrEffect::~GrEffect() {}
|
| +GrEffectRef::~GrEffectRef() {
|
| + SkASSERT(this->unique());
|
| + fEffect->EffectRefDestroyed();
|
| + fEffect->unref();
|
| +}
|
| +
|
| +void* GrEffectRef::operator new(size_t size) {
|
| + return GrEffect_Globals::GetTLS()->allocate(size);
|
| +}
|
| +
|
| +void GrEffectRef::operator delete(void* target) {
|
| + GrEffect_Globals::GetTLS()->release(target);
|
| +}
|
| +
|
| +///////////////////////////////////////////////////////////////////////////////
|
| +
|
| +GrEffect::~GrEffect() {
|
| + SkASSERT(NULL == fEffectRef);
|
| +}
|
|
|
| const char* GrEffect::name() const {
|
| return this->getFactory().name();
|
|
|