aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-08-03 10:15:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-03 10:15:25 -0700
commit445fc43b9d59b53845254065feb905732cdde110 (patch)
treeb92eaf00ed54dbba31237b6cea701940401af0fd /src
parente494a58de341daf08ae23007694a4f6ed4d9cd06 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 8238dcda0c..704eb0c01d 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<GrConfigConversionEffect>();
- 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);
}