diff options
author | joshualitt <joshualitt@chromium.org> | 2014-10-09 07:25:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-09 07:25:36 -0700 |
commit | 651713408c5a5d9565665967ad09981250c7a8c9 (patch) | |
tree | b0e890cd8389dd1ee2876763527f25ef044677a2 /src/effects | |
parent | 99d5915a02817659a0eec9f5addfdcf0a03d1aa2 (diff) |
gl programs rewrite
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/07a255310aca9f3e83bf741dc663a58818ad681c
Review URL: https://codereview.chromium.org/628633003
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkColorFilters.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp index ba62817f56..8e10d73a0e 100644 --- a/src/effects/SkColorFilters.cpp +++ b/src/effects/SkColorFilters.cpp @@ -406,7 +406,13 @@ GrFragmentProcessor* ModeColorFilterEffect::TestCreate(SkRandom* rand, while (SkXfermode::kDst_Mode == mode) { mode = static_cast<SkXfermode::Mode>(rand->nextRangeU(0, SkXfermode::kLastCoeffMode)); } - GrColor color = rand->nextU(); + + // pick a random premul color + uint8_t alpha = rand->nextULessThan(256); + GrColor color = GrColorPackRGBA(rand->nextRangeU(0, alpha), + rand->nextRangeU(0, alpha), + rand->nextRangeU(0, alpha), + alpha); return ModeColorFilterEffect::Create(color, mode); } |