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 "GrSimpleTextureEffect.h" | 8 #include "GrSimpleTextureEffect.h" |
9 #include "GrInvariantOutput.h" | 9 #include "GrInvariantOutput.h" |
10 #include "GrTexture.h" | 10 #include "GrTexture.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 }; | 69 }; |
70 SkShader::TileMode tileModes[] = { | 70 SkShader::TileMode tileModes[] = { |
71 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], | 71 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], |
72 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], | 72 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], |
73 }; | 73 }; |
74 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil
erp_FilterMode : | 74 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil
erp_FilterMode : |
75 GrTextureParams::kNon
e_FilterMode); | 75 GrTextureParams::kNon
e_FilterMode); |
76 | 76 |
77 static const GrCoordSet kCoordSets[] = { | 77 static const GrCoordSet kCoordSets[] = { |
78 kLocal_GrCoordSet, | 78 kLocal_GrCoordSet, |
79 kPosition_GrCoordSet | 79 kDevice_GrCoordSet |
80 }; | 80 }; |
81 GrCoordSet coordSet = kCoordSets[random->nextULessThan(SK_ARRAY_COUNT(kCoord
Sets))]; | 81 GrCoordSet coordSet = kCoordSets[random->nextULessThan(SK_ARRAY_COUNT(kCoord
Sets))]; |
82 | 82 |
83 const SkMatrix& matrix = GrProcessorUnitTest::TestMatrix(random); | 83 const SkMatrix& matrix = GrProcessorUnitTest::TestMatrix(random); |
84 return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet); | 84 return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet); |
85 } | 85 } |
OLD | NEW |