| 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 |
| 11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
| 12 | 12 |
| 13 #if SK_SUPPORT_GPU && SK_ALLOW_STATIC_GLOBAL_INITIALIZERS | 13 #if SK_SUPPORT_GPU && SK_ALLOW_STATIC_GLOBAL_INITIALIZERS |
| 14 | 14 |
| 15 #include "GrContextFactory.h" | 15 #include "GrContextFactory.h" |
| 16 #include "GrInvariantOutput.h" |
| 16 #include "GrOptDrawState.h" | 17 #include "GrOptDrawState.h" |
| 17 #include "GrTBackendProcessorFactory.h" | 18 #include "GrTBackendProcessorFactory.h" |
| 18 #include "GrTest.h" | 19 #include "GrTest.h" |
| 19 #include "SkChecksum.h" | 20 #include "SkChecksum.h" |
| 20 #include "SkRandom.h" | 21 #include "SkRandom.h" |
| 21 #include "Test.h" | 22 #include "Test.h" |
| 22 #include "effects/GrConfigConversionEffect.h" | 23 #include "effects/GrConfigConversionEffect.h" |
| 23 #include "gl/GrGLPathRendering.h" | 24 #include "gl/GrGLPathRendering.h" |
| 24 #include "gl/GrGpuGL.h" | 25 #include "gl/GrGpuGL.h" |
| 25 #include "gl/builders/GrGLProgramBuilder.h" | 26 #include "gl/builders/GrGLProgramBuilder.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 43 | 44 |
| 44 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR
IDE { | 45 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR
IDE { |
| 45 return GrTBackendFragmentProcessorFactory<BigKeyProcessor>::getInstance(
); | 46 return GrTBackendFragmentProcessorFactory<BigKeyProcessor>::getInstance(
); |
| 46 } | 47 } |
| 47 | 48 |
| 48 typedef GLBigKeyProcessor GLProcessor; | 49 typedef GLBigKeyProcessor GLProcessor; |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 BigKeyProcessor() { } | 52 BigKeyProcessor() { } |
| 52 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE { retur
n true; } | 53 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE { retur
n true; } |
| 53 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE { } | 54 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE
RRIDE { } |
| 54 | 55 |
| 55 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 56 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 56 | 57 |
| 57 typedef GrFragmentProcessor INHERITED; | 58 typedef GrFragmentProcessor INHERITED; |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(BigKeyProcessor); | 61 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(BigKeyProcessor); |
| 61 | 62 |
| 62 GrFragmentProcessor* BigKeyProcessor::TestCreate(SkRandom*, | 63 GrFragmentProcessor* BigKeyProcessor::TestCreate(SkRandom*, |
| 63 GrContext*, | 64 GrContext*, |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 } | 517 } |
| 517 #endif | 518 #endif |
| 518 GrTestTarget target; | 519 GrTestTarget target; |
| 519 context->getTestTarget(&target); | 520 context->getTestTarget(&target); |
| 520 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); | 521 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); |
| 521 } | 522 } |
| 522 } | 523 } |
| 523 } | 524 } |
| 524 | 525 |
| 525 #endif | 526 #endif |
| OLD | NEW |