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

Unified Diff: src/effects/SkColorFilters.cpp

Issue 1104183004: De-proc Color32 (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: duh 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 87a5a208218db88f1f07c5ca2b6d38e89ed07429..cdbae98bb037db5a82a3bdaecd5028ae90a51497 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/effects/SkColorFilters.cpp
@@ -40,7 +40,7 @@ uint32_t SkModeColorFilter::getFlags() const {
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,19 +394,13 @@ private:
class SrcOver_SkModeColorFilter : public SkModeColorFilter {
public:
- SrcOver_SkModeColorFilter(SkColor color)
- : INHERITED(color, SkXfermode::kSrcOver_Mode) {
- fColor32Proc = SkBlitRow::ColorProcFactory();
- }
+ SrcOver_SkModeColorFilter(SkColor color) : INHERITED(color, SkXfermode::kSrcOver_Mode) { }
void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const override {
- fColor32Proc(result, shader, count, this->getPMColor());
+ SkBlitRow::Color32(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