aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLProgram.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLProgram.h')
-rw-r--r--src/gpu/gl/GrGLProgram.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index 7487a1e900..9f2b2e9b74 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -96,6 +96,12 @@ public:
*/
void setData(const GrPrimitiveProcessor&, const GrPipeline&);
+ /**
+ * This function retrieves the textures that need to be used by each GrGL*Processor, and
+ * ensures that any textures requiring mipmaps have their mipmaps correctly built.
+ */
+ void generateMipmaps(const GrPrimitiveProcessor&, const GrPipeline&);
+
protected:
typedef GrGLSLProgramDataManager::UniformHandle UniformHandle;
typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray;
@@ -122,6 +128,9 @@ protected:
// Helper for setData() that binds textures and texel buffers to the appropriate texture units
void bindTextures(const GrProcessor&, bool allowSRGBInputs, int* nextSamplerIdx);
+ // Helper for generateMipmaps() that ensures mipmaps are up to date
+ void generateMipmaps(const GrProcessor&, bool allowSRGBInputs);
+
// these reflect the current values of uniforms (GL uniform values travel with program)
RenderTargetState fRenderTargetState;
BuiltinUniformHandles fBuiltinUniformHandles;