Chromium Code Reviews| Index: src/gpu/gl/GrGLXferProcessor.h |
| diff --git a/src/gpu/gl/GrGLXferProcessor.h b/src/gpu/gl/GrGLXferProcessor.h |
| index 6b05dcb37d6b653c76144c5e9b2336bc404ae5fe..265eb9fe7e86b5880be25afe9c2f32bf0cac744e 100644 |
| --- a/src/gpu/gl/GrGLXferProcessor.h |
| +++ b/src/gpu/gl/GrGLXferProcessor.h |
| @@ -59,7 +59,22 @@ public: |
| void setData(const GrGLProgramDataManager& pdm, const GrXferProcessor& xp); |
| private: |
| - virtual void onEmitCode(const EmitArgs&) = 0; |
| + /** |
| + * Called by emitCode() when the XP will not be performing a dst read. This method is |
| + * responsible for both blending and coverage. A subclass only needs to implement this method if |
| + * it can construct a GrXferProcessor that will not read the dst color. |
| + */ |
| + virtual void onEmitCode(const EmitArgs&) { SkFAIL("onEmitCode not implemented."); } |
|
egdaniel
2015/06/05 16:44:01
So some pretty unhelpful feed back here...but some
Chris Dalton
2015/06/05 17:41:36
I've thought about it some and have come up with s
|
| + |
| + /** |
| + * Called by emitCode() when the XP will perform a dst read. This method only needs to supply |
| + * the blending logic. The base class applies coverage. A subclass only needs to implement this |
| + * method if it can construct a GrXferProcessor that reads the dst color. |
| + */ |
| + virtual void onEmitShaderBlend(GrGLXPBuilder*, const char* srcColor, const char* dstColor, |
| + const char* outColor, const GrXferProcessor&) { |
| + SkFAIL("onEmitShaderBlend not implemented."); |
| + } |
| virtual void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) = 0; |