diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp index 56feb8940f..4318e717ae 100644 --- a/src/core/SkXfermode.cpp +++ b/src/core/SkXfermode.cpp @@ -1368,7 +1368,11 @@ GrEffectRef* XferEffect::TestCreate(SkMWCRandom* rand, GrContext*, const GrDrawTargetCaps&, GrTexture*[]) { - int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLastSeparableMode); + int mode; + do { + mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLastSeparableMode); + } while (mode == SkXfermode::kHardLight_Mode); + static AutoEffectUnref gEffect(SkNEW_ARGS(XferEffect, (static_cast(mode)))); return CreateEffectRef(gEffect); }