| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "GrBitmapTextGeoProc.h" | 8 #include "GrBitmapTextGeoProc.h" |
| 9 #include "GrFontAtlasSizes.h" | 9 #include "GrFontAtlasSizes.h" |
| 10 #include "GrInvariantOutput.h" | 10 #include "GrInvariantOutput.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 const GrGLSLCaps& caps) const { | 148 const GrGLSLCaps& caps) const { |
| 149 return SkNEW_ARGS(GrGLBitmapTextGeoProc, (*this, bt)); | 149 return SkNEW_ARGS(GrGLBitmapTextGeoProc, (*this, bt)); |
| 150 } | 150 } |
| 151 | 151 |
| 152 /////////////////////////////////////////////////////////////////////////////// | 152 /////////////////////////////////////////////////////////////////////////////// |
| 153 | 153 |
| 154 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrBitmapTextGeoProc); | 154 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrBitmapTextGeoProc); |
| 155 | 155 |
| 156 GrGeometryProcessor* GrBitmapTextGeoProc::TestCreate(SkRandom* random, | 156 GrGeometryProcessor* GrBitmapTextGeoProc::TestCreate(SkRandom* random, |
| 157 GrContext*, | 157 GrContext*, |
| 158 const GrDrawTargetCaps&, | 158 const GrCaps&, |
| 159 GrTexture* textures[]) { | 159 GrTexture* textures[]) { |
| 160 int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : | 160 int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : |
| 161 GrProcessorUnitTest::kAlphaTextureIdx; | 161 GrProcessorUnitTest::kAlphaTextureIdx; |
| 162 static const SkShader::TileMode kTileModes[] = { | 162 static const SkShader::TileMode kTileModes[] = { |
| 163 SkShader::kClamp_TileMode, | 163 SkShader::kClamp_TileMode, |
| 164 SkShader::kRepeat_TileMode, | 164 SkShader::kRepeat_TileMode, |
| 165 SkShader::kMirror_TileMode, | 165 SkShader::kMirror_TileMode, |
| 166 }; | 166 }; |
| 167 SkShader::TileMode tileModes[] = { | 167 SkShader::TileMode tileModes[] = { |
| 168 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], | 168 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], |
| (...skipping 13 matching lines...) Expand all Loading... |
| 182 format = kA565_GrMaskFormat; | 182 format = kA565_GrMaskFormat; |
| 183 break; | 183 break; |
| 184 case 2: | 184 case 2: |
| 185 format = kARGB_GrMaskFormat; | 185 format = kARGB_GrMaskFormat; |
| 186 break; | 186 break; |
| 187 } | 187 } |
| 188 | 188 |
| 189 return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx],
params, | 189 return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx],
params, |
| 190 format, GrTest::TestMatrix(random), rando
m->nextBool()); | 190 format, GrTest::TestMatrix(random), rando
m->nextBool()); |
| 191 } | 191 } |
| OLD | NEW |