| Index: src/core/SkShader.cpp
|
| diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
|
| index 856b6592134ff01451919c48383976fac6cd9a32..4b5dc5dc06d2c1fc807e576a4834002ac266447c 100644
|
| --- a/src/core/SkShader.cpp
|
| +++ b/src/core/SkShader.cpp
|
| @@ -117,8 +117,19 @@ SkShader::Context::ShadeProc SkShader::Context::asAShadeProc(void** ctx) {
|
| return nullptr;
|
| }
|
|
|
| -void SkShader::Context::shadeSpan4f(int x, int y, SkPM4f[], int count) {
|
| - SkASSERT(false && "shadeSpan4f called but not implemented");
|
| +void SkShader::Context::shadeSpan4f(int x, int y, SkPM4f dst[], int count) {
|
| + const int N = 128;
|
| + SkPMColor tmp[N];
|
| + while (count > 0) {
|
| + int n = SkTMin(count, N);
|
| + this->shadeSpan(x, y, tmp, n);
|
| + for (int i = 0; i < n; ++i) {
|
| + dst[i] = SkPM4f::FromPMColor(tmp[i]);
|
| + }
|
| + dst += n;
|
| + x += n;
|
| + count -= n;
|
| + }
|
| }
|
|
|
| #include "SkColorPriv.h"
|
|
|