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

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1192463003: Don't call bindTexture from GrGLProgram (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | src/gpu/gl/GrGLProgram.h » ('j') | src/gpu/gl/GrGLProgram.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 625299d58c532c756dbd726b8b07f7a44a5263e4..c4bcf7ff9412fa1e209170a6f37d691e2a66074e 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -1475,7 +1475,14 @@ bool GrGLGpu::flushGLState(const DrawArgs& args) {
this->flushBlend(blendInfo);
}
- program->setData(*args.fPrimitiveProcessor, pipeline, *args.fBatchTracker);
+ SkSTArray<8, const GrTextureAccess*> textureAccesses;
+ program->setData(*args.fPrimitiveProcessor, pipeline, *args.fBatchTracker, &textureAccesses);
+
+ int numTextureAccesses = textureAccesses.count();
+ for (int i = 0; i < numTextureAccesses; i++) {
+ this->bindTexture(i, textureAccesses[i]->getParams(),
+ static_cast<GrGLTexture*>(textureAccesses[i]->getTexture()));
+ }
GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(pipeline.getRenderTarget());
this->flushStencil(pipeline.getStencil());
« no previous file with comments | « no previous file | src/gpu/gl/GrGLProgram.h » ('j') | src/gpu/gl/GrGLProgram.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698