Chromium Code Reviews| Index: include/gpu/GrXferProcessor.h |
| diff --git a/include/gpu/GrXferProcessor.h b/include/gpu/GrXferProcessor.h |
| index b7d0bdd9fa9ef7717471a3857b9e788e95793378..39dc2120882f7c3d1e31a1519180580fe68ac69c 100644 |
| --- a/include/gpu/GrXferProcessor.h |
| +++ b/include/gpu/GrXferProcessor.h |
| @@ -87,6 +87,16 @@ public: |
| /** Will this prceossor read the destination pixel value? */ |
| bool willReadDstColor() const { return fWillReadDstColor; } |
| + /** |
| + * This function is used to perform optimizations. When called the invarientOuput param |
| + * indicate whether the input components to this processor in the FS will have known values. |
| + * In inout the validFlags member is a bitfield of GrColorComponentFlags. The isSingleComponent |
| + * member indicates whether the input will be 1 or 4 bytes. The function updates the members of |
| + * inout to indicate known values of its output. A component of the color member only has |
| + * meaning if the corresponding bit in validFlags is set. |
| + */ |
| + void computeInvariantOutput(GrInvariantOutput* inout) const; |
|
bsalomon
2014/12/09 20:39:50
Do we need this at all?
|
| + |
| protected: |
| GrXferProcessor() : fWillReadDstColor(false) {} |
| @@ -97,6 +107,11 @@ protected: |
| */ |
| void setWillReadDstColor() { fWillReadDstColor = true; } |
| + /** |
| + * Subclass implements this to support getConstantColorComponents(...). |
|
bsalomon
2014/12/09 20:39:50
comment is wrong?
|
| + */ |
| + virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const = 0; |
| + |
| private: |
| bool fWillReadDstColor; |