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 "GrInvariantOutput.h" | 10 #include "GrInvariantOutput.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 bool swapRB; | 135 bool swapRB; |
136 if (kNone_PMConversion == pmConv) { | 136 if (kNone_PMConversion == pmConv) { |
137 swapRB = true; | 137 swapRB = true; |
138 } else { | 138 } else { |
139 swapRB = random->nextBool(); | 139 swapRB = random->nextBool(); |
140 } | 140 } |
141 return SkNEW_ARGS(GrConfigConversionEffect, | 141 return SkNEW_ARGS(GrConfigConversionEffect, |
142 (textures[GrProcessorUnitTest::kSkiaPMText
ureIdx], | 142 (textures[GrProcessorUnitTest::kSkiaPMText
ureIdx], |
143 swapRB, | 143 swapRB, |
144 pmConv, | 144 pmConv, |
145 GrProcessorUnitTest::TestMatrix(random)))
; | 145 GrTest::TestMatrix(random))); |
146 } | 146 } |
147 | 147 |
148 /////////////////////////////////////////////////////////////////////////////// | 148 /////////////////////////////////////////////////////////////////////////////// |
149 | 149 |
150 void GrConfigConversionEffect::getGLProcessorKey(const GrGLCaps& caps, | 150 void GrConfigConversionEffect::getGLProcessorKey(const GrGLCaps& caps, |
151 GrProcessorKeyBuilder* b) const
{ | 151 GrProcessorKeyBuilder* b) const
{ |
152 GrGLConfigConversionEffect::GenKey(*this, caps, b); | 152 GrGLConfigConversionEffect::GenKey(*this, caps, b); |
153 } | 153 } |
154 | 154 |
155 GrGLFragmentProcessor* GrConfigConversionEffect::createGLInstance() const { | 155 GrGLFragmentProcessor* GrConfigConversionEffect::createGLInstance() const { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 kNone_PMConversion != pmConversion) { | 289 kNone_PMConversion != pmConversion) { |
290 // The PM conversions assume colors are 0..255 | 290 // The PM conversions assume colors are 0..255 |
291 return NULL; | 291 return NULL; |
292 } | 292 } |
293 return SkNEW_ARGS(GrConfigConversionEffect, (texture, | 293 return SkNEW_ARGS(GrConfigConversionEffect, (texture, |
294 swapRedAndBlue, | 294 swapRedAndBlue, |
295 pmConversion, | 295 pmConversion, |
296 matrix)); | 296 matrix)); |
297 } | 297 } |
298 } | 298 } |
OLD | NEW |