| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrXferProcessor_DEFINED | 8 #ifndef GrXferProcessor_DEFINED |
| 9 #define GrXferProcessor_DEFINED | 9 #define GrXferProcessor_DEFINED |
| 10 | 10 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 protected: | 127 protected: |
| 128 GrXferProcessor() : fWillReadDstColor(false) {} | 128 GrXferProcessor() : fWillReadDstColor(false) {} |
| 129 | 129 |
| 130 /** | 130 /** |
| 131 * If the prceossor subclass will read the destination pixel value then it m
ust call this | 131 * If the prceossor subclass will read the destination pixel value then it m
ust call this |
| 132 * function from its constructor. Otherwise, when its generated backend-spec
ific prceossor class | 132 * function from its constructor. Otherwise, when its generated backend-spec
ific prceossor class |
| 133 * attempts to generate code that reads the destination pixel it will fail. | 133 * attempts to generate code that reads the destination pixel it will fail. |
| 134 */ | 134 */ |
| 135 void setWillReadDstColor() { fWillReadDstColor = true; } | 135 void setWillReadDstColor() { fWillReadDstColor = true; } |
| 136 | 136 |
| 137 /** | |
| 138 * Subclass implements this to support getConstantColorComponents(...). | |
| 139 */ | |
| 140 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const = 0; | |
| 141 | |
| 142 private: | 137 private: |
| 143 virtual bool onIsEqual(const GrXferProcessor&) const = 0; | 138 virtual bool onIsEqual(const GrXferProcessor&) const = 0; |
| 144 | 139 |
| 145 bool fWillReadDstColor; | 140 bool fWillReadDstColor; |
| 146 | 141 |
| 147 typedef GrFragmentProcessor INHERITED; | 142 typedef GrFragmentProcessor INHERITED; |
| 148 }; | 143 }; |
| 149 | 144 |
| 150 GR_MAKE_BITFIELD_OPS(GrXferProcessor::OptFlags); | 145 GR_MAKE_BITFIELD_OPS(GrXferProcessor::OptFlags); |
| 151 | 146 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 enum { | 243 enum { |
| 249 kIllegalXPFClassID = 0, | 244 kIllegalXPFClassID = 0, |
| 250 }; | 245 }; |
| 251 static int32_t gCurrXPFClassID; | 246 static int32_t gCurrXPFClassID; |
| 252 | 247 |
| 253 typedef GrProgramElement INHERITED; | 248 typedef GrProgramElement INHERITED; |
| 254 }; | 249 }; |
| 255 | 250 |
| 256 #endif | 251 #endif |
| 257 | 252 |
| OLD | NEW |