Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: src/gpu/GrFragmentProcessor.cpp

Issue 1870893002: Implement texel buffers (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_texelfetch
Patch Set: GrBuffer(Access) into include/gpu Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrBuffer.h ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrFragmentProcessor.cpp
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index 46efd8069071fa93e968cbc51f5187e2c0a6e2df..9524c84df1e0d881b2f94524194385bfc5edc07d 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -27,7 +27,7 @@ GrFragmentProcessor::~GrFragmentProcessor() {
bool GrFragmentProcessor::isEqual(const GrFragmentProcessor& that,
bool ignoreCoordTransforms) const {
if (this->classID() != that.classID() ||
- !this->hasSameTextureAccesses(that)) {
+ !this->hasSameSamplers(that)) {
return false;
}
if (ignoreCoordTransforms) {
@@ -69,6 +69,15 @@ void GrFragmentProcessor::addTextureAccess(const GrTextureAccess* textureAccess)
fNumTexturesExclChildren++;
}
+void GrFragmentProcessor::addBufferAccess(const GrBufferAccess* bufferAccess) {
+ // Can't add buffer accesses after registering any children since their buffer accesses have
+ // already been bubbled up into our fBufferAccesses array
+ SkASSERT(fChildProcessors.empty());
+
+ INHERITED::addBufferAccess(bufferAccess);
+ fNumBuffersExclChildren++;
+}
+
void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) {
// Can't add transforms after registering any children since their transforms have already been
// bubbled up into our fCoordTransforms array
« no previous file with comments | « src/gpu/GrBuffer.h ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698