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

Issue 19267027: Fixing src rectangle clipping with drawImage (Closed)

Created:
7 years, 5 months ago by Justin Novosad
Modified:
7 years, 5 months ago
Reviewers:
Stephen White
CC:
blink-reviews, aandrey+blink_chromium.org, dglazkov+blink, Rik, eae+blinkwatch, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Fixing src rectangle clipping with drawImage BUG=260292 TEST=LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154798

Patch Set 1 #

Patch Set 2 : fix build errors #

Patch Set 3 : compile fixes #

Patch Set 4 : Fixed layout test and clipping logic #

Total comments: 1

Patch Set 5 : fixed gpu baseline #

Patch Set 6 : renamed clipRectsToImage to clipRectsToImageRect #

Total comments: 6

Patch Set 7 : Response to comments #

Patch Set 8 : Modified test to make it gpu friendly #

Patch Set 9 : retry without video #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -14 lines) Patch
M LayoutTests/canvas/philip/tests/2d.drawImage.outsidesource-expected.txt View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html View 1 2 3 4 5 6 7 1 chunk +96 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src-expected.html View 1 2 3 4 5 6 7 1 chunk +49 lines, -0 lines 0 comments Download
M LayoutTests/virtual/gpu/canvas/philip/tests/2d.drawImage.outsidesource-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 2 3 4 5 6 7 chunks +47 lines, -14 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Justin Novosad
PTAL https://codereview.chromium.org/19267027/diff/11001/LayoutTests/canvas/philip/tests/2d.drawImage.outsidesource-expected.txt File LayoutTests/canvas/philip/tests/2d.drawImage.outsidesource-expected.txt (right): https://codereview.chromium.org/19267027/diff/11001/LayoutTests/canvas/philip/tests/2d.drawImage.outsidesource-expected.txt#newcode9 LayoutTests/canvas/philip/tests/2d.drawImage.outsidesource-expected.txt:9: Failed assertion: got pixel [255,0,0,255] at (50,25), expected ...
7 years, 5 months ago (2013-07-22 20:43:49 UTC) #1
Stephen White
https://codereview.chromium.org/19267027/diff/26001/LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html File LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html (right): https://codereview.chromium.org/19267027/diff/26001/LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html#newcode15 LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html:15: img.src = bgcanvas.toDataURL(); Looks like you create this image, ...
7 years, 5 months ago (2013-07-22 22:02:05 UTC) #2
aandrey
FYI https://codereview.chromium.org/19267027/diff/26001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/19267027/diff/26001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1520 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1520: if (!videoRect.intersects(normalizeRect(normalizedSrcRect)) || !normalizedDstRect.width() || !normalizedDstRect.height()) remove redundant ...
7 years, 5 months ago (2013-07-23 09:25:39 UTC) #3
Justin Novosad
New Patch. https://codereview.chromium.org/19267027/diff/26001/LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html File LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html (right): https://codereview.chromium.org/19267027/diff/26001/LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html#newcode15 LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html:15: img.src = bgcanvas.toDataURL(); On 2013/07/22 22:02:06, Stephen ...
7 years, 5 months ago (2013-07-23 17:38:34 UTC) #4
Justin Novosad
In the latest patch I modified the test so that it passes with gpu-acceleration enabled. ...
7 years, 5 months ago (2013-07-23 18:39:05 UTC) #5
Stephen White
On 2013/07/23 18:39:05, junov wrote: > In the latest patch I modified the test so ...
7 years, 5 months ago (2013-07-23 19:18:04 UTC) #6
Stephen White
On 2013/07/23 19:18:04, Stephen White wrote: > On 2013/07/23 18:39:05, junov wrote: > > In ...
7 years, 5 months ago (2013-07-23 19:20:16 UTC) #7
Justin Novosad
I went for the second proposal. Video file was pre-submitted separately. Now we can use ...
7 years, 5 months ago (2013-07-23 19:55:09 UTC) #8
Stephen White
LGTM
7 years, 5 months ago (2013-07-23 20:39:34 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/junov@chromium.org/19267027/42001
7 years, 5 months ago (2013-07-23 22:23:29 UTC) #10
commit-bot: I haz the power
7 years, 5 months ago (2013-07-24 00:58:31 UTC) #11
Message was sent while issue was closed.
Change committed as 154798

Powered by Google App Engine
This is Rietveld 408576698