GrGLVaryingHandler.h 976 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright 2015 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef GrGLVaryingHandler_DEFINED
  8. #define GrGLVaryingHandler_DEFINED
  9. #include "include/private/GrTypesPriv.h"
  10. #include "src/gpu/gl/GrGLProgramDataManager.h"
  11. #include "src/gpu/glsl/GrGLSLVarying.h"
  12. class GrGLVaryingHandler : public GrGLSLVaryingHandler {
  13. public:
  14. GrGLVaryingHandler(GrGLSLProgramBuilder* program)
  15. : INHERITED(program),
  16. fPathProcVaryingInfos(kVaryingsPerBlock) {}
  17. // This function is used by the NVPR PathProcessor to add a varying directly into the fragment
  18. // shader since there is no vertex shader.
  19. VaryingHandle addPathProcessingVarying(const char* name, GrGLSLVarying*);
  20. private:
  21. void onFinalize() override;
  22. GrGLProgramDataManager::VaryingInfoArray fPathProcVaryingInfos;
  23. friend class GrGLProgramBuilder;
  24. typedef GrGLSLVaryingHandler INHERITED;
  25. };
  26. #endif