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

Unified Diff: src/effects/gradients/SkGradientShaderPriv.h

Issue 2158323003: Clarify GrGradientEffect key enum (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkGradientShaderPriv.h
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h
index 0280fcac8cb38f84c4b86261359424f2a8b65d1d..b09f173594c16cc65ef9ef9eb16265520e1fec9b 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -427,20 +427,20 @@ protected:
private:
enum {
- kPremulTypeKeyBitCnt = 1,
- kPremulTypeMask = 1,
- kPremulBeforeInterpKey = kPremulTypeMask,
-
- kTwoColorKey = 2 << kPremulTypeKeyBitCnt,
- kThreeColorKey = 3 << kPremulTypeKeyBitCnt,
- kColorKeyMask = kTwoColorKey | kThreeColorKey,
- kColorKeyBitCnt = 2,
-
- // Subclasses must shift any key bits they produce up by this amount
- // and combine with the result of GenBaseGradientKey.
- kBaseKeyBitCnt = (kPremulTypeKeyBitCnt + kColorKeyBitCnt)
+ // First bit for premul before/after interp
+ kPremulBeforeInterpKey = 1,
+
+ // Next two bits for 2/3 color type
bsalomon 2016/07/19 14:48:37 Maybe comment that using neither means texture? Or
+ kTwoColorKey = 4,
+ kThreeColorKey = 6,
+
+ // Next two bits for tilemode
bsalomon 2016/07/19 14:48:37 Add these when you're ready to use them?
+ kClampTileMode = 8,
+ kRepeatTileMode = 16,
+ kMirrorTileMode = 24,
+
+ kReservedLowerBits = 5,
};
- GR_STATIC_ASSERT(kBaseKeyBitCnt <= 32);
SkScalar fCachedYCoord;
GrGLSLProgramDataManager::UniformHandle fFSYUni;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698