| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 // This is a GPU-backend specific test. It relies on static intializers to work | 9 // This is a GPU-backend specific test. It relies on static intializers to work |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return BigKeyProcessor::Create(); | 67 return BigKeyProcessor::Create(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 class GLBigKeyProcessor : public GrGLFragmentProcessor { | 70 class GLBigKeyProcessor : public GrGLFragmentProcessor { |
| 71 public: | 71 public: |
| 72 GLBigKeyProcessor(const GrBackendProcessorFactory& factory, const GrProcesso
r&) | 72 GLBigKeyProcessor(const GrBackendProcessorFactory& factory, const GrProcesso
r&) |
| 73 : INHERITED(factory) {} | 73 : INHERITED(factory) {} |
| 74 | 74 |
| 75 virtual void emitCode(GrGLFPBuilder* builder, | 75 virtual void emitCode(GrGLFPBuilder* builder, |
| 76 const GrFragmentProcessor& fp, | 76 const GrFragmentProcessor& fp, |
| 77 const GrProcessorKey& key, | |
| 78 const char* outputColor, | 77 const char* outputColor, |
| 79 const char* inputColor, | 78 const char* inputColor, |
| 80 const TransformedCoordsArray&, | 79 const TransformedCoordsArray&, |
| 81 const TextureSamplerArray&) { | 80 const TextureSamplerArray&) {} |
| 82 for (uint32_t i = 0; i < kMaxKeySize; i++) { | |
| 83 SkASSERT(key.get32(i) == i); | |
| 84 } | |
| 85 } | |
| 86 | 81 |
| 87 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso
rKeyBuilder* b) { | 82 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso
rKeyBuilder* b) { |
| 88 for (uint32_t i = 0; i < kMaxKeySize; i++) { | 83 for (uint32_t i = 0; i < kMaxKeySize; i++) { |
| 89 b->add32(i); | 84 b->add32(i); |
| 90 } | 85 } |
| 91 } | 86 } |
| 92 | 87 |
| 93 private: | 88 private: |
| 94 typedef GrGLFragmentProcessor INHERITED; | 89 typedef GrGLFragmentProcessor INHERITED; |
| 95 }; | 90 }; |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 } | 509 } |
| 515 #endif | 510 #endif |
| 516 GrTestTarget target; | 511 GrTestTarget target; |
| 517 context->getTestTarget(&target); | 512 context->getTestTarget(&target); |
| 518 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); | 513 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); |
| 519 } | 514 } |
| 520 } | 515 } |
| 521 } | 516 } |
| 522 | 517 |
| 523 #endif | 518 #endif |
| OLD | NEW |