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

Issue 2582383002: Clamp background tiles when possible (Closed)

Created:
4 years ago by f(malita)
Modified:
4 years ago
Reviewers:
Stephen Chennney, fs, reed1
CC:
fs, ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), gyuyoung2, jbroman, Justin Novosad, kouhei+svg_chromium.org, pdr+graphicswatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clamp background tiles when possible We're currently always drawing tiled backgrounds in repeat/repeat mode, even if we need tiling in one dimension only. This has the unexpected side effect of opposite edge bleed, in the dimension which doesn't require tiling, when rasterized for hidpi devices (DSF causing Skia to sample across the tile boundary). Detect cases where tile repetition is not needed, and strength-reduce the shader tile mode accordingly. Also make Image::drawPattern() protected, as it is only used in subclasses. BUG=673261 R=reed@google.com,fs@opera.com,schenney@chromium.org Committed: https://crrev.com/a7e84a029b10a5a8c0b0faf4bda87e54187840fb Cr-Commit-Position: refs/heads/master@{#439529}

Patch Set 1 #

Patch Set 2 : rebaseline #

Total comments: 2

Patch Set 3 : review #

Patch Set 4 : asserts #

Patch Set 5 : relax asserts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -25 lines) Patch
M third_party/WebKit/LayoutTests/fast/borders/border-image-repeat-round-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/fast/borders/border-image-rotate-transform-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/fast/borders/border-image-side-reduction-expected.png View 1 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/fast/hidpi/background-tile-bleed.html View 1 chunk +33 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/hidpi/background-tile-bleed-expected.html View 1 chunk +21 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-image-repeat-round-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-image-rotate-transform-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-image-side-reduction-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-border-image-source-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-border-image-source-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-border-image-source-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h View 2 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Image.h View 2 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Image.cpp View 1 2 3 4 4 chunks +28 lines, -10 lines 0 comments Download

Messages

Total messages: 22 (14 generated)
f(malita)
A handful of minor diffs: https://storage.googleapis.com/chromium-layout-test-archives/mac_chromium_rel_ng/357032/layout-test-results/results.html with one noticeable improvement: https://storage.googleapis.com/chromium-layout-test-archives/mac_chromium_rel_ng/357032/layout-test-results/fast/borders/border-image-repeat-round-diffs.html
4 years ago (2016-12-19 16:30:06 UTC) #8
Stephen Chennney
lgtm
4 years ago (2016-12-19 16:36:45 UTC) #9
fs
lgtm https://codereview.chromium.org/2582383002/diff/20001/third_party/WebKit/Source/platform/graphics/Image.cpp File third_party/WebKit/Source/platform/graphics/Image.cpp (right): https://codereview.chromium.org/2582383002/diff/20001/third_party/WebKit/Source/platform/graphics/Image.cpp#newcode247 third_party/WebKit/Source/platform/graphics/Image.cpp:247: SkShader::TileMode computeTileMode(float destOffset, Maybe structure this as an ...
4 years ago (2016-12-19 16:49:22 UTC) #10
f(malita)
https://codereview.chromium.org/2582383002/diff/20001/third_party/WebKit/Source/platform/graphics/Image.cpp File third_party/WebKit/Source/platform/graphics/Image.cpp (right): https://codereview.chromium.org/2582383002/diff/20001/third_party/WebKit/Source/platform/graphics/Image.cpp#newcode247 third_party/WebKit/Source/platform/graphics/Image.cpp:247: SkShader::TileMode computeTileMode(float destOffset, On 2016/12/19 16:49:22, fs wrote: > ...
4 years ago (2016-12-19 17:34:56 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2582383002/60001
4 years ago (2016-12-19 17:35:23 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2582383002/80001
4 years ago (2016-12-19 18:04:07 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-12-19 19:59:47 UTC) #20
commit-bot: I haz the power
4 years ago (2016-12-19 20:01:55 UTC) #22
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/a7e84a029b10a5a8c0b0faf4bda87e54187840fb
Cr-Commit-Position: refs/heads/master@{#439529}

Powered by Google App Engine
This is Rietveld 408576698