Loading libs/hwui/GradientCache.cpp +5 −2 Original line number Original line Diff line number Diff line Loading @@ -148,8 +148,11 @@ void GradientCache::getGradientInfo(const uint32_t* colors, const int count, GradientInfo& info) { GradientInfo& info) { uint32_t width = 256 * (count - 1); uint32_t width = 256 * (count - 1); if (!mHasNpot) { // If the npot extension is not supported we cannot use non-clamp width = 1 << (31 - __builtin_clz(width)); // wrap modes. We therefore find the nearest largest power of 2 // unless width is already a power of 2 if (!mHasNpot && (width & (width - 1)) != 0) { width = 1 << (32 - __builtin_clz(width)); } } bool hasAlpha = false; bool hasAlpha = false; Loading Loading
libs/hwui/GradientCache.cpp +5 −2 Original line number Original line Diff line number Diff line Loading @@ -148,8 +148,11 @@ void GradientCache::getGradientInfo(const uint32_t* colors, const int count, GradientInfo& info) { GradientInfo& info) { uint32_t width = 256 * (count - 1); uint32_t width = 256 * (count - 1); if (!mHasNpot) { // If the npot extension is not supported we cannot use non-clamp width = 1 << (31 - __builtin_clz(width)); // wrap modes. We therefore find the nearest largest power of 2 // unless width is already a power of 2 if (!mHasNpot && (width & (width - 1)) != 0) { width = 1 << (32 - __builtin_clz(width)); } } bool hasAlpha = false; bool hasAlpha = false; Loading