| 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" |
| 11 #include "GrInvariantOutput.h" | 11 #include "GrInvariantOutput.h" |
| 12 #include "GrProcessor.h" | 12 #include "GrProcessor.h" |
| 13 #include "gl/GrGLProcessor.h" | 13 #include "gl/GrGLFragmentProcessor.h" |
| 14 #include "gl/builders/GrGLProgramBuilder.h" | 14 #include "gl/builders/GrGLProgramBuilder.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 class YUVtoRGBEffect : public GrFragmentProcessor { | 18 class YUVtoRGBEffect : public GrFragmentProcessor { |
| 19 public: | 19 public: |
| 20 static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
GrTexture* yTexture, | 20 static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
GrTexture* yTexture, |
| 21 GrTexture* uTexture, GrTexture* vTexture, | 21 GrTexture* uTexture, GrTexture* vTexture, |
| 22 const SkISize sizes[3], SkYUVColorSpace c
olorSpace) { | 22 const SkISize sizes[3], SkYUVColorSpace c
olorSpace) { |
| 23 SkScalar w[3], h[3]; | 23 SkScalar w[3], h[3]; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 ////////////////////////////////////////////////////////////////////////////// | 166 ////////////////////////////////////////////////////////////////////////////// |
| 167 | 167 |
| 168 GrFragmentProcessor* | 168 GrFragmentProcessor* |
| 169 GrYUVtoRGBEffect::Create(GrProcessorDataManager* procDataManager, GrTexture* yTe
xture, | 169 GrYUVtoRGBEffect::Create(GrProcessorDataManager* procDataManager, GrTexture* yTe
xture, |
| 170 GrTexture* uTexture, GrTexture* vTexture, const SkISize
sizes[3], | 170 GrTexture* uTexture, GrTexture* vTexture, const SkISize
sizes[3], |
| 171 SkYUVColorSpace colorSpace) { | 171 SkYUVColorSpace colorSpace) { |
| 172 SkASSERT(procDataManager && yTexture && uTexture && vTexture && sizes); | 172 SkASSERT(procDataManager && yTexture && uTexture && vTexture && sizes); |
| 173 return YUVtoRGBEffect::Create(procDataManager, yTexture, uTexture, vTexture,
sizes, colorSpace); | 173 return YUVtoRGBEffect::Create(procDataManager, yTexture, uTexture, vTexture,
sizes, colorSpace); |
| 174 } | 174 } |
| OLD | NEW |