From 445fc43b9d59b53845254065feb905732cdde110 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Mon, 3 Aug 2015 10:15:25 -0700 Subject: [PATCH] Update assert to allow config conversion effect for all configs when not premul/unpremuling TBR=robertphillips@google.com Review URL: https://codereview.chromium.org/1258763006 --- src/gpu/effects/GrConfigConversionEffect.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp index 8238dcd..704eb0c 100644 --- a/src/gpu/effects/GrConfigConversionEffect.cpp +++ b/src/gpu/effects/GrConfigConversionEffect.cpp @@ -105,8 +105,11 @@ GrConfigConversionEffect::GrConfigConversionEffect(GrProcessorDataManager* procD , fSwapRedAndBlue(swapRedAndBlue) , fPMConversion(pmConversion) { this->initClassID(); - SkASSERT(kRGBA_8888_GrPixelConfig == texture->config() || - kBGRA_8888_GrPixelConfig == texture->config()); + // We expect to get here with non-BGRA/RGBA only if we're doing not doing a premul/unpremul + // conversion. + SkASSERT((kRGBA_8888_GrPixelConfig == texture->config() || + kBGRA_8888_GrPixelConfig == texture->config()) || + kNone_PMConversion == pmConversion); // Why did we pollute our texture cache instead of using a GrSingleTextureEffect? SkASSERT(swapRedAndBlue || kNone_PMConversion != pmConversion); } -- 2.7.4