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

Issue 2438313002: Fixing color bleeding when the canvas is stretched. (Closed)

Created:
4 years, 2 months ago by zakerinasab
Modified:
4 years, 1 month ago
CC:
chromium-reviews, dshwang, ajuma+watch-canvas_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink, Rik, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixing color bleeding when the canvas is stretched. When the canvas is stretched by zooming the browser window, the interpolation filter may cause color bleeding. We fix this by half-pixel padding before paint invalidation when necessary. BUG=654700 Committed: https://crrev.com/4bdb40f764d2fc3ac7f4e34da68424e84b89968f Cr-Commit-Position: refs/heads/master@{#427382}

Patch Set 1 : Addressing the color bleeding issue. #

Total comments: 2

Patch Set 2 : Adding the layout test. #

Patch Set 3 : Minor fix. #

Total comments: 4

Patch Set 4 : Addressing comments. #

Patch Set 5 : Addressing comments. #

Total comments: 2

Patch Set 6 : Addressing comments. #

Total comments: 1

Patch Set 7 : Addressing comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -1 line) Patch
A third_party/WebKit/ManualTests/canvas-stretch-color-bleeding.html View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 2 3 4 5 6 1 chunk +10 lines, -1 line 0 comments Download

Messages

Total messages: 26 (7 generated)
zakerinasab
I uploaded the CL. I can't find a proper way to write the layout test ...
4 years, 2 months ago (2016-10-21 15:23:47 UTC) #4
Justin Novosad
For the test, you should try using a canvas that is zoomed using CSS. https://codereview.chromium.org/2438313002/diff/20001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp ...
4 years, 2 months ago (2016-10-21 15:56:03 UTC) #5
Justin Novosad
Here is a fiddle that reproduces the bug: https://jsfiddle.net/3erkjboa/
4 years, 2 months ago (2016-10-21 16:02:10 UTC) #6
zakerinasab
On 2016/10/21 16:02:10, Justin Novosad wrote: > Here is a fiddle that reproduces the bug: ...
4 years, 2 months ago (2016-10-21 16:03:56 UTC) #7
xidachen
On 2016/10/21 16:03:56, zakerinasab wrote: > On 2016/10/21 16:02:10, Justin Novosad wrote: > > Here ...
4 years, 2 months ago (2016-10-21 16:07:04 UTC) #8
Justin Novosad
Just re-click the "run" button if you don't see the bug the first time.
4 years, 2 months ago (2016-10-21 16:35:25 UTC) #9
zakerinasab
Layout test added.
4 years, 2 months ago (2016-10-21 17:55:36 UTC) #11
Justin Novosad
https://codereview.chromium.org/2438313002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/canvas-stretch-color-bleeding.html File third_party/WebKit/LayoutTests/fast/canvas/canvas-stretch-color-bleeding.html (right): https://codereview.chromium.org/2438313002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/canvas-stretch-color-bleeding.html#newcode10 third_party/WebKit/LayoutTests/fast/canvas/canvas-stretch-color-bleeding.html:10: <canvas id='foo' width='100' height='100' style='width:500px;height:100px'> </canvas> make the style ...
4 years, 2 months ago (2016-10-21 18:15:00 UTC) #12
zakerinasab
New patch submitted. https://codereview.chromium.org/2438313002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/canvas-stretch-color-bleeding.html File third_party/WebKit/LayoutTests/fast/canvas/canvas-stretch-color-bleeding.html (right): https://codereview.chromium.org/2438313002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/canvas-stretch-color-bleeding.html#newcode10 third_party/WebKit/LayoutTests/fast/canvas/canvas-stretch-color-bleeding.html:10: <canvas id='foo' width='100' height='100' style='width:500px;height:100px'> </canvas> ...
4 years, 2 months ago (2016-10-21 19:20:07 UTC) #13
zakerinasab
New patch submitted.
4 years, 2 months ago (2016-10-21 20:56:16 UTC) #14
Justin Novosad
https://codereview.chromium.org/2438313002/diff/100001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/2438313002/diff/100001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode337 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:337: m_dirtyRect.expand(FloatSize(0.5, 0.5)); Just use inflate
4 years, 1 month ago (2016-10-24 17:53:10 UTC) #15
zakerinasab
New patch submitted. https://codereview.chromium.org/2438313002/diff/100001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/2438313002/diff/100001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode337 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:337: m_dirtyRect.expand(FloatSize(0.5, 0.5)); On 2016/10/24 17:53:10, Justin ...
4 years, 1 month ago (2016-10-24 18:14:35 UTC) #16
Justin Novosad
https://codereview.chromium.org/2438313002/diff/120001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/2438313002/diff/120001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode337 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:337: m_dirtyRect.inflate(0.25); Are you sure 0.25 is always enough? Even ...
4 years, 1 month ago (2016-10-25 14:30:15 UTC) #17
zakerinasab
On 2016/10/25 14:30:15, Justin Novosad wrote: > https://codereview.chromium.org/2438313002/diff/120001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp > File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): > > https://codereview.chromium.org/2438313002/diff/120001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode337 ...
4 years, 1 month ago (2016-10-25 14:35:55 UTC) #18
zakerinasab
New patch submitted.
4 years, 1 month ago (2016-10-25 14:36:21 UTC) #19
Justin Novosad
On 2016/10/25 14:35:55, zakerinasab wrote: > On 2016/10/25 14:30:15, Justin Novosad wrote: > > > ...
4 years, 1 month ago (2016-10-25 15:14:03 UTC) #20
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/2438313002/140001
4 years, 1 month ago (2016-10-25 15:15:32 UTC) #22
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 1 month ago (2016-10-25 16:52:35 UTC) #24
commit-bot: I haz the power
4 years, 1 month ago (2016-10-25 17:16:35 UTC) #26
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/4bdb40f764d2fc3ac7f4e34da68424e84b89968f
Cr-Commit-Position: refs/heads/master@{#427382}

Powered by Google App Engine
This is Rietveld 408576698