Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/core/SkXfermode.cpp

Issue 372773002: Remove use of GrEffectRef from draw state and below. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/gpu/GrEffectStage.h ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/gpu/GrEffectStage.h ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698