OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "GrConfigConversionEffect.h" | 8 #include "GrConfigConversionEffect.h" |
9 #include "GrContext.h" | 9 #include "GrContext.h" |
10 #include "GrTBackendEffectFactory.h" | 10 #include "GrTBackendEffectFactory.h" |
11 #include "GrSimpleTextureEffect.h" | 11 #include "GrSimpleTextureEffect.h" |
12 #include "gl/GrGLEffect.h" | 12 #include "gl/GrGLEffect.h" |
| 13 #include "gl/GrGLShaderBuilder.h" |
13 #include "SkMatrix.h" | 14 #include "SkMatrix.h" |
14 | 15 |
15 class GrGLConfigConversionEffect : public GrGLEffect { | 16 class GrGLConfigConversionEffect : public GrGLEffect { |
16 public: | 17 public: |
17 GrGLConfigConversionEffect(const GrBackendEffectFactory& factory, | 18 GrGLConfigConversionEffect(const GrBackendEffectFactory& factory, |
18 const GrDrawEffect& drawEffect) | 19 const GrDrawEffect& drawEffect) |
19 : INHERITED (factory) { | 20 : INHERITED (factory) { |
20 const GrConfigConversionEffect& effect = drawEffect.castEffect<GrConfigC
onversionEffect>(); | 21 const GrConfigConversionEffect& effect = drawEffect.castEffect<GrConfigC
onversionEffect>(); |
21 fSwapRedAndBlue = effect.swapsRedAndBlue(); | 22 fSwapRedAndBlue = effect.swapsRedAndBlue(); |
22 fPMConversion = effect.pmConversion(); | 23 fPMConversion = effect.pmConversion(); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 kNone_PMConversion != pmConversion) { | 263 kNone_PMConversion != pmConversion) { |
263 // The PM conversions assume colors are 0..255 | 264 // The PM conversions assume colors are 0..255 |
264 return NULL; | 265 return NULL; |
265 } | 266 } |
266 return SkNEW_ARGS(GrConfigConversionEffect, (texture, | 267 return SkNEW_ARGS(GrConfigConversionEffect, (texture, |
267 swapRedAndBlue, | 268 swapRedAndBlue, |
268 pmConversion, | 269 pmConversion, |
269 matrix)); | 270 matrix)); |
270 } | 271 } |
271 } | 272 } |
OLD | NEW |