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

Unified Diff: src/core/SkColorFilter.cpp

Issue 1022673007: Revert of remove colorfilter native-565 support. complicating w/ no real value. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « include/effects/SkModeColorFilter.h ('k') | src/core/SkFilterShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorFilter.cpp
diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp
index 45950ad0b5d35a3496685238c8fb83576d504533..0a9cd93e34edb34203801d69465dfc82042028ac 100644
--- a/src/core/SkColorFilter.cpp
+++ b/src/core/SkColorFilter.cpp
@@ -20,6 +20,15 @@
bool SkColorFilter::asComponentTable(SkBitmap*) const {
return false;
+}
+
+void SkColorFilter::filterSpan16(const uint16_t s[], int count, uint16_t d[]) const {
+ SkASSERT(this->getFlags() & SkColorFilter::kHasFilter16_Flag);
+ SkDEBUGFAIL("missing implementation of SkColorFilter::filterSpan16");
+
+ if (d != s) {
+ memcpy(d, s, count * sizeof(uint16_t));
+ }
}
SkColor SkColorFilter::filterColor(SkColor c) const {
@@ -50,6 +59,12 @@
void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const SK_OVERRIDE {
fInner->filterSpan(shader, count, result);
fOuter->filterSpan(result, count, result);
+ }
+
+ void filterSpan16(const uint16_t shader[], int count, uint16_t result[]) const SK_OVERRIDE {
+ SkASSERT(this->getFlags() & kHasFilter16_Flag);
+ fInner->filterSpan16(shader, count, result);
+ fOuter->filterSpan16(result, count, result);
}
#ifndef SK_IGNORE_TO_STRING
« no previous file with comments | « include/effects/SkModeColorFilter.h ('k') | src/core/SkFilterShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698