| 578 | } |
| 579 | |
| 580 | bool Texture2D::updateTextureDescriptor(const backend::TextureDescriptor& descriptor, bool preMultipliedAlpha) |
| 581 | { |
| 582 | AX_ASSERT(_texture); |
| 583 | |
| 584 | _texture->updateTextureDescriptor(descriptor); |
| 585 | _pixelsWide = _contentSize.width = _texture->getWidth(); |
| 586 | _pixelsHigh = _contentSize.height = _texture->getHeight(); |
| 587 | setPremultipliedAlpha(preMultipliedAlpha); |
| 588 | |
| 589 | setRenderTarget(descriptor.textureUsage == TextureUsage::RENDER_TARGET); |
| 590 | |
| 591 | if (_pixelFormat == PixelFormat::NONE) |
| 592 | _pixelFormat = descriptor.textureFormat; |
| 593 | |
| 594 | return true; |
| 595 | } |
| 596 | |
| 597 | void Texture2D::setRenderTarget(bool renderTarget) |
| 598 | { |
no test coverage detected