OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 "SkBlitRow.h" | 8 #include "SkBlitRow.h" |
9 #include "SkColorFilter.h" | 9 #include "SkColorFilter.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 typedef SkColorFilter INHERITED; | 124 typedef SkColorFilter INHERITED; |
125 }; | 125 }; |
126 | 126 |
127 /////////////////////////////////////////////////////////////////////////////// | 127 /////////////////////////////////////////////////////////////////////////////// |
128 #if SK_SUPPORT_GPU | 128 #if SK_SUPPORT_GPU |
129 #include "GrBlend.h" | 129 #include "GrBlend.h" |
130 #include "GrEffect.h" | 130 #include "GrEffect.h" |
131 #include "GrEffectUnitTest.h" | 131 #include "GrEffectUnitTest.h" |
132 #include "GrTBackendEffectFactory.h" | 132 #include "GrTBackendEffectFactory.h" |
133 #include "gl/GrGLEffect.h" | 133 #include "gl/GrGLEffect.h" |
| 134 #include "gl/GrGLShaderBuilder.h" |
134 #include "SkGr.h" | 135 #include "SkGr.h" |
135 | 136 |
136 namespace { | 137 namespace { |
137 /** | 138 /** |
138 * A definition of blend equation for one coefficient. Generates a | 139 * A definition of blend equation for one coefficient. Generates a |
139 * blend_coeff * value "expression". | 140 * blend_coeff * value "expression". |
140 */ | 141 */ |
141 template<typename ColorExpr> | 142 template<typename ColorExpr> |
142 static inline ColorExpr blend_term(SkXfermode::Coeff coeff, | 143 static inline ColorExpr blend_term(SkXfermode::Coeff coeff, |
143 const ColorExpr& src, | 144 const ColorExpr& src, |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 SkIntToScalar(SkColorGetB(add)), | 558 SkIntToScalar(SkColorGetB(add)), |
558 0); | 559 0); |
559 return SkColorMatrixFilter::Create(matrix); | 560 return SkColorMatrixFilter::Create(matrix); |
560 } | 561 } |
561 | 562 |
562 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) | 563 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) |
563 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter) | 564 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter) |
564 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(Src_SkModeColorFilter) | 565 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(Src_SkModeColorFilter) |
565 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SrcOver_SkModeColorFilter) | 566 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SrcOver_SkModeColorFilter) |
566 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 567 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |