OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "effects/GrCustomXfermode.h" | 8 #include "effects/GrCustomXfermode.h" |
9 #include "effects/GrCustomXfermodePriv.h" | 9 #include "effects/GrCustomXfermodePriv.h" |
10 | 10 |
11 #include "GrCoordTransform.h" | 11 #include "GrCoordTransform.h" |
12 #include "GrContext.h" | 12 #include "GrContext.h" |
13 #include "GrFragmentProcessor.h" | 13 #include "GrFragmentProcessor.h" |
14 #include "GrInvariantOutput.h" | 14 #include "GrInvariantOutput.h" |
15 #include "GrProcessor.h" | 15 #include "GrProcessor.h" |
16 #include "GrTexture.h" | 16 #include "GrTexture.h" |
17 #include "GrTextureAccess.h" | 17 #include "GrTextureAccess.h" |
18 #include "SkXfermode.h" | 18 #include "SkXfermode.h" |
19 #include "gl/GrGLCaps.h" | 19 #include "gl/GrGLCaps.h" |
20 #include "gl/GrGLGpu.h" | 20 #include "gl/GrGLGpu.h" |
21 #include "gl/GrGLProcessor.h" | 21 #include "gl/GrGLFragmentProcessor.h" |
22 #include "gl/GrGLProgramDataManager.h" | 22 #include "gl/GrGLProgramDataManager.h" |
23 #include "gl/builders/GrGLProgramBuilder.h" | 23 #include "gl/builders/GrGLProgramBuilder.h" |
24 #include "glsl/GrGLSLCaps.h" | 24 #include "glsl/GrGLSLCaps.h" |
25 | 25 |
26 bool GrCustomXfermode::IsSupportedMode(SkXfermode::Mode mode) { | 26 bool GrCustomXfermode::IsSupportedMode(SkXfermode::Mode mode) { |
27 return mode > SkXfermode::kLastCoeffMode && mode <= SkXfermode::kLastMode; | 27 return mode > SkXfermode::kLastCoeffMode && mode <= SkXfermode::kLastMode; |
28 } | 28 } |
29 | 29 |
30 /////////////////////////////////////////////////////////////////////////////// | 30 /////////////////////////////////////////////////////////////////////////////// |
31 // Static helpers | 31 // Static helpers |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 } | 813 } |
814 | 814 |
815 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory); | 815 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory); |
816 GrXPFactory* GrCustomXPFactory::TestCreate(GrProcessorTestData* d) { | 816 GrXPFactory* GrCustomXPFactory::TestCreate(GrProcessorTestData* d) { |
817 int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1, | 817 int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1, |
818 SkXfermode::kLastSeparableMode); | 818 SkXfermode::kLastSeparableMode); |
819 | 819 |
820 return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode))); | 820 return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode))); |
821 } | 821 } |
822 | 822 |
OLD | NEW |