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" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 uint32_t* validFlags)
const { | 128 uint32_t* validFlags)
const { |
129 this->updateConstantColorComponentsForModulation(color, validFlags); | 129 this->updateConstantColorComponentsForModulation(color, validFlags); |
130 } | 130 } |
131 | 131 |
132 /////////////////////////////////////////////////////////////////////////////// | 132 /////////////////////////////////////////////////////////////////////////////// |
133 | 133 |
134 GR_DEFINE_EFFECT_TEST(GrConfigConversionEffect); | 134 GR_DEFINE_EFFECT_TEST(GrConfigConversionEffect); |
135 | 135 |
136 GrEffectRef* GrConfigConversionEffect::TestCreate(SkMWCRandom* random, | 136 GrEffectRef* GrConfigConversionEffect::TestCreate(SkMWCRandom* random, |
137 GrContext*, | 137 GrContext*, |
| 138 const GrDrawTargetCaps&, |
138 GrTexture* textures[]) { | 139 GrTexture* textures[]) { |
139 PMConversion pmConv = static_cast<PMConversion>(random->nextULessThan(kPMCon
versionCnt)); | 140 PMConversion pmConv = static_cast<PMConversion>(random->nextULessThan(kPMCon
versionCnt)); |
140 bool swapRB; | 141 bool swapRB; |
141 if (kNone_PMConversion == pmConv) { | 142 if (kNone_PMConversion == pmConv) { |
142 swapRB = true; | 143 swapRB = true; |
143 } else { | 144 } else { |
144 swapRB = random->nextBool(); | 145 swapRB = random->nextBool(); |
145 } | 146 } |
146 AutoEffectUnref effect(SkNEW_ARGS(GrConfigConversionEffect, | 147 AutoEffectUnref effect(SkNEW_ARGS(GrConfigConversionEffect, |
147 (textures[GrEffectUnitTest::kSkiaPMTexture
Idx], | 148 (textures[GrEffectUnitTest::kSkiaPMTexture
Idx], |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // The PM conversions assume colors are 0..255 | 280 // The PM conversions assume colors are 0..255 |
280 return NULL; | 281 return NULL; |
281 } | 282 } |
282 AutoEffectUnref effect(SkNEW_ARGS(GrConfigConversionEffect, (texture, | 283 AutoEffectUnref effect(SkNEW_ARGS(GrConfigConversionEffect, (texture, |
283 swapRedAndB
lue, | 284 swapRedAndB
lue, |
284 pmConversio
n, | 285 pmConversio
n, |
285 matrix))); | 286 matrix))); |
286 return CreateEffectRef(effect); | 287 return CreateEffectRef(effect); |
287 } | 288 } |
288 } | 289 } |
OLD | NEW |