| Index: src/gpu/GrEffect.cpp
|
| diff --git a/src/gpu/GrEffect.cpp b/src/gpu/GrEffect.cpp
|
| index 53dabb619c063e30dbf842c8d9df6e22ed7f03c6..653a1da33cb4c2226cf340e7d2e780871d18de39 100644
|
| --- a/src/gpu/GrEffect.cpp
|
| +++ b/src/gpu/GrEffect.cpp
|
| @@ -8,6 +8,7 @@
|
| #include "GrEffect.h"
|
| #include "GrBackendEffectFactory.h"
|
| #include "GrContext.h"
|
| +#include "GrCoordTransform.h"
|
| #include "GrMemoryPool.h"
|
| #include "SkTLS.h"
|
|
|
| @@ -86,6 +87,10 @@ const char* GrEffect::name() const {
|
| return this->getFactory().name();
|
| }
|
|
|
| +void GrEffect::addCoordTransform(const GrCoordTransform* transform) {
|
| + fCoordTransforms.push_back(transform);
|
| +}
|
| +
|
| void GrEffect::addTextureAccess(const GrTextureAccess* access) {
|
| fTextureAccesses.push_back(access);
|
| }
|
| @@ -97,3 +102,16 @@ void* GrEffect::operator new(size_t size) {
|
| void GrEffect::operator delete(void* target) {
|
| GrEffect_Globals::GetTLS()->release(target);
|
| }
|
| +
|
| +#ifdef SK_DEBUG
|
| +void GrEffect::assertEquality(const GrEffect& other) const {
|
| + SkASSERT(this->numTransforms() == other.numTransforms());
|
| + for (int i = 0; i < this->numTransforms(); ++i) {
|
| + SkASSERT(this->coordTransform(i) == other.coordTransform(i));
|
| + }
|
| + SkASSERT(this->numTextures() == other.numTextures());
|
| + for (int i = 0; i < this->numTextures(); ++i) {
|
| + SkASSERT(this->textureAccess(i) == other.textureAccess(i));
|
| + }
|
| +}
|
| +#endif
|
|
|