| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 | 9 |
| 10 #include "SkXfermode.h" | 10 #include "SkXfermode.h" |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 break; | 964 break; |
| 965 } | 965 } |
| 966 default: | 966 default: |
| 967 SkFAIL("Unknown XferEffect mode."); | 967 SkFAIL("Unknown XferEffect mode."); |
| 968 break; | 968 break; |
| 969 } | 969 } |
| 970 } | 970 } |
| 971 | 971 |
| 972 static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrG
LCaps&) { | 972 static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrG
LCaps&) { |
| 973 // The background may come from the dst or from a texture. | 973 // The background may come from the dst or from a texture. |
| 974 int numTextures = (*drawEffect.effect())->numTextures(); | 974 int numTextures = drawEffect.effect()->numTextures(); |
| 975 SkASSERT(numTextures <= 1); | 975 SkASSERT(numTextures <= 1); |
| 976 return (drawEffect.castEffect<XferEffect>().mode() << 1) | numTextur
es; | 976 return (drawEffect.castEffect<XferEffect>().mode() << 1) | numTextur
es; |
| 977 } | 977 } |
| 978 | 978 |
| 979 private: | 979 private: |
| 980 static void HardLight(GrGLShaderBuilder* builder, | 980 static void HardLight(GrGLShaderBuilder* builder, |
| 981 const char* final, | 981 const char* final, |
| 982 const char* src, | 982 const char* src, |
| 983 const char* dst) { | 983 const char* dst) { |
| 984 static const char kComponents[] = {'r', 'g', 'b'}; | 984 static const char kComponents[] = {'r', 'g', 'b'}; |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1956 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSrcXfermode) | 1956 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSrcXfermode) |
| 1957 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstInXfermode) | 1957 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstInXfermode) |
| 1958 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstOutXfermode) | 1958 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstOutXfermode) |
| 1959 #if !SK_ARM_NEON_IS_NONE | 1959 #if !SK_ARM_NEON_IS_NONE |
| 1960 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkNEONProcCoeffXfermode) | 1960 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkNEONProcCoeffXfermode) |
| 1961 #endif | 1961 #endif |
| 1962 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) | 1962 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) |
| 1963 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSSE2ProcCoeffXfermode) | 1963 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSSE2ProcCoeffXfermode) |
| 1964 #endif | 1964 #endif |
| 1965 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1965 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |