From 24182d3451b828e659b55dd7199c807dc5a33a99 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 7 Jun 2018 15:27:50 -0700 Subject: [PATCH] Remove compression variables & functions in image.cpp --- libraries/image/src/image/Image.cpp | 56 ----------------------------- 1 file changed, 56 deletions(-) diff --git a/libraries/image/src/image/Image.cpp b/libraries/image/src/image/Image.cpp index 7faf811dec..f812e515de 100644 --- a/libraries/image/src/image/Image.cpp +++ b/libraries/image/src/image/Image.cpp @@ -48,11 +48,6 @@ std::atomic RECTIFIED_TEXTURE_COUNT{ 0 }; static const auto HDR_FORMAT = gpu::Element::COLOR_R11G11B10; -static std::atomic compressColorTextures { false }; -static std::atomic compressNormalTextures { false }; -static std::atomic compressGrayscaleTextures { false }; -static std::atomic compressCubeTextures { false }; - uint rectifyDimension(const uint& dimension) { if (dimension == 0) { return 0; @@ -185,55 +180,6 @@ gpu::TexturePointer TextureUsage::createCubeTextureFromImageWithoutIrradiance(QI return processCubeTextureColorFromImage(std::move(srcImage), srcImageName, compress, false, abortProcessing); } - -bool isColorTexturesCompressionEnabled() { -#if CPU_MIPMAPS - return compressColorTextures.load(); -#else - return false; -#endif -} - -bool isNormalTexturesCompressionEnabled() { -#if CPU_MIPMAPS - return compressNormalTextures.load(); -#else - return false; -#endif -} - -bool isGrayscaleTexturesCompressionEnabled() { -#if CPU_MIPMAPS - return compressGrayscaleTextures.load(); -#else - return false; -#endif -} - -bool isCubeTexturesCompressionEnabled() { -#if CPU_MIPMAPS - return compressCubeTextures.load(); -#else - return false; -#endif -} - -void setColorTexturesCompressionEnabled(bool enabled) { - compressColorTextures.store(enabled); -} - -void setNormalTexturesCompressionEnabled(bool enabled) { - compressNormalTextures.store(enabled); -} - -void setGrayscaleTexturesCompressionEnabled(bool enabled) { - compressGrayscaleTextures.store(enabled); -} - -void setCubeTexturesCompressionEnabled(bool enabled) { - compressCubeTextures.store(enabled); -} - static float denormalize(float value, const float minValue) { return value < minValue ? 0.0f : value; } @@ -956,7 +902,6 @@ gpu::TexturePointer TextureUsage::process2DTextureNormalMapFromImage(QImage&& sr if ((image.width() > 0) && (image.height() > 0)) { gpu::Element formatMip; gpu::Element formatGPU; - if (isNormalTexturesCompressionEnabled()) { if (compress) { formatGPU = gpu::Element::COLOR_COMPRESSED_BCX_XY; } else { @@ -997,7 +942,6 @@ gpu::TexturePointer TextureUsage::process2DTextureGrayscaleFromImage(QImage&& sr if ((image.width() > 0) && (image.height() > 0)) { gpu::Element formatMip; gpu::Element formatGPU; - if (isGrayscaleTexturesCompressionEnabled()) { if (compress) { formatGPU = gpu::Element::COLOR_COMPRESSED_BCX_RED; } else {