| 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 #include "SkXfermode.h" | 9 #include "SkXfermode.h" |
| 10 #include "SkXfermode_opts_SSE2.h" | 10 #include "SkXfermode_opts_SSE2.h" |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 { color_modeproc, CANNOT_USE_COEFF, CANNOT_USE_COEFF }, | 651 { color_modeproc, CANNOT_USE_COEFF, CANNOT_USE_COEFF }, |
| 652 { luminosity_modeproc, CANNOT_USE_COEFF, CANNOT_USE_COEFF }, | 652 { luminosity_modeproc, CANNOT_USE_COEFF, CANNOT_USE_COEFF }, |
| 653 }; | 653 }; |
| 654 | 654 |
| 655 /////////////////////////////////////////////////////////////////////////////// | 655 /////////////////////////////////////////////////////////////////////////////// |
| 656 | 656 |
| 657 bool SkXfermode::asMode(Mode* mode) const { | 657 bool SkXfermode::asMode(Mode* mode) const { |
| 658 return false; | 658 return false; |
| 659 } | 659 } |
| 660 | 660 |
| 661 bool SkXfermode::asFragmentProcessor(GrFragmentProcessor**, GrShaderDataManager*
, | 661 bool SkXfermode::asFragmentProcessor(GrFragmentProcessor**, GrProcessorDataManag
er*, |
| 662 GrTexture*) const { | 662 GrTexture*) const { |
| 663 return false; | 663 return false; |
| 664 } | 664 } |
| 665 | 665 |
| 666 bool SkXfermode::asXPFactory(GrXPFactory**) const { | 666 bool SkXfermode::asXPFactory(GrXPFactory**) const { |
| 667 return false; | 667 return false; |
| 668 } | 668 } |
| 669 | 669 |
| 670 | 670 |
| 671 #if SK_SUPPORT_GPU | 671 #if SK_SUPPORT_GPU |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 } | 922 } |
| 923 } | 923 } |
| 924 } | 924 } |
| 925 } | 925 } |
| 926 } | 926 } |
| 927 | 927 |
| 928 #if SK_SUPPORT_GPU | 928 #if SK_SUPPORT_GPU |
| 929 #include "effects/GrCustomXfermode.h" | 929 #include "effects/GrCustomXfermode.h" |
| 930 | 930 |
| 931 bool SkProcCoeffXfermode::asFragmentProcessor(GrFragmentProcessor** fp, | 931 bool SkProcCoeffXfermode::asFragmentProcessor(GrFragmentProcessor** fp, |
| 932 GrShaderDataManager* shaderDataMan
ager, | 932 GrProcessorDataManager* procDataMa
nager, |
| 933 GrTexture* background) const { | 933 GrTexture* background) const { |
| 934 if (GrCustomXfermode::IsSupportedMode(fMode)) { | 934 if (GrCustomXfermode::IsSupportedMode(fMode)) { |
| 935 if (fp) { | 935 if (fp) { |
| 936 SkASSERT(shaderDataManager); | 936 SkASSERT(procDataManager); |
| 937 *fp = GrCustomXfermode::CreateFP(shaderDataManager, fMode, backgroun
d); | 937 *fp = GrCustomXfermode::CreateFP(procDataManager, fMode, background)
; |
| 938 SkASSERT(*fp); | 938 SkASSERT(*fp); |
| 939 } | 939 } |
| 940 return true; | 940 return true; |
| 941 } | 941 } |
| 942 return false; | 942 return false; |
| 943 } | 943 } |
| 944 | 944 |
| 945 bool SkProcCoeffXfermode::asXPFactory(GrXPFactory** xp) const { | 945 bool SkProcCoeffXfermode::asXPFactory(GrXPFactory** xp) const { |
| 946 if (CANNOT_USE_COEFF != fSrcCoeff) { | 946 if (CANNOT_USE_COEFF != fSrcCoeff) { |
| 947 if (xp) { | 947 if (xp) { |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 } else { | 1533 } else { |
| 1534 proc16 = rec.fProc16_General; | 1534 proc16 = rec.fProc16_General; |
| 1535 } | 1535 } |
| 1536 } | 1536 } |
| 1537 return proc16; | 1537 return proc16; |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) | 1540 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) |
| 1541 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) | 1541 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) |
| 1542 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1542 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |