aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrYUVtoRGBEffect.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@google.com>2015-03-04 09:56:09 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-04 09:56:09 -0800
commitb8410601e4647e9dea79820436afe7fd4d898875 (patch)
tree272f97fe8c0eac63cd83f00bac8c2fe07db9acdc /src/gpu/effects/GrYUVtoRGBEffect.cpp
parent01849ac16a4f7c07f1d33f296ea25939483baa85 (diff)
Revert of Adding linear interpolation to rgb->yuv conversion (patchset #1 id:1 of https://codereview.chromium.org/973563002/)
Reason for revert: Speculative revert to see if this unblocks the deps roll Original issue's description: > Adding linear interpolation to rgb->yuv conversion > > When the UV planes are smaller than the Y plane, doing the upscaling in nearest mode was creating artefacts, so I changed it to use linear interpolation to fix the issue. > > BUG=460380 > > Committed: https://skia.googlesource.com/skia/+/cd9d42c5167a50f1bf20e969343556d61354171b TBR=bsalomon@google.com,scroggo@google.com,reed@google.com,sugoi@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=460380 Review URL: https://codereview.chromium.org/977133002
Diffstat (limited to 'src/gpu/effects/GrYUVtoRGBEffect.cpp')
-rw-r--r--src/gpu/effects/GrYUVtoRGBEffect.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp
index fb69472cca..8daf34829c 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -33,15 +33,7 @@ public:
yuvMatrix[1].preScale(w[1] / w[0], h[1] / h[0]);
yuvMatrix[2] = yuvMatrix[0];
yuvMatrix[2].preScale(w[2] / w[0], h[2] / h[0]);
- GrTextureParams::FilterMode uvFilterMode =
- ((sizes[1].fWidth != sizes[0].fWidth) ||
- (sizes[1].fHeight != sizes[0].fHeight) ||
- (sizes[2].fWidth != sizes[0].fWidth) ||
- (sizes[2].fHeight != sizes[0].fHeight)) ?
- GrTextureParams::kBilerp_FilterMode :
- GrTextureParams::kNone_FilterMode;
- return SkNEW_ARGS(YUVtoRGBEffect, (yTexture, uTexture, vTexture, yuvMatrix,
- uvFilterMode, colorSpace));
+ return SkNEW_ARGS(YUVtoRGBEffect, (yTexture, uTexture, vTexture, yuvMatrix, colorSpace));
}
const char* name() const SK_OVERRIDE { return "YUV to RGB"; }
@@ -111,14 +103,13 @@ public:
private:
YUVtoRGBEffect(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture,
- SkMatrix yuvMatrix[3], GrTextureParams::FilterMode uvFilterMode,
- SkYUVColorSpace colorSpace)
+ SkMatrix yuvMatrix[3], SkYUVColorSpace colorSpace)
: fYTransform(kLocal_GrCoordSet, yuvMatrix[0], yTexture, GrTextureParams::kNone_FilterMode)
, fYAccess(yTexture)
- , fUTransform(kLocal_GrCoordSet, yuvMatrix[1], uTexture, uvFilterMode)
- , fUAccess(uTexture, uvFilterMode)
- , fVTransform(kLocal_GrCoordSet, yuvMatrix[2], vTexture, uvFilterMode)
- , fVAccess(vTexture, uvFilterMode)
+ , fUTransform(kLocal_GrCoordSet, yuvMatrix[1], uTexture, GrTextureParams::kNone_FilterMode)
+ , fUAccess(uTexture)
+ , fVTransform(kLocal_GrCoordSet, yuvMatrix[2], vTexture, GrTextureParams::kNone_FilterMode)
+ , fVAccess(vTexture)
, fColorSpace(colorSpace) {
this->initClassID<YUVtoRGBEffect>();
this->addCoordTransform(&fYTransform);