| Index: include/gpu/GrFragmentProcessor.h
|
| diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h
|
| index 3f308d7e75048df485d03aac3e9c148db80fd77f..0c155996d5aec2280e9468d29071d42ddbb76af4 100644
|
| --- a/include/gpu/GrFragmentProcessor.h
|
| +++ b/include/gpu/GrFragmentProcessor.h
|
| @@ -67,6 +67,16 @@ public:
|
| return this->onIsEqual(that);
|
| }
|
|
|
| + /**
|
| + * 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;
|
| +
|
| protected:
|
| /**
|
| * Fragment Processor subclasses call this from their constructor to register coordinate
|
| @@ -101,6 +111,11 @@ protected:
|
| */
|
| void setWillNotUseInputColor() { fWillUseInputColor = false; }
|
|
|
| + /**
|
| + * Subclass implements this to support getConstantColorComponents(...).
|
| + */
|
| + virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const = 0;
|
| +
|
| private:
|
| /**
|
| * Subclass implements this to support isEqual(). It will only be called if it is known that
|
|
|