| 423 | } |
| 424 | |
| 425 | void LayerTestBlend::newBlend(float dt) |
| 426 | { |
| 427 | auto layer = (LayerColor*)getChildByTag(kTagLayer); |
| 428 | |
| 429 | backend::BlendFactor src; |
| 430 | backend::BlendFactor dst; |
| 431 | |
| 432 | if (layer->getBlendFunc().dst == backend::BlendFactor::ZERO) |
| 433 | { |
| 434 | src = backend::BlendFactor::SRC_ALPHA; |
| 435 | dst = backend::BlendFactor::ONE_MINUS_SRC_ALPHA; |
| 436 | } |
| 437 | else |
| 438 | { |
| 439 | src = backend::BlendFactor::ONE_MINUS_DST_COLOR; |
| 440 | dst = backend::BlendFactor::ZERO; |
| 441 | } |
| 442 | |
| 443 | BlendFunc bf = {src, dst}; |
| 444 | layer->setBlendFunc(bf); |
| 445 | } |
| 446 | |
| 447 | std::string LayerTestBlend::subtitle() const |
| 448 | { |
nothing calls this directly
no test coverage detected