From 2ed3343beae3b37c49b291d51cbc7f688bc81de6 Mon Sep 17 00:00:00 2001 From: coulsonwang Date: Fri, 6 Dec 2019 15:23:00 +0800 Subject: [PATCH] no need to convert to RGBA8888 when it is DEFAULT (#20397) --- cocos/renderer/CCTextureCube.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/renderer/CCTextureCube.cpp b/cocos/renderer/CCTextureCube.cpp index ffe44bc428..53d308228d 100644 --- a/cocos/renderer/CCTextureCube.cpp +++ b/cocos/renderer/CCTextureCube.cpp @@ -228,7 +228,7 @@ bool TextureCube::init(const std::string& positive_x, const std::string& negativ uint8_t *useData = pData; //convert pixel format to RGBA - if (ePixelFmt != backend::PixelFormat::RGBA8888) + if (ePixelFmt != backend::PixelFormat::RGBA8888 && ePixelFmt != backend::PixelFormat::DEFAULT) { size_t len = 0; backend::PixelFormatUtils::convertDataToFormat(pData, img->getDataLen(), ePixelFmt, backend::PixelFormat::RGBA8888, &cData, &len);