| 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/GrGLProcessor.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 | 25 |
| 25 bool GrCustomXfermode::IsSupportedMode(SkXfermode::Mode mode) { | 26 bool GrCustomXfermode::IsSupportedMode(SkXfermode::Mode mode) { |
| 26 return mode > SkXfermode::kLastCoeffMode && mode <= SkXfermode::kLastMode; | 27 return mode > SkXfermode::kLastCoeffMode && mode <= SkXfermode::kLastMode; |
| 27 } | 28 } |
| 28 | 29 |
| 29 /////////////////////////////////////////////////////////////////////////////// | 30 /////////////////////////////////////////////////////////////////////////////// |
| 30 // Static helpers | 31 // Static helpers |
| 31 /////////////////////////////////////////////////////////////////////////////// | 32 /////////////////////////////////////////////////////////////////////////////// |
| 32 | 33 |
| 33 static GrBlendEquation hw_blend_equation(SkXfermode::Mode mode) { | 34 static GrBlendEquation hw_blend_equation(SkXfermode::Mode mode) { |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory); | 817 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory); |
| 817 GrXPFactory* GrCustomXPFactory::TestCreate(SkRandom* rand, | 818 GrXPFactory* GrCustomXPFactory::TestCreate(SkRandom* rand, |
| 818 GrContext*, | 819 GrContext*, |
| 819 const GrCaps&, | 820 const GrCaps&, |
| 820 GrTexture*[]) { | 821 GrTexture*[]) { |
| 821 int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLas
tSeparableMode); | 822 int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLas
tSeparableMode); |
| 822 | 823 |
| 823 return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode))); | 824 return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode))); |
| 824 } | 825 } |
| 825 | 826 |
| OLD | NEW |