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

Unified Diff: src/gpu/effects/GrSimpleTextureEffect.cpp

Issue 1885863004: Refactor how we store and use samplers in Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: src/gpu/effects/GrSimpleTextureEffect.cpp
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index f4cbd06af9d474298554201859b1b04f44878654..0af9cddcc3ba845ecf49c66e340680937076016a 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -10,16 +10,18 @@
#include "GrTexture.h"
#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
+#include "glsl/GrGLSLUniformHandler.h"
class GrGLSimpleTextureEffect : public GrGLSLFragmentProcessor {
public:
void emitCode(EmitArgs& args) override {
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
fragBuilder->codeAppendf("%s = ", args.fOutputColor);
+ const GrGLSLSampler& sampler = args.fUniformHandler->getSampler(args.fTexSamplers[0]);
fragBuilder->appendTextureLookupAndModulate(args.fInputColor,
- args.fTexSamplers[0],
- args.fCoords[0].c_str(),
- args.fCoords[0].getType());
+ sampler,
+ args.fCoords[0].c_str(),
+ args.fCoords[0].getType());
fragBuilder->codeAppend(";");
}

Powered by Google App Engine
This is Rietveld 408576698