aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkColorFilter.cpp15
-rw-r--r--src/core/SkFilterShader.cpp19
-rw-r--r--src/core/SkFilterShader.h1
3 files changed, 4 insertions, 31 deletions
diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp
index 0a9cd93e34..45950ad0b5 100644
--- a/src/core/SkColorFilter.cpp
+++ b/src/core/SkColorFilter.cpp
@@ -22,15 +22,6 @@ 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 {
SkPMColor dst, src = SkPreMultiplyColor(c);
this->filterSpan(&src, 1, &dst);
@@ -61,12 +52,6 @@ public:
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
void toString(SkString* str) const SK_OVERRIDE {
SkString outerS, innerS;
diff --git a/src/core/SkFilterShader.cpp b/src/core/SkFilterShader.cpp
index 48c4b8b477..a10a7c9d77 100644
--- a/src/core/SkFilterShader.cpp
+++ b/src/core/SkFilterShader.cpp
@@ -46,13 +46,12 @@ uint32_t SkFilterShader::FilterShaderContext::getFlags() const {
uint32_t shaderF = fShaderContext->getFlags();
uint32_t filterF = filterShader.fFilter->getFlags();
- // if the filter doesn't support 16bit, clear the matching bit in the shader
- if (!(filterF & SkColorFilter::kHasFilter16_Flag)) {
- shaderF &= ~SkShader::kHasSpan16_Flag;
- }
+ // filters don't support 16bit, so clear the matching bit in the shader
+ shaderF &= ~SkShader::kHasSpan16_Flag;
+
// if the filter might change alpha, clear the opaque flag in the shader
if (!(filterF & SkColorFilter::kAlphaUnchanged_Flag)) {
- shaderF &= ~(SkShader::kOpaqueAlpha_Flag | SkShader::kHasSpan16_Flag);
+ shaderF &= ~SkShader::kOpaqueAlpha_Flag;
}
return shaderF;
}
@@ -87,16 +86,6 @@ void SkFilterShader::FilterShaderContext::shadeSpan(int x, int y, SkPMColor resu
filterShader.fFilter->filterSpan(result, count, result);
}
-void SkFilterShader::FilterShaderContext::shadeSpan16(int x, int y, uint16_t result[], int count) {
- const SkFilterShader& filterShader = static_cast<const SkFilterShader&>(fShader);
-
- SkASSERT(fShaderContext->getFlags() & SkShader::kHasSpan16_Flag);
- SkASSERT(filterShader.fFilter->getFlags() & SkColorFilter::kHasFilter16_Flag);
-
- fShaderContext->shadeSpan16(x, y, result, count);
- filterShader.fFilter->filterSpan16(result, count, result);
-}
-
#ifndef SK_IGNORE_TO_STRING
void SkFilterShader::toString(SkString* str) const {
str->append("SkFilterShader: (");
diff --git a/src/core/SkFilterShader.h b/src/core/SkFilterShader.h
index dca9567e66..65291c8f39 100644
--- a/src/core/SkFilterShader.h
+++ b/src/core/SkFilterShader.h
@@ -28,7 +28,6 @@ public:
uint32_t getFlags() const SK_OVERRIDE;
void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE;
- void shadeSpan16(int x, int y, uint16_t[], int count) SK_OVERRIDE;
void set3DMask(const SkMask* mask) SK_OVERRIDE {
// forward to our proxy