Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Unified Diff: src/gpu/SkGr.cpp

Issue 580863004: Adding 3D lut color filter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: As color filter instead of image filter Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698