diff --git a/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_gl_resize.cpp b/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_gl_resize.cpp index 9874932063534494f07a56a420139705868830e6..907f355cc6bb992e4b362ef27891233cbb3a08c9 100644 --- a/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_gl_resize.cpp +++ b/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_gl_resize.cpp @@ -20,6 +20,7 @@ #include #include #include "image_source.h" +#include "image_system_properties.h" #include "image_type.h" #include "image_utils.h" #include "media_errors.h" @@ -173,9 +174,14 @@ bool ScalePixelMapWithGPU(PixelMap &pixelMap, const Size &desiredSize) .context = pixelMap.GetFd(), }; gpuTransform.transformationType = TransformationType::SCALE; - if (PixelMapPostProcWithGL(pixelMap, gpuTransform)) { - IMAGE_LOGI("slr_gpu ScalePixelMapWithGPU success"); + if (!ImageSystemProperties::GetGenThumbWithGpu()) { + pixelMap.scale(desiredSize.width / imageInfo.size.width, desiredSize.height / imageInfo.size.height); return true; + } else { + if (PixelMapPostProcWithGL(pixelMap, gpuTransform)) { + IMAGE_LOGI("slr_gpu ScalePixelMapWithGPU success"); + return true; + } } return false; }