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 "GrProcessor.h" | 8 #include "GrProcessor.h" |
9 #include "GrBackendProcessorFactory.h" | 9 #include "GrBackendProcessorFactory.h" |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 static SkTArray<GrProcessorTestFactory<GrGeometryProcessor>*, true> gFactori
es; | 31 static SkTArray<GrProcessorTestFactory<GrGeometryProcessor>*, true> gFactori
es; |
32 return &gFactories; | 32 return &gFactories; |
33 } | 33 } |
34 | 34 |
35 /* | 35 /* |
36 * To ensure we always have successful static initialization, before creating fr
om the factories | 36 * To ensure we always have successful static initialization, before creating fr
om the factories |
37 * we verify the count is as expected. If a new factory is added, then these nu
mbers must be | 37 * we verify the count is as expected. If a new factory is added, then these nu
mbers must be |
38 * manually adjusted. | 38 * manually adjusted. |
39 */ | 39 */ |
40 static const int kFPFactoryCount = 37; | 40 static const int kFPFactoryCount = 37; |
41 static const int kGPFactoryCount = 14; | 41 static const int kGPFactoryCount = 15; |
42 | 42 |
43 template<> | 43 template<> |
44 void GrProcessorTestFactory<GrFragmentProcessor>::VerifyFactoryCount() { | 44 void GrProcessorTestFactory<GrFragmentProcessor>::VerifyFactoryCount() { |
45 if (kFPFactoryCount != GetFactories()->count()) { | 45 if (kFPFactoryCount != GetFactories()->count()) { |
46 SkFAIL("Wrong number of fragment processor factories!"); | 46 SkFAIL("Wrong number of fragment processor factories!"); |
47 } | 47 } |
48 } | 48 } |
49 | 49 |
50 template<> | 50 template<> |
51 void GrProcessorTestFactory<GrGeometryProcessor>::VerifyFactoryCount() { | 51 void GrProcessorTestFactory<GrGeometryProcessor>::VerifyFactoryCount() { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 return false; | 187 return false; |
188 } | 188 } |
189 int count = fCoordTransforms.count(); | 189 int count = fCoordTransforms.count(); |
190 for (int i = 0; i < count; ++i) { | 190 for (int i = 0; i < count; ++i) { |
191 if (*fCoordTransforms[i] != *that.fCoordTransforms[i]) { | 191 if (*fCoordTransforms[i] != *that.fCoordTransforms[i]) { |
192 return false; | 192 return false; |
193 } | 193 } |
194 } | 194 } |
195 return true; | 195 return true; |
196 } | 196 } |
OLD | NEW |