| Index: src/gpu/GrProcessor.cpp
|
| diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
|
| index fdfbbb571358101462019474a83f9f738f4a05d7..0d3f8d916684d8c3766795ebd8e313d3020cd044 100644
|
| --- a/src/gpu/GrProcessor.cpp
|
| +++ b/src/gpu/GrProcessor.cpp
|
| @@ -106,6 +106,11 @@ void GrProcessor::addTextureAccess(const GrTextureAccess* access) {
|
| this->addGpuResource(access->getProgramTexture());
|
| }
|
|
|
| +void GrProcessor::addBufferAccess(const GrBufferAccess* access) {
|
| + fBufferAccesses.push_back(access);
|
| + this->addGpuResource(access->getProgramBuffer());
|
| +}
|
| +
|
| void* GrProcessor::operator new(size_t size) {
|
| return MemoryPoolAccessor().pool()->allocate(size);
|
| }
|
| @@ -114,8 +119,8 @@ void GrProcessor::operator delete(void* target) {
|
| return MemoryPoolAccessor().pool()->release(target);
|
| }
|
|
|
| -bool GrProcessor::hasSameTextureAccesses(const GrProcessor& that) const {
|
| - if (this->numTextures() != that.numTextures()) {
|
| +bool GrProcessor::hasSameSamplers(const GrProcessor& that) const {
|
| + if (this->numTextures() != that.numTextures() || this->numBuffers() != that.numBuffers()) {
|
| return false;
|
| }
|
| for (int i = 0; i < this->numTextures(); ++i) {
|
| @@ -123,6 +128,11 @@ bool GrProcessor::hasSameTextureAccesses(const GrProcessor& that) const {
|
| return false;
|
| }
|
| }
|
| + for (int i = 0; i < this->numBuffers(); ++i) {
|
| + if (this->bufferAccess(i) != that.bufferAccess(i)) {
|
| + return false;
|
| + }
|
| + }
|
| return true;
|
| }
|
|
|
|
|