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

Unified Diff: src/gpu/glsl/GrGLSLFragmentProcessor.cpp

Issue 1885863004: Refactor how we store and use samplers in Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove unneeded assert 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/glsl/GrGLSLFragmentProcessor.h ('k') | src/gpu/glsl/GrGLSLPrimitiveProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLFragmentProcessor.cpp
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
index 42538eaf0f94efefdf932b046806e1de94ee1a06..9533d5a8cb2136e17bd48d2103f89141aa23c2e7 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
@@ -83,17 +83,16 @@ void GrGLSLFragmentProcessor::internalEmitChild(int childIndex, const char* inpu
firstBufferAt += args.fFp.childProcessor(i).numBuffers();
}
GrGLSLTransformedCoordsArray childCoords;
- SamplerArray childTexSamplers;
- SamplerArray childBufferSamplers;
+ const SamplerHandle* childTexSamplers = nullptr;
+ const SamplerHandle* childBufferSamplers = nullptr;
if (childProc.numTransforms() > 0) {
childCoords.push_back_n(childProc.numTransforms(), &args.fCoords[firstCoordAt]);
}
if (childProc.numTextures() > 0) {
- childTexSamplers.push_back_n(childProc.numTextures(), &args.fTexSamplers[firstTextureAt]);
+ childTexSamplers = &args.fTexSamplers[firstTextureAt];
}
if (childProc.numBuffers() > 0) {
- childBufferSamplers.push_back_n(childProc.numBuffers(),
- &args.fBufferSamplers[firstBufferAt]);
+ childBufferSamplers = &args.fBufferSamplers[firstBufferAt];
}
// emit the code for the child in its own scope
« no previous file with comments | « src/gpu/glsl/GrGLSLFragmentProcessor.h ('k') | src/gpu/glsl/GrGLSLPrimitiveProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698