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 "GrTBackendProcessorFactory.h" | 15 #include "GrTBackendProcessorFactory.h" |
16 #include "GrContextFactory.h" | 16 #include "GrContextFactory.h" |
| 17 #include "GrInvariantOutput.h" |
17 #include "GrOptDrawState.h" | 18 #include "GrOptDrawState.h" |
18 #include "effects/GrConfigConversionEffect.h" | 19 #include "effects/GrConfigConversionEffect.h" |
19 #include "gl/builders/GrGLProgramBuilder.h" | 20 #include "gl/builders/GrGLProgramBuilder.h" |
20 #include "gl/GrGLPathRendering.h" | 21 #include "gl/GrGLPathRendering.h" |
21 #include "gl/GrGpuGL.h" | 22 #include "gl/GrGpuGL.h" |
22 #include "SkChecksum.h" | 23 #include "SkChecksum.h" |
23 #include "SkRandom.h" | 24 #include "SkRandom.h" |
24 #include "Test.h" | 25 #include "Test.h" |
25 | 26 |
26 /* | 27 /* |
(...skipping 15 matching lines...) Expand all Loading... |
42 | 43 |
43 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR
IDE { | 44 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR
IDE { |
44 return GrTBackendFragmentProcessorFactory<BigKeyProcessor>::getInstance(
); | 45 return GrTBackendFragmentProcessorFactory<BigKeyProcessor>::getInstance(
); |
45 } | 46 } |
46 | 47 |
47 typedef GLBigKeyProcessor GLProcessor; | 48 typedef GLBigKeyProcessor GLProcessor; |
48 | 49 |
49 private: | 50 private: |
50 BigKeyProcessor() { } | 51 BigKeyProcessor() { } |
51 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE { retur
n true; } | 52 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE { retur
n true; } |
52 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE { } | 53 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE
RRIDE { } |
53 | 54 |
54 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 55 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
55 | 56 |
56 typedef GrFragmentProcessor INHERITED; | 57 typedef GrFragmentProcessor INHERITED; |
57 }; | 58 }; |
58 | 59 |
59 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(BigKeyProcessor); | 60 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(BigKeyProcessor); |
60 | 61 |
61 GrFragmentProcessor* BigKeyProcessor::TestCreate(SkRandom*, | 62 GrFragmentProcessor* BigKeyProcessor::TestCreate(SkRandom*, |
62 GrContext*, | 63 GrContext*, |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 if (type == GrContextFactory::kANGLE_GLContextType) { | 507 if (type == GrContextFactory::kANGLE_GLContextType) { |
507 maxStages = 3; | 508 maxStages = 3; |
508 } | 509 } |
509 #endif | 510 #endif |
510 REPORTER_ASSERT(reporter, gpu->programUnitTest(maxStages)); | 511 REPORTER_ASSERT(reporter, gpu->programUnitTest(maxStages)); |
511 } | 512 } |
512 } | 513 } |
513 } | 514 } |
514 | 515 |
515 #endif | 516 #endif |
OLD | NEW |