Add 4x4 downsample filter with 4 bilinear texture reads, use for ssaa.
Review URL: http://codereview.appspot.com/4483042/
git-svn-id: http://skia.googlecode.com/svn/trunk@1250 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrTextContext.cpp b/gpu/src/GrTextContext.cpp
index 09113e0..0222042 100644
--- a/gpu/src/GrTextContext.cpp
+++ b/gpu/src/GrTextContext.cpp
@@ -36,10 +36,15 @@
GrDrawTarget::AutoStateRestore asr(fDrawTarget);
// setup our sampler state for our text texture/atlas
-
+ GrSamplerState::Filter filter;
+ if (fExtMatrix.isIdentity()) {
+ filter = GrSamplerState::kNearest_Filter;
+ } else {
+ filter = GrSamplerState::kBilinear_Filter;
+ }
GrSamplerState sampler(GrSamplerState::kRepeat_WrapMode,
GrSamplerState::kRepeat_WrapMode,
- !fExtMatrix.isIdentity());
+ filter);
fDrawTarget->setSamplerState(TEXT_STAGE, sampler);
GrAssert(GrIsALIGN4(fCurrVertex));