OLD | NEW |
(Empty) | |
| 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 |
| 8 #ifndef GrGLPathProgram_DEFINED |
| 9 #define GrGLPathProgram_DEFINED |
| 10 |
| 11 #include "gl/GrGLProgram.h" |
| 12 #include "gl/GrGLPathProgramDataManager.h" |
| 13 |
| 14 /* |
| 15 * The default GrGL programs consist of at the very least a vertex and fragment
shader. |
| 16 * 1.3+ Nvpr ignores the vertex shader, but both require |
| 17 * specialized methods for setting transform data. NVPR also requires setting t
he |
| 18 * projection matrix through a special function call. |
| 19 */ |
| 20 class GrGLPathProgram : public GrGLProgram { |
| 21 protected: |
| 22 typedef GrGLPathProgramDataManager::SeparableVaryingInfoArray SeparableVaryi
ngInfoArray; |
| 23 GrGLPathProgram(GrGLGpu*, |
| 24 const GrProgramDesc&, |
| 25 const BuiltinUniformHandles&, |
| 26 GrGLuint programID, |
| 27 const UniformInfoArray&, |
| 28 const SeparableVaryingInfoArray&, |
| 29 GrGLInstalledGeoProc*, |
| 30 GrGLInstalledXferProc* xferProcessor, |
| 31 GrGLInstalledFragProcs* fragmentProcessors, |
| 32 SkTArray<UniformHandle>* passSamplerUniforms); |
| 33 |
| 34 private: |
| 35 void didSetData() override; |
| 36 virtual void setTransformData(const GrPrimitiveProcessor&, |
| 37 const GrPendingFragmentStage&, |
| 38 int index, |
| 39 GrGLInstalledFragProc*) override; |
| 40 virtual void onSetRenderTargetState(const GrPrimitiveProcessor&, const GrPip
eline&); |
| 41 |
| 42 friend class GrGLPathProgramBuilder; |
| 43 |
| 44 GrGLPathProgramDataManager fPathProgramDataManager; |
| 45 |
| 46 typedef GrGLProgram INHERITED; |
| 47 }; |
| 48 |
| 49 #endif |
OLD | NEW |