diff options
author | joshualitt <joshualitt@chromium.org> | 2015-07-09 07:31:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-09 07:31:32 -0700 |
commit | 2cdec31c29a6ba1a6927b3ee2325bf53b86796aa (patch) | |
tree | db9d14da67043d156ca7e02c21e375d29946caa2 /src/gpu/effects/GrYUVtoRGBEffect.cpp | |
parent | 8d3f7bde942ed42a4bbe86624f084f3d6bc37c1a (diff) |
YUV to RGB Texture threading GrProcessorDataManager
BUG=skia:
Review URL: https://codereview.chromium.org/1230803002
Diffstat (limited to 'src/gpu/effects/GrYUVtoRGBEffect.cpp')
-rw-r--r-- | src/gpu/effects/GrYUVtoRGBEffect.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp index 92acab3725..a46cb92077 100644 --- a/src/gpu/effects/GrYUVtoRGBEffect.cpp +++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp @@ -17,9 +17,9 @@ namespace { class YUVtoRGBEffect : public GrFragmentProcessor { public: - static GrFragmentProcessor* Create(GrTexture* yTexture, GrTexture* uTexture, - GrTexture* vTexture, const SkISize sizes[3], - SkYUVColorSpace colorSpace) { + static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, GrTexture* yTexture, + GrTexture* uTexture, GrTexture* vTexture, + const SkISize sizes[3], SkYUVColorSpace colorSpace) { SkScalar w[3], h[3]; w[0] = SkIntToScalar(sizes[0].fWidth) / SkIntToScalar(yTexture->width()); h[0] = SkIntToScalar(sizes[0].fHeight) / SkIntToScalar(yTexture->height()); @@ -40,7 +40,7 @@ public: (sizes[2].fHeight != sizes[0].fHeight)) ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_FilterMode; - return SkNEW_ARGS(YUVtoRGBEffect, (yTexture, uTexture, vTexture, yuvMatrix, + return SkNEW_ARGS(YUVtoRGBEffect, (procDataManager, yTexture, uTexture, vTexture, yuvMatrix, uvFilterMode, colorSpace)); } @@ -110,9 +110,9 @@ public: } private: - YUVtoRGBEffect(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture, - const SkMatrix yuvMatrix[3], GrTextureParams::FilterMode uvFilterMode, - SkYUVColorSpace colorSpace) + YUVtoRGBEffect(GrProcessorDataManager*, GrTexture* yTexture, GrTexture* uTexture, + GrTexture* vTexture, const SkMatrix yuvMatrix[3], + GrTextureParams::FilterMode uvFilterMode, SkYUVColorSpace colorSpace) : fYTransform(kLocal_GrCoordSet, yuvMatrix[0], yTexture, GrTextureParams::kNone_FilterMode) , fYAccess(yTexture) , fUTransform(kLocal_GrCoordSet, yuvMatrix[1], uTexture, uvFilterMode) @@ -166,8 +166,9 @@ const GrGLfloat YUVtoRGBEffect::GLProcessor::kRec601ConversionMatrix[16] = { ////////////////////////////////////////////////////////////////////////////// GrFragmentProcessor* -GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture, - const SkISize sizes[3], SkYUVColorSpace colorSpace) { - SkASSERT(yTexture && uTexture && vTexture && sizes); - return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, sizes, colorSpace); +GrYUVtoRGBEffect::Create(GrProcessorDataManager* procDataManager, GrTexture* yTexture, + GrTexture* uTexture, GrTexture* vTexture, const SkISize sizes[3], + SkYUVColorSpace colorSpace) { + SkASSERT(procDataManager && yTexture && uTexture && vTexture && sizes); + return YUVtoRGBEffect::Create(procDataManager, yTexture, uTexture, vTexture, sizes, colorSpace); } |