OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
10 | 10 |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 | 438 |
439 /** | 439 /** |
440 * These functions create premul <-> unpremul effects if it is possible to g
enerate a pair | 440 * These functions create premul <-> unpremul effects if it is possible to g
enerate a pair |
441 * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. O
therwise, they | 441 * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. O
therwise, they |
442 * return NULL. | 442 * return NULL. |
443 */ | 443 */ |
444 const GrFragmentProcessor* createPMToUPMEffect(GrProcessorDataManager*, GrTe
xture*, | 444 const GrFragmentProcessor* createPMToUPMEffect(GrProcessorDataManager*, GrTe
xture*, |
445 bool swapRAndB, const SkMatri
x&); | 445 bool swapRAndB, const SkMatri
x&); |
446 const GrFragmentProcessor* createUPMToPMEffect(GrProcessorDataManager*, GrTe
xture*, | 446 const GrFragmentProcessor* createUPMToPMEffect(GrProcessorDataManager*, GrTe
xture*, |
447 bool swapRAndB, const SkMatri
x&); | 447 bool swapRAndB, const SkMatri
x&); |
| 448 /** Returns true if we've already determined that createPMtoUPMEffect and cr
eateUPMToPMEffect |
| 449 will fail. In such cases fall back to SW conversion. */ |
| 450 bool didFailPMUPMConversionTest() const; |
448 | 451 |
449 /** | 452 /** |
450 * This callback allows the resource cache to callback into the GrContext | 453 * This callback allows the resource cache to callback into the GrContext |
451 * when the cache is still over budget after a purge. | 454 * when the cache is still over budget after a purge. |
452 */ | 455 */ |
453 static void OverBudgetCB(void* data); | 456 static void OverBudgetCB(void* data); |
454 | 457 |
455 /** | 458 /** |
456 * A callback similar to the above for use by the TextBlobCache | 459 * A callback similar to the above for use by the TextBlobCache |
457 * TODO move textblob draw calls below context so we can use the call above. | 460 * TODO move textblob draw calls below context so we can use the call above. |
458 */ | 461 */ |
459 static void TextBlobCacheOverBudgetCB(void* data); | 462 static void TextBlobCacheOverBudgetCB(void* data); |
460 | 463 |
461 typedef SkRefCnt INHERITED; | 464 typedef SkRefCnt INHERITED; |
462 }; | 465 }; |
463 | 466 |
464 #endif | 467 #endif |
OLD | NEW |