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

Unified Diff: src/gpu/GrPipeline.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/gpu/GrFragmentProcessor.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPipeline.cpp
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index f7ad8821724b8acc43f30ea0ce35bd730636d9fd..d9ebcf85f92423e6780c0c05cdc500e14d594a7d 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -176,15 +176,10 @@ GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args,
}
static void add_dependencies_for_processor(const GrFragmentProcessor* proc, GrRenderTarget* rt) {
- for (int i = 0; i < proc->numChildProcessors(); ++i) {
- // need to recurse
- add_dependencies_for_processor(&proc->childProcessor(i), rt);
- }
-
- for (int i = 0; i < proc->numTextures(); ++i) {
- GrTexture* texture = proc->textureAccess(i).getTexture();
+ GrFragmentProcessor::TextureAccessIter iter(proc);
+ while (const GrTextureAccess* access = iter.next()) {
SkASSERT(rt->getLastDrawTarget());
- rt->getLastDrawTarget()->addDependency(texture);
+ rt->getLastDrawTarget()->addDependency(access->getTexture());
}
}
« no previous file with comments | « src/gpu/GrFragmentProcessor.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698