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 "gl/builders/GrGLProgramBuilder.h" | 8 #include "gl/builders/GrGLProgramBuilder.h" |
9 #include "GrYUVtoRGBEffect.h" | 9 #include "GrYUVtoRGBEffect.h" |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 102 } |
103 | 103 |
104 virtual bool onIsEqual(const GrFragmentProcessor& sBase) const { | 104 virtual bool onIsEqual(const GrFragmentProcessor& sBase) const { |
105 const YUVtoRGBEffect& s = sBase.cast<YUVtoRGBEffect>(); | 105 const YUVtoRGBEffect& s = sBase.cast<YUVtoRGBEffect>(); |
106 return fColorSpace == s.getColorSpace(); | 106 return fColorSpace == s.getColorSpace(); |
107 } | 107 } |
108 | 108 |
109 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE { | 109 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE { |
110 // YUV is opaque | 110 // YUV is opaque |
111 inout->setToOther(kA_GrColorComponentFlag, 0xFF << GrColor_SHIFT_A, | 111 inout->setToOther(kA_GrColorComponentFlag, 0xFF << GrColor_SHIFT_A, |
112 InvariantOutput::kWillNot_ReadInput); | 112 InvariantOutput::kWill_ReadInput); |
113 } | 113 } |
114 | 114 |
115 GrCoordTransform fCoordTransform; | 115 GrCoordTransform fCoordTransform; |
116 GrTextureAccess fYAccess; | 116 GrTextureAccess fYAccess; |
117 GrTextureAccess fUAccess; | 117 GrTextureAccess fUAccess; |
118 GrTextureAccess fVAccess; | 118 GrTextureAccess fVAccess; |
119 SkYUVColorSpace fColorSpace; | 119 SkYUVColorSpace fColorSpace; |
120 | 120 |
121 typedef GrFragmentProcessor INHERITED; | 121 typedef GrFragmentProcessor INHERITED; |
122 }; | 122 }; |
(...skipping 10 matching lines...) Expand all Loading... |
133 0.0f, 0.0f, 0.0f, 1.0}; | 133 0.0f, 0.0f, 0.0f, 1.0}; |
134 } | 134 } |
135 | 135 |
136 ////////////////////////////////////////////////////////////////////////////// | 136 ////////////////////////////////////////////////////////////////////////////// |
137 | 137 |
138 GrFragmentProcessor* | 138 GrFragmentProcessor* |
139 GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vT
exture, | 139 GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vT
exture, |
140 SkYUVColorSpace colorSpace) { | 140 SkYUVColorSpace colorSpace) { |
141 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, colorSpace); | 141 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, colorSpace); |
142 } | 142 } |
OLD | NEW |