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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 virtual void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcO
ptInfo& coveragePOI, | 257 virtual void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcO
ptInfo& coveragePOI, |
258 InvariantOutput*) const = 0; | 258 InvariantOutput*) const = 0; |
259 | 259 |
260 /** | 260 /** |
261 * Determines whether multiplying the computed per-pixel color by the pixel'
s fractional | 261 * Determines whether multiplying the computed per-pixel color by the pixel'
s fractional |
262 * coverage before the blend will give the correct final destination color.
In general it | 262 * coverage before the blend will give the correct final destination color.
In general it |
263 * will not as coverage is applied after blending. | 263 * will not as coverage is applied after blending. |
264 */ | 264 */ |
265 virtual bool canTweakAlphaForCoverage() const = 0; | 265 virtual bool canTweakAlphaForCoverage() const = 0; |
266 | 266 |
| 267 /** |
| 268 * Returns whether the Xfer processor will blend coherently with draw calls
that have been |
| 269 * submitted previously. This is generally true, however some blending exten
sions require the |
| 270 * use of a barrier. |
| 271 */ |
| 272 virtual bool willBlendCoherently(const GrDrawTargetCaps& caps) const = 0; |
| 273 |
267 bool willNeedDstCopy(const GrDrawTargetCaps& caps, const GrProcOptInfo& colo
rPOI, | 274 bool willNeedDstCopy(const GrDrawTargetCaps& caps, const GrProcOptInfo& colo
rPOI, |
268 const GrProcOptInfo& coveragePOI) const; | 275 const GrProcOptInfo& coveragePOI) const; |
269 | 276 |
270 bool isEqual(const GrXPFactory& that) const { | 277 bool isEqual(const GrXPFactory& that) const { |
271 if (this->classID() != that.classID()) { | 278 if (this->classID() != that.classID()) { |
272 return false; | 279 return false; |
273 } | 280 } |
274 return this->onIsEqual(that); | 281 return this->onIsEqual(that); |
275 } | 282 } |
276 | 283 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 enum { | 328 enum { |
322 kIllegalXPFClassID = 0, | 329 kIllegalXPFClassID = 0, |
323 }; | 330 }; |
324 static int32_t gCurrXPFClassID; | 331 static int32_t gCurrXPFClassID; |
325 | 332 |
326 typedef GrProgramElement INHERITED; | 333 typedef GrProgramElement INHERITED; |
327 }; | 334 }; |
328 | 335 |
329 #endif | 336 #endif |
330 | 337 |
OLD | NEW |