| 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 #ifndef GrProcessorUnitTest_DEFINED | 8 #ifndef GrProcessorUnitTest_DEFINED |
| 9 #define GrProcessorUnitTest_DEFINED | 9 #define GrProcessorUnitTest_DEFINED |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 /* | 28 /* |
| 29 * GrProcessorTestData is an argument struct to TestCreate functions | 29 * GrProcessorTestData is an argument struct to TestCreate functions |
| 30 * fTextures are valid textures that can optionally be used to construct | 30 * fTextures are valid textures that can optionally be used to construct |
| 31 * GrTextureAccesses. The first texture has config kSkia8888_GrPixelConfig and t
he second has | 31 * GrTextureAccesses. The first texture has config kSkia8888_GrPixelConfig and t
he second has |
| 32 * kAlpha_8_GrPixelConfig. TestCreate functions are also free to create addition
al textures using | 32 * kAlpha_8_GrPixelConfig. TestCreate functions are also free to create addition
al textures using |
| 33 * the GrContext. | 33 * the GrContext. |
| 34 */ | 34 */ |
| 35 struct GrProcessorTestData { | 35 struct GrProcessorTestData { |
| 36 GrProcessorTestData(SkRandom* random, | 36 GrProcessorTestData(SkRandom* random, |
| 37 GrContext* context, | 37 GrContext* context, |
| 38 GrShaderDataManager* shaderDataManager, | 38 GrProcessorDataManager* procDataManager, |
| 39 const GrCaps* caps, | 39 const GrCaps* caps, |
| 40 GrTexture* textures[2]) | 40 GrTexture* textures[2]) |
| 41 : fRandom(random) | 41 : fRandom(random) |
| 42 , fContext(context) | 42 , fContext(context) |
| 43 , fShaderDataManager(shaderDataManager) | 43 , fProcDataManager(procDataManager) |
| 44 , fCaps(caps) { | 44 , fCaps(caps) { |
| 45 fTextures[0] = textures[0]; | 45 fTextures[0] = textures[0]; |
| 46 fTextures[1] = textures[1]; | 46 fTextures[1] = textures[1]; |
| 47 } | 47 } |
| 48 SkRandom* fRandom; | 48 SkRandom* fRandom; |
| 49 GrContext* fContext; | 49 GrContext* fContext; |
| 50 GrShaderDataManager* fShaderDataManager; | 50 GrProcessorDataManager* fProcDataManager; |
| 51 const GrCaps* fCaps; | 51 const GrCaps* fCaps; |
| 52 GrTexture* fTextures[2]; | 52 GrTexture* fTextures[2]; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS | 55 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS |
| 56 | 56 |
| 57 class GrProcessor; | 57 class GrProcessor; |
| 58 class GrTexture; | 58 class GrTexture; |
| 59 | 59 |
| 60 template <class Processor> | 60 template <class Processor> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 #define GR_DEFINE_XP_FACTORY_TEST(X) | 131 #define GR_DEFINE_XP_FACTORY_TEST(X) |
| 132 | 132 |
| 133 // The unit test relies on static initializers. Just declare the TestCreate func
tion so that | 133 // The unit test relies on static initializers. Just declare the TestCreate func
tion so that |
| 134 // its definitions will compile. | 134 // its definitions will compile. |
| 135 #define GR_DECLARE_GEOMETRY_PROCESSOR_TEST
\ | 135 #define GR_DECLARE_GEOMETRY_PROCESSOR_TEST
\ |
| 136 static GrGeometryProcessor* TestCreate(GrProcessorTestData*) | 136 static GrGeometryProcessor* TestCreate(GrProcessorTestData*) |
| 137 #define GR_DEFINE_GEOMETRY_PROCESSOR_TEST(X) | 137 #define GR_DEFINE_GEOMETRY_PROCESSOR_TEST(X) |
| 138 | 138 |
| 139 #endif // !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS | 139 #endif // !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS |
| 140 #endif | 140 #endif |
| OLD | NEW |