OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrYUVtoRGBEffect.h" | 8 #include "GrYUVtoRGBEffect.h" |
9 | 9 |
10 #include "GrCoordTransform.h" | 10 #include "GrCoordTransform.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 GLProcessor::GenKey(*this, caps, b); | 83 GLProcessor::GenKey(*this, caps, b); |
84 } | 84 } |
85 | 85 |
86 virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { | 86 virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { |
87 return SkNEW_ARGS(GLProcessor, (*this)); | 87 return SkNEW_ARGS(GLProcessor, (*this)); |
88 } | 88 } |
89 | 89 |
90 private: | 90 private: |
91 YUVtoRGBEffect(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture
, | 91 YUVtoRGBEffect(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture
, |
92 SkYUVColorSpace colorSpace) | 92 SkYUVColorSpace colorSpace) |
93 : fCoordTransform(kLocal_GrCoordSet, GrCoordTransform::MakeDivByTextureWHMa
trix(yTexture), | 93 : fCoordTransform(kLocal_GrCoordSet, |
94 yTexture) | 94 GrCoordTransform::MakeDivByTextureWHMatrix(yTexture), |
| 95 yTexture, GrTextureParams::kNone_FilterMode) |
95 , fYAccess(yTexture) | 96 , fYAccess(yTexture) |
96 , fUAccess(uTexture) | 97 , fUAccess(uTexture) |
97 , fVAccess(vTexture) | 98 , fVAccess(vTexture) |
98 , fColorSpace(colorSpace) { | 99 , fColorSpace(colorSpace) { |
99 this->initClassID<YUVtoRGBEffect>(); | 100 this->initClassID<YUVtoRGBEffect>(); |
100 this->addCoordTransform(&fCoordTransform); | 101 this->addCoordTransform(&fCoordTransform); |
101 this->addTextureAccess(&fYAccess); | 102 this->addTextureAccess(&fYAccess); |
102 this->addTextureAccess(&fUAccess); | 103 this->addTextureAccess(&fUAccess); |
103 this->addTextureAccess(&fVAccess); | 104 this->addTextureAccess(&fVAccess); |
104 } | 105 } |
(...skipping 30 matching lines...) Expand all Loading... |
135 0.0f, 0.0f, 0.0f, 1.0}; | 136 0.0f, 0.0f, 0.0f, 1.0}; |
136 } | 137 } |
137 | 138 |
138 ////////////////////////////////////////////////////////////////////////////// | 139 ////////////////////////////////////////////////////////////////////////////// |
139 | 140 |
140 GrFragmentProcessor* | 141 GrFragmentProcessor* |
141 GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vT
exture, | 142 GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vT
exture, |
142 SkYUVColorSpace colorSpace) { | 143 SkYUVColorSpace colorSpace) { |
143 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, colorSpace); | 144 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, colorSpace); |
144 } | 145 } |
OLD | NEW |