Index: src/gpu/SkGr.cpp |
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp |
index 56f3a16b6dceb8525e70e482cb9eaf264d98cc7a..af76b2c3bcc77e2a19cb4b85a10066901eaa9ef3 100644 |
--- a/src/gpu/SkGr.cpp |
+++ b/src/gpu/SkGr.cpp |
@@ -107,8 +107,13 @@ static void generate_bitmap_cache_id(const SkBitmap& bitmap, GrCacheID* id) { |
static void generate_bitmap_texture_desc(const SkBitmap& bitmap, GrTextureDesc* desc) { |
desc->fFlags = kNone_GrTextureFlags; |
- desc->fWidth = bitmap.width(); |
- desc->fHeight = bitmap.height(); |
+ if (bitmap.is3DLut()) { |
+ desc->fWidth = desc->fHeight = desc->fDepth = bitmap.width(); |
+ } else { |
+ desc->fWidth = bitmap.width(); |
+ desc->fHeight = bitmap.height(); |
+ desc->fDepth = 0; |
+ } |
desc->fConfig = SkImageInfo2GrPixelConfig(bitmap.info()); |
desc->fSampleCnt = 0; |
} |