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

Unified Diff: src/gpu/GrFragmentProcessor.cpp

Issue 2365943003: Stop aggregating texture/buffer access objects in GrFragmentProcessor parents. (Closed)
Patch Set: Readd base class, rebase Created 4 years, 3 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/effects/gradients/SkGradientShaderPriv.h ('k') | src/gpu/GrPipeline.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 3dfe25ea28517e4eb14ad4edcb137a90db73b71a..72336587c45414f9be0f5b8026924cc2d0dee0d4 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -57,40 +57,20 @@ GrGLSLFragmentProcessor* GrFragmentProcessor::createGLSLInstance() const {
}
void GrFragmentProcessor::addTextureAccess(const GrTextureAccess* textureAccess) {
- // Can't add texture accesses after registering any children since their texture accesses have
- // already been bubbled up into our fTextureAccesses array
- SkASSERT(fChildProcessors.empty());
-
INHERITED::addTextureAccess(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
- SkASSERT(fChildProcessors.empty());
-
fCoordTransforms.push_back(transform);
fUsesLocalCoords = fUsesLocalCoords || transform->sourceCoords() == kLocal_GrCoordSet;
SkDEBUGCODE(transform->setInProcessor();)
}
int GrFragmentProcessor::registerChildProcessor(sk_sp<GrFragmentProcessor> child) {
- // Append the child's textures array to our textures array
- if (!child->fTextureAccesses.empty()) {
- fTextureAccesses.push_back_n(child->fTextureAccesses.count(),
- child->fTextureAccesses.begin());
- }
-
this->combineRequiredFeatures(*child);
if (child->usesLocalCoords()) {
@@ -424,18 +404,3 @@ const GrFragmentProcessor* GrFragmentProcessor::Iter::next() {
return back;
}
-//////////////////////////////////////////////////////////////////////////////
-
-const GrCoordTransform* GrFragmentProcessor::CoordTransformIter::next() {
- if (!fCurrFP) {
- return nullptr;
- }
- while (fCTIdx == fCurrFP->numCoordTransforms()) {
- fCTIdx = 0;
- fCurrFP = fFPIter.next();
- if (!fCurrFP) {
- return nullptr;
- }
- }
- return &fCurrFP->coordTransform(fCTIdx++);
-}
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698