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

Unified Diff: src/gpu/vk/GrVkPipelineState.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/vk/GrVkGpuCommandBuffer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkPipelineState.cpp
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp
index 73ff62ed98be7ef2d0b61f7a812c0fdd6fd6971b..48724c07bafde7e9625d13d78fb7ecaef27a40df 100644
--- a/src/gpu/vk/GrVkPipelineState.cpp
+++ b/src/gpu/vk/GrVkPipelineState.cpp
@@ -198,11 +198,17 @@ void GrVkPipelineState::setData(GrVkGpu* gpu,
GrFragmentProcessor::CoordTransformIter(pipeline));
append_texture_bindings(primProc, &textureBindings);
- for (int i = 0; i < fFragmentProcessors.count(); ++i) {
- const GrFragmentProcessor& processor = pipeline.getFragmentProcessor(i);
- fFragmentProcessors[i]->setData(fDataManager, processor);
- append_texture_bindings(processor, &textureBindings);
- }
+ GrFragmentProcessor::Iter iter(pipeline);
+ GrGLSLFragmentProcessor::Iter glslIter(fFragmentProcessors.begin(),
+ fFragmentProcessors.count());
+ const GrFragmentProcessor* fp = iter.next();
+ GrGLSLFragmentProcessor* glslFP = glslIter.next();
+ while (fp && glslFP) {
+ glslFP->setData(fDataManager, *fp);
+ append_texture_bindings(*fp, &textureBindings);
+ fp = iter.next(), glslFP = glslIter.next();
+ }
+ SkASSERT(!fp && !glslFP);
fXferProcessor->setData(fDataManager, pipeline.getXferProcessor());
append_texture_bindings(pipeline.getXferProcessor(), &textureBindings);
« no previous file with comments | « src/gpu/vk/GrVkGpuCommandBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698