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

Unified Diff: src/gpu/gl/GrGLProgram.h

Issue 2007973002: Manually generated sRGB mipmaps. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Break long columns Created 4 years, 7 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/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgram.h
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index 7487a1e9007468547e3f97def09e9ec8e01a1b67..9f2b2e9b74318c4c51e7d06cda92621d371bb549 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;
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698