Revert of Have GrRectBlurEffect use Linear filtering (rather than Nearest Neighbor) (patchset #2 id:20001 of https://codereview.chromium.org/1378023004/ )

Reason for revert:
Trial run confirmed layout test expectations - will reland after suppressions

Original issue's description:
> Have GrRectBlurEffect use Linear filtering (rather than Nearest Neighbor)
>
> Committed: https://skia.googlesource.com/skia/+/2d70bcccc9ba8f3898a7ae506ba7410ed8e9c9db
>
> Committed: https://skia.googlesource.com/skia/+/5175b9563055926b4969d57f06e4ae49b86e055b

TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1378813004
This commit is contained in:
robertphillips 2015-10-04 12:21:33 -07:00 committed by Commit bot
parent af3fbfca0a
commit d8982d7e92
2 changed files with 3 additions and 3 deletions

View File

@ -681,7 +681,7 @@ static float gaussianIntegral(float x) {
uint8_t* SkBlurMask::ComputeBlurProfile(SkScalar sigma) {
int size = SkScalarCeilToInt(6*sigma);
float center = 0.5f * size;
int center = size >> 1;
uint8_t* profile = new uint8_t[size];
float invr = 1.f/(2*sigma);

View File

@ -677,7 +677,7 @@ void OutputRectBlurProfileLookup(GrGLFragmentBuilder* fsBuilder,
const char *sharp_width) {
fsBuilder->codeAppendf("\tfloat %s;\n", output);
fsBuilder->codeAppendf("\t\t{\n");
fsBuilder->codeAppendf("\t\t\tfloat coord = (0.5 * (abs(2.0*%s - %s) - %s) + 0.5)/%s;\n",
fsBuilder->codeAppendf("\t\t\tfloat coord = (0.5 * (abs(2.0*%s - %s) - %s))/%s;\n",
loc, blurred_width, sharp_width, profileSize);
fsBuilder->codeAppendf("\t\t\t%s = ", output);
fsBuilder->appendTextureLookup(sampler, "vec2(coord,0.5)");
@ -769,7 +769,7 @@ GrTexture* GrRectBlurEffect::CreateBlurProfileTexture(GrTextureProvider* texture
GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma, GrTexture *blurProfile)
: fRect(rect)
, fSigma(sigma)
, fBlurProfileAccess(blurProfile, GrTextureParams::kBilerp_FilterMode) {
, fBlurProfileAccess(blurProfile) {
this->initClassID<GrRectBlurEffect>();
this->addTextureAccess(&fBlurProfileAccess);
this->setWillReadFragmentPosition();