From 4b2d3f30d047435263642ef8ed170a37ca642c1b Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Tue, 15 May 2012 18:05:50 +0000 Subject: make "Partial pixel coverage will be incorrectly blended" debug message conditional git-svn-id: http://skia.googlecode.com/svn/trunk@3945 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/GrContext.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index aaf2ae462b..5ec6511b9f 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -35,6 +35,13 @@ // limitations) should we disable AA or draw wrong? #define DISABLE_COVERAGE_AA_FOR_BLEND 1 +#if GR_DEBUG + // change this to a 1 to see notifications when partial coverage fails + #define GR_DEBUG_PARTIAL_COVERAGE_CHECK 0 +#else + #define GR_DEBUG_PARTIAL_COVERAGE_CHECK 0 +#endif + static const size_t MAX_TEXTURE_CACHE_COUNT = 256; static const size_t MAX_TEXTURE_CACHE_BYTES = 16 * 1024 * 1024; @@ -1873,7 +1880,7 @@ void GrContext::setPaint(const GrPaint& paint) { fDrawState->setBlendFunc(paint.fSrcBlendCoeff, paint.fDstBlendCoeff); fDrawState->setColorFilter(paint.fColorFilterColor, paint.fColorFilterXfermode); fDrawState->setCoverage(paint.fCoverage); -#if GR_DEBUG +#if GR_DEBUG_PARTIAL_COVERAGE_CHECK if ((paint.getActiveMaskStageMask() || 0xff != paint.fCoverage) && !fGpu->canApplyCoverage()) { GrPrintf("Partial pixel coverage will be incorrectly blended.\n"); -- cgit v1.2.3