diff options
author | 2016-02-15 07:48:35 -0800 | |
---|---|---|
committer | 2016-02-15 07:48:35 -0800 | |
commit | a34be68a7eff0ae475b194f8a29975460cf3e456 (patch) | |
tree | 4cec53acc400eb2788a24c320e551ebac0d27d34 /src/core/SkShader.cpp | |
parent | bd6366a69ec890211496892e1a76535439ca2b30 (diff) |
blitters for sRGB and float16
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1697863002
Review URL: https://codereview.chromium.org/1697863002
Diffstat (limited to 'src/core/SkShader.cpp')
-rw-r--r-- | src/core/SkShader.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp index 856b659213..4b5dc5dc06 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" |