Drawable Renderer (#1570), PremultipliedImage is RGBA only

This commit is contained in:
mwilsnd
2023-05-31 10:05:12 -05:00
committed by Bart Louwers
parent 8f3b5ec093
commit f45437b9ab
2 changed files with 1 additions and 8 deletions

View File

@@ -134,15 +134,8 @@ void Texture2D::upload(const PremultipliedImage& image, gfx::UploadPass& uploadP
}
assert(PremultipliedImage::channels == numChannels());
if (PremultipliedImage::channels != numChannels()) {
return;
}
// note: images are always unsigned bytes
assert(PremultipliedImage::channels == getPixelStride());
if (PremultipliedImage::channels != getPixelStride()) {
return;
}
uploadPass.updateTextureResource(*textureResource, size, &image.data[0], pixelFormat, channelType);
}