Index: src/effects/SkColorFilters.cpp |
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp |
index cdbae98bb037db5a82a3bdaecd5028ae90a51497..87a5a208218db88f1f07c5ca2b6d38e89ed07429 100644 |
--- a/src/effects/SkColorFilters.cpp |
+++ b/src/effects/SkColorFilters.cpp |
@@ -40,7 +40,7 @@ |
void SkModeColorFilter::filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const { |
SkPMColor color = fPMColor; |
SkXfermodeProc proc = fProc; |
- |
+ |
for (int i = 0; i < count; i++) { |
result[i] = proc(color, shader[i]); |
} |
@@ -394,13 +394,19 @@ |
class SrcOver_SkModeColorFilter : public SkModeColorFilter { |
public: |
- SrcOver_SkModeColorFilter(SkColor color) : INHERITED(color, SkXfermode::kSrcOver_Mode) { } |
+ SrcOver_SkModeColorFilter(SkColor color) |
+ : INHERITED(color, SkXfermode::kSrcOver_Mode) { |
+ fColor32Proc = SkBlitRow::ColorProcFactory(); |
+ } |
void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const override { |
- SkBlitRow::Color32(result, shader, count, this->getPMColor()); |
+ fColor32Proc(result, shader, count, this->getPMColor()); |
} |
private: |
+ |
+ SkBlitRow::ColorProc fColor32Proc; |
+ |
typedef SkModeColorFilter INHERITED; |
}; |