no need to convert to RGBA8888 when it is DEFAULT (#20397)

This commit is contained in:
coulsonwang 2019-12-06 15:23:00 +08:00 committed by halx99
parent f584ce4bc5
commit 2ed3343bea
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ bool TextureCube::init(const std::string& positive_x, const std::string& negativ
uint8_t *useData = pData; uint8_t *useData = pData;
//convert pixel format to RGBA //convert pixel format to RGBA
if (ePixelFmt != backend::PixelFormat::RGBA8888) if (ePixelFmt != backend::PixelFormat::RGBA8888 && ePixelFmt != backend::PixelFormat::DEFAULT)
{ {
size_t len = 0; size_t len = 0;
backend::PixelFormatUtils::convertDataToFormat(pData, img->getDataLen(), ePixelFmt, backend::PixelFormat::RGBA8888, &cData, &len); backend::PixelFormatUtils::convertDataToFormat(pData, img->getDataLen(), ePixelFmt, backend::PixelFormat::RGBA8888, &cData, &len);