aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrClipMaskManager.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-20 19:19:53 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-20 19:19:53 +0000
commitc78188896e28a4ae49e406a7422b345ae177dafe (patch)
tree8345c0828c94fc81cd4c54a0fe7778e5b159394d /src/gpu/GrClipMaskManager.cpp
parentb8210f20ce3da43f55b773a2fad3f2244d3ba74d (diff)
Attempt to reland 8264-5 with warning-as-error fixes.
git-svn-id: http://skia.googlecode.com/svn/trunk@8272 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrClipMaskManager.cpp')
-rw-r--r--src/gpu/GrClipMaskManager.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 99068c75ed..6415859db9 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -40,6 +40,9 @@ void setup_drawstate_aaclip(GrGpu* gpu,
static const int kMaskStage = GrPaint::kTotalStages+1;
SkMatrix mat;
+ // We want to use device coords to compute the texture coordinates. We set our matrix to be
+ // equal to the view matrix followed by an offset to the devBound, and then a scaling matrix to
+ // normalized coords. We apply this matrix to the vertex positions rather than local coords.
mat.setIDiv(result->width(), result->height());
mat.preTranslate(SkIntToScalar(-devBound.fLeft),
SkIntToScalar(-devBound.fTop));
@@ -51,7 +54,9 @@ void setup_drawstate_aaclip(GrGpu* gpu,
GrTextureDomainEffect::Create(result,
mat,
GrTextureDomainEffect::MakeTexelDomain(result, domainTexels),
- GrTextureDomainEffect::kDecal_WrapMode))->unref();
+ GrTextureDomainEffect::kDecal_WrapMode,
+ false,
+ GrEffect::kPosition_CoordsType))->unref();
}
bool path_needs_SW_renderer(GrContext* context,
@@ -354,7 +359,8 @@ void GrClipMaskManager::mergeMask(GrTexture* dstMask,
GrTextureDomainEffect::Create(srcMask,
sampleM,
GrTextureDomainEffect::MakeTexelDomain(srcMask, srcBound),
- GrTextureDomainEffect::kDecal_WrapMode))->unref();
+ GrTextureDomainEffect::kDecal_WrapMode,
+ false))->unref();
fGpu->drawSimpleRect(SkRect::MakeFromIRect(dstBound), NULL);
drawState->disableStage(0);