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 "GrDrawContext.h" | 10 #include "GrDrawContext.h" |
11 #include "GrInvariantOutput.h" | 11 #include "GrInvariantOutput.h" |
12 #include "GrSimpleTextureEffect.h" | 12 #include "GrSimpleTextureEffect.h" |
13 #include "SkMatrix.h" | 13 #include "SkMatrix.h" |
14 #include "gl/GrGLProcessor.h" | 14 #include "gl/GrGLFragmentProcessor.h" |
15 #include "gl/builders/GrGLProgramBuilder.h" | 15 #include "gl/builders/GrGLProgramBuilder.h" |
16 | 16 |
17 class GrGLConfigConversionEffect : public GrGLFragmentProcessor { | 17 class GrGLConfigConversionEffect : public GrGLFragmentProcessor { |
18 public: | 18 public: |
19 GrGLConfigConversionEffect(const GrProcessor& processor) { | 19 GrGLConfigConversionEffect(const GrProcessor& processor) { |
20 const GrConfigConversionEffect& configConversionEffect = | 20 const GrConfigConversionEffect& configConversionEffect = |
21 processor.cast<GrConfigConversionEffect>(); | 21 processor.cast<GrConfigConversionEffect>(); |
22 fSwapRedAndBlue = configConversionEffect.swapsRedAndBlue(); | 22 fSwapRedAndBlue = configConversionEffect.swapsRedAndBlue(); |
23 fPMConversion = configConversionEffect.pmConversion(); | 23 fPMConversion = configConversionEffect.pmConversion(); |
24 } | 24 } |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 // The PM conversions assume colors are 0..255 | 299 // The PM conversions assume colors are 0..255 |
300 return NULL; | 300 return NULL; |
301 } | 301 } |
302 return SkNEW_ARGS(GrConfigConversionEffect, (procDataManager, | 302 return SkNEW_ARGS(GrConfigConversionEffect, (procDataManager, |
303 texture, | 303 texture, |
304 swapRedAndBlue, | 304 swapRedAndBlue, |
305 pmConversion, | 305 pmConversion, |
306 matrix)); | 306 matrix)); |
307 } | 307 } |
308 } | 308 } |
OLD | NEW |