Tracking uniform ownership
This is a prerequisite change for the upcoming sample(child, matrix)
function. By itself, this CL doesn't really change anything; it just
adds an ownership tracking feature which sample(child, matrix) depends
on.
Change-Id: I98b12e5fb062a2535af367931e7a932ea9c63a59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281337
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/gl/GrGLProgramDataManager.h b/src/gpu/gl/GrGLProgramDataManager.h
index 43dee9d..5306e61 100644
--- a/src/gpu/gl/GrGLProgramDataManager.h
+++ b/src/gpu/gl/GrGLProgramDataManager.h
@@ -12,6 +12,7 @@
#include "src/gpu/GrShaderVar.h"
#include "src/gpu/GrTAllocator.h"
#include "src/gpu/glsl/GrGLSLProgramDataManager.h"
+#include "src/gpu/glsl/GrGLSLUniformHandler.h"
#include "include/private/SkTArray.h"
@@ -25,22 +26,20 @@
*/
class GrGLProgramDataManager : public GrGLSLProgramDataManager {
public:
- struct UniformInfo {
- GrShaderVar fVariable;
- uint32_t fVisibility;
- GrGLint fLocation;
+ struct GLUniformInfo : public GrGLSLUniformHandler::UniformInfo {
+ GrGLint fLocation;
};
struct VaryingInfo {
GrShaderVar fVariable;
- GrGLint fLocation;
+ GrGLint fLocation;
};
// This uses an allocator rather than array so that the GrShaderVars don't move in memory
// after they are inserted. Users of GrGLShaderBuilder get refs to the vars and ptrs to their
// name strings. Otherwise, we'd have to hand out copies.
- typedef GrTAllocator<UniformInfo> UniformInfoArray;
- typedef GrTAllocator<VaryingInfo> VaryingInfoArray;
+ typedef GrTAllocator<GLUniformInfo> UniformInfoArray;
+ typedef GrTAllocator<VaryingInfo> VaryingInfoArray;
GrGLProgramDataManager(GrGLGpu*, GrGLuint programID, const UniformInfoArray&,
const VaryingInfoArray&);