From f13f58804659175925042a291304d483a4fd9278 Mon Sep 17 00:00:00 2001 From: "tomhudson@google.com" Date: Mon, 25 Jun 2012 17:27:28 +0000 Subject: Add GrPaint::*StageEnabled() and GrDrawState::stageEnabled() functions. These wrap the question of "is this stage of the shader enabled?" so that we can change the semantics - previously iff there was a texture, now if there is a texture OR a GrCustomStage, soon (post-cl 6306097) iff there is a GrCustomStage, which at that point will hold whatever texture is necessary. http://codereview.appspot.com/6306104/ git-svn-id: http://skia.googlecode.com/svn/trunk@4325 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/SkGpuDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gpu/SkGpuDevice.cpp') diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 8c34c547fa..d3ca0b5005 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -883,7 +883,7 @@ bool drawWithGPUMaskFilter(GrContext* context, const SkPath& path, static const int MASK_IDX = GrPaint::kMaxMasks - 1; // we assume the last mask index is available for use - GrAssert(NULL == grp->getMask(MASK_IDX)); + GrAssert(!grp->isMaskStageEnabled(MASK_IDX)); grp->setMask(MASK_IDX, blurTexture); grp->maskSampler(MASK_IDX)->reset(); @@ -949,7 +949,7 @@ bool drawWithMaskFilter(GrContext* context, const SkPath& path, static const int MASK_IDX = GrPaint::kMaxMasks - 1; // we assume the last mask index is available for use - GrAssert(NULL == grp->getMask(MASK_IDX)); + GrAssert(!grp->isMaskStageEnabled(MASK_IDX)); grp->setMask(MASK_IDX, texture); grp->maskSampler(MASK_IDX)->reset(); -- cgit v1.2.3