diff options
author | Mike Klein <mtklein@chromium.org> | 2017-06-22 11:00:17 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-22 19:46:51 +0000 |
commit | 0cc60b8bbd251efbeb374815395ea3e5fb62e184 (patch) | |
tree | 9c8cf5bd9610027a660ec5f34a5f4343a57f1176 /src/shaders | |
parent | 915893167e69f79677b17f3f388072e65d80d083 (diff) |
fix repeat/mirror sampling bleed
I think this has been broken since we tried to simplify this in
https://skia-review.googlesource.com/16547
The HSW backend does still look a little wrong, but improved,
and the others seem fixed. Can you see how this affects your
test cases, layout tests, etc?
BUG=skia:6783
Change-Id: I17957ac8100331bea5b64d674bf43105048b72f6
Reviewed-on: https://skia-review.googlesource.com/20548
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'src/shaders')
-rw-r--r-- | src/shaders/SkImageShader.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/shaders/SkImageShader.cpp b/src/shaders/SkImageShader.cpp index 6d1adb72cf..ed032fa65f 100644 --- a/src/shaders/SkImageShader.cpp +++ b/src/shaders/SkImageShader.cpp @@ -298,17 +298,8 @@ bool SkImageShader::onAppendStages(SkRasterPipeline* p, SkColorSpace* dstCS, SkA gather->ctable = pm.ctable() ? pm.ctable()->readColors() : nullptr; gather->stride = pm.rowBytesAsPixels(); - // Tiling stages (clamp_x, mirror_y, etc.) are inclusive of their limit, - // so we tick down our width and height by one float to make them exclusive. - auto ulp_before = [](float f) { - uint32_t bits; - memcpy(&bits, &f, 4); - bits--; - memcpy(&f, &bits, 4); - return f; - }; - auto limit_x = alloc->make<float>(ulp_before((float)pm. width())), - limit_y = alloc->make<float>(ulp_before((float)pm.height())); + auto limit_x = alloc->make<float>(pm. width()), + limit_y = alloc->make<float>(pm.height()); auto append_tiling_and_gather = [&] { switch (fTileModeX) { |