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 "GrEffect.h" | 11 #include "GrEffect.h" |
12 #include "gl/GrGLEffect.h" | 12 #include "gl/GrGLEffect.h" |
13 #include "GrTBackendEffectFactory.h" | 13 #include "GrTBackendEffectFactory.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 class YUVtoRGBEffect : public GrEffect { | 17 class YUVtoRGBEffect : public GrEffect { |
18 public: | 18 public: |
19 static GrEffectRef* Create(GrTexture* yTexture, GrTexture* uTexture, GrTextu
re* vTexture) { | 19 static GrEffect* Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture*
vTexture) { |
20 AutoEffectUnref effect(SkNEW_ARGS(YUVtoRGBEffect, (yTexture, uTexture, v
Texture))); | 20 AutoEffectUnref effect(SkNEW_ARGS(YUVtoRGBEffect, (yTexture, uTexture, v
Texture))); |
21 return CreateEffectRef(effect); | 21 return CreateEffectRef(effect); |
22 } | 22 } |
23 | 23 |
24 static const char* Name() { return "YUV to RGB"; } | 24 static const char* Name() { return "YUV to RGB"; } |
25 | 25 |
26 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE { | 26 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE { |
27 return GrTBackendEffectFactory<YUVtoRGBEffect>::getInstance(); | 27 return GrTBackendEffectFactory<YUVtoRGBEffect>::getInstance(); |
28 } | 28 } |
29 | 29 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 } | 100 } |
101 | 101 |
102 ////////////////////////////////////////////////////////////////////////////// | 102 ////////////////////////////////////////////////////////////////////////////// |
103 | 103 |
104 GrEffectRef* GrYUVtoRGBEffect::Create(GrTexture* yTexture, | 104 GrEffectRef* GrYUVtoRGBEffect::Create(GrTexture* yTexture, |
105 GrTexture* uTexture, | 105 GrTexture* uTexture, |
106 GrTexture* vTexture) { | 106 GrTexture* vTexture) { |
107 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture); | 107 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture); |
108 } | 108 } |
OLD | NEW |