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

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: Add Brian's suggestions 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..16c6475e339e0d94a6bd07b17f70b76a827a2135 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -427,20 +427,13 @@ 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 (neither means using texture atlas)
+ kTwoColorKey = 4,
+ kThreeColorKey = 6,
};
- 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