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

Unified Diff: src/effects/SkColorFilters.cpp

Issue 1102363006: Revert of De-proc Color32 (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkCoreBlitters.h ('k') | src/opts/SkBlitRow_opts_SSE2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « src/core/SkCoreBlitters.h ('k') | src/opts/SkBlitRow_opts_SSE2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698