diff options
author | 2012-07-25 21:27:09 +0000 | |
---|---|---|
committer | 2012-07-25 21:27:09 +0000 | |
commit | b8670998a59d305cd22a3c0cbdc6e075b0a37a6e (patch) | |
tree | 76791b806a3a6608e5a5735150c0535dc50a872a /src/gpu/GrDrawTarget.cpp | |
parent | cc90505674cd845fcbebd7e0654c3ff04a2e4f25 (diff) |
Move filter/wrap out of GrSamplerState into GrTextureParams
Review URL: http://codereview.appspot.com/6440046/
git-svn-id: http://skia.googlecode.com/svn/trunk@4773 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrDrawTarget.cpp')
-rw-r--r-- | src/gpu/GrDrawTarget.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp index 051f112631..75a2cd71dd 100644 --- a/src/gpu/GrDrawTarget.cpp +++ b/src/gpu/GrDrawTarget.cpp @@ -763,14 +763,13 @@ bool GrDrawTarget::checkDraw(GrPrimitiveType type, int startVertex, } } for (int s = 0; s < GrDrawState::kNumStages; ++s) { - // We don't support using unpremultiplied textures with filters (other than nearest). Alpha- - // premulling is not distributive WRT to filtering. We'd have to filter each texel before - // filtering. We could do this for our custom filters but we would also have to disable - // bilerp and do a custom bilerp in the shader. Until Skia itself supports unpremul configs - // there is no pressure to implement this. + // We don't support using unpremultiplied textures with bilerp. Alpha-multiplication is not + // distributive with respect to filtering. We'd have to alpha-mul each texel before + // filtering. Until Skia itself supports unpremultiplied configs there is no pressure to + // implement this. if (drawState.getTexture(s) && GrPixelConfigIsUnpremultiplied(drawState.getTexture(s)->config()) && - GrSamplerState::kNearest_Filter != drawState.getSampler(s).getFilter()) { + drawState.getSampler(s).getTextureParams().isBilerp()) { return false; } } |