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

Unified Diff: src/gpu/effects/GrConfigConversionEffect.cpp

Issue 1258763006: Update assert to allow config conversion effect for all configs when not premul/unpremuling (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 5 years, 4 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/gpu/effects/GrConfigConversionEffect.cpp
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 8238dcda0c4725788eb6eda75b10e2f99321fbe4..704eb0c01ddb533df943ab8164de1d532a60ad4d 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);
}
« 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