diff options
author | 2012-10-16 15:19:45 +0000 | |
---|---|---|
committer | 2012-10-16 15:19:45 +0000 | |
commit | dfdb7e5240276493077b7c6e1f3cc8b8a0e195ba (patch) | |
tree | 8052c43cb50ba6f2c5c2f8fb9a3c518e17b43d2c /src/gpu/GrClipMaskManager.cpp | |
parent | f6eac8af585e44d56e6b18d269e6c34f9917ea88 (diff) |
Reland r5963 with two fixes:
Missing ref in GrSweepGradient::TestCreate.
Must reset() the sampler in setup_drawstate_aaclip() to avoid hitting a (dubious) assert.
git-svn-id: http://skia.googlecode.com/svn/trunk@5964 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrClipMaskManager.cpp')
-rw-r--r-- | src/gpu/GrClipMaskManager.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index 322fba146a..6104f66e81 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -33,7 +33,7 @@ void setup_drawstate_aaclip(GrGpu* gpu, GrDrawState* drawState = gpu->drawState(); GrAssert(drawState); - static const int maskStage = GrPaint::kTotalStages+1; + static const int kMaskStage = GrPaint::kTotalStages+1; GrMatrix mat; mat.setIDiv(result->width(), result->height()); @@ -41,9 +41,8 @@ void setup_drawstate_aaclip(GrGpu* gpu, SkIntToScalar(-devBound.fTop)); mat.preConcat(drawState->getViewMatrix()); - drawState->sampler(maskStage)->reset(mat); - - drawState->createTextureEffect(maskStage, result); + drawState->sampler(kMaskStage)->reset(); + drawState->createTextureEffect(kMaskStage, result, mat); } bool path_needs_SW_renderer(GrContext* context, @@ -495,8 +494,7 @@ void GrClipMaskManager::drawTexture(GrTexture* target, GrMatrix sampleM; sampleM.setIDiv(texture->width(), texture->height()); - drawState->sampler(0)->reset(sampleM); - drawState->createTextureEffect(0, texture); + drawState->createTextureEffect(0, texture, sampleM); GrRect rect = GrRect::MakeWH(SkIntToScalar(target->width()), SkIntToScalar(target->height())); |