From d0f3f6825bd5c232da52f4dc1af69b76403b797f Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Tue, 28 Aug 2012 13:08:14 +0000 Subject: Fix dumb bug: redundant runs of upm<->pm roundtrip test Review URL: https://codereview.appspot.com/6498043/ git-svn-id: http://skia.googlecode.com/svn/trunk@5310 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/GrContext.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index a13394cd60..8175d150c6 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -1797,6 +1797,7 @@ void test_pm_conversions(GrContext* ctx, int* pmToUPMValue, int* upmToPMValue) { GrCustomStage* GrContext::createPMToUPMEffect(GrTexture* texture, bool swapRAndB) { if (!fDidTestPMConversions) { test_pm_conversions(this, &fPMToUPMConversion, &fUPMToPMConversion); + fDidTestPMConversions = true; } GrConfigConversionEffect::PMConversion pmToUPM = static_cast(fPMToUPMConversion); @@ -1810,6 +1811,7 @@ GrCustomStage* GrContext::createPMToUPMEffect(GrTexture* texture, bool swapRAndB GrCustomStage* GrContext::createUPMToPMEffect(GrTexture* texture, bool swapRAndB) { if (!fDidTestPMConversions) { test_pm_conversions(this, &fPMToUPMConversion, &fUPMToPMConversion); + fDidTestPMConversions = true; } GrConfigConversionEffect::PMConversion upmToPM = static_cast(fUPMToPMConversion); -- cgit v1.2.3