OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrGLSLXferProcessor_DEFINED | 8 #ifndef GrGLSLXferProcessor_DEFINED |
9 #define GrGLSLXferProcessor_DEFINED | 9 #define GrGLSLXferProcessor_DEFINED |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 */ | 68 */ |
69 void setData(const GrGLSLProgramDataManager& pdm, const GrXferProcessor& xp)
; | 69 void setData(const GrGLSLProgramDataManager& pdm, const GrXferProcessor& xp)
; |
70 | 70 |
71 protected: | 71 protected: |
72 static void DefaultCoverageModulation(GrGLSLXPFragmentBuilder* fragBuilder, | 72 static void DefaultCoverageModulation(GrGLSLXPFragmentBuilder* fragBuilder, |
73 const char* srcCoverage, | 73 const char* srcCoverage, |
74 const char* dstColor, | 74 const char* dstColor, |
75 const char* outColor, | 75 const char* outColor, |
76 const char* outColorSecondary, | 76 const char* outColorSecondary, |
77 const GrXferProcessor& proc); | 77 const GrXferProcessor& proc); |
78 | 78 |
79 private: | 79 private: |
80 /** | 80 /** |
81 * Called by emitCode() when the XP will not be performing a dst read. This
method is | 81 * Called by emitCode() when the XP will not be performing a dst read. This
method is |
82 * responsible for both blending and coverage. A subclass only needs to impl
ement this method if | 82 * responsible for both blending and coverage. A subclass only needs to impl
ement this method if |
83 * it can construct a GrXferProcessor that will not read the dst color. | 83 * it can construct a GrXferProcessor that will not read the dst color. |
84 */ | 84 */ |
85 virtual void emitOutputsForBlendState(const EmitArgs&) { | 85 virtual void emitOutputsForBlendState(const EmitArgs&) { |
86 SkFAIL("emitOutputsForBlendState not implemented."); | 86 SkFAIL("emitOutputsForBlendState not implemented."); |
87 } | 87 } |
88 | 88 |
(...skipping 12 matching lines...) Expand all Loading... |
101 const GrXferProcessor&) { | 101 const GrXferProcessor&) { |
102 SkFAIL("emitBlendCodeForDstRead not implemented."); | 102 SkFAIL("emitBlendCodeForDstRead not implemented."); |
103 } | 103 } |
104 | 104 |
105 virtual void onSetData(const GrGLSLProgramDataManager&, const GrXferProcesso
r&) = 0; | 105 virtual void onSetData(const GrGLSLProgramDataManager&, const GrXferProcesso
r&) = 0; |
106 | 106 |
107 GrGLSLProgramDataManager::UniformHandle fDstTopLeftUni; | 107 GrGLSLProgramDataManager::UniformHandle fDstTopLeftUni; |
108 GrGLSLProgramDataManager::UniformHandle fDstScaleUni; | 108 GrGLSLProgramDataManager::UniformHandle fDstScaleUni; |
109 }; | 109 }; |
110 #endif | 110 #endif |
OLD | NEW |