Skip to content

Commit 9cf6f6e

Browse files
Romain GuyAndroid (Google) Code Review
authored andcommitted
Merge "Optimize gradient textures"
2 parents c64c1cb + eb61cd8 commit 9cf6f6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/hwui/GradientCache.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void GradientCache::clear() {
117117
Texture* GradientCache::addLinearGradient(GradientCacheEntry& gradient,
118118
uint32_t* colors, float* positions, int count, SkShader::TileMode tileMode) {
119119
SkBitmap bitmap;
120-
bitmap.setConfig(SkBitmap::kARGB_8888_Config, 1024, 1);
120+
bitmap.setConfig(SkBitmap::kARGB_8888_Config, 256 * (count - 1), 1);
121121
bitmap.allocPixels();
122122
bitmap.eraseColor(0);
123123

0 commit comments

Comments
 (0)