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

Issue 181693006: Refactoring source image usage in CanvasRenderingContext2D (Closed)

Created:
6 years, 10 months ago by Justin Novosad
Modified:
6 years, 9 months ago
Reviewers:
Stephen White
CC:
blink-reviews, caseq+blink_chromium.org, philipj_slow, loislo+blink_chromium.org, Rik, eustas+blink_chromium.org, feature-media-reviews_chromium.org, alph+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, eric.carlson_apple.com, devtools-reviews_chromium.org, arv+blink, aandrey+blink_chromium.org, watchdog-blink-watchlist_google.com, Inactive, adamk+blink_chromium.org
Visibility:
Public.

Description

Refactoring source image usage in CanvasRenderingContext2D This change fixes a number of spec compliance and unsupported use case issues with the drawImage and createPattern canvas API methods. The CanvasImageSource abstration was added to greatly simplify code in CanvasRenderingContext2D and make the code more maintainable for future improvements to drawImage. BUG=347265, 347229, 343916, 343662, 113592 R=senorblanco@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168864

Patch Set 1 #

Total comments: 6

Patch Set 2 : response to comments #

Total comments: 1

Patch Set 3 : rebase #

Patch Set 4 : Fix for mac build #

Total comments: 5

Patch Set 5 : more improvements #

Patch Set 6 : moar goodness #

Total comments: 3

Patch Set 7 : applied last corrections #

Unified diffs Side-by-side diffs Delta from patch set Stats (+487 lines, -511 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.empty-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.omitted-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/canvas/canvas-empty-image-pattern.html View 1 chunk +8 lines, -4 lines 0 comments Download
D LayoutTests/fast/canvas/canvas-empty-image-pattern-expected.png View Binary file 0 comments Download
M LayoutTests/fast/canvas/canvas-empty-image-pattern-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
D LayoutTests/fast/canvas/create-pattern-does-not-crash.html View 1 2 3 4 1 chunk +0 lines, -13 lines 0 comments Download
D LayoutTests/fast/canvas/create-pattern-does-not-crash-expected.txt View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/canvas/drawImage-with-broken-image.html View 2 chunks +5 lines, -8 lines 0 comments Download
M LayoutTests/fast/canvas/drawImage-with-broken-image-expected.txt View 1 chunk +8 lines, -8 lines 0 comments Download
M LayoutTests/fast/dom/gc-9.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/gc-9-expected.txt View 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/inspector/profiler/canvas2d/canvas2d-api-changes.html View 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/media/video-canvas-draw.html View 1 chunk +41 lines, -0 lines 0 comments Download
A LayoutTests/media/video-canvas-draw-expected.html View 1 chunk +44 lines, -0 lines 0 comments Download
D LayoutTests/virtual/gpu/canvas/philip/tests/2d.pattern.image.incomplete.empty-expected.txt View 1 chunk +0 lines, -2 lines 0 comments Download
D LayoutTests/virtual/gpu/canvas/philip/tests/2d.pattern.image.incomplete.omitted-expected.txt View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/ImageBitmap.h View 1 2 3 4 4 chunks +8 lines, -2 lines 0 comments Download
M Source/core/frame/ImageBitmap.cpp View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
M Source/core/html/HTMLCanvasElement.h View 1 2 3 4 4 chunks +8 lines, -2 lines 0 comments Download
M Source/core/html/HTMLCanvasElement.cpp View 1 2 3 4 1 chunk +36 lines, -0 lines 0 comments Download
M Source/core/html/HTMLCanvasElement.idl View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/HTMLImageElement.h View 1 2 3 4 3 chunks +8 lines, -1 line 0 comments Download
M Source/core/html/HTMLImageElement.cpp View 1 2 3 4 2 chunks +55 lines, -0 lines 0 comments Download
M Source/core/html/HTMLVideoElement.h View 1 2 3 4 4 chunks +9 lines, -2 lines 0 comments Download
M Source/core/html/HTMLVideoElement.cpp View 1 2 3 4 3 chunks +32 lines, -1 line 0 comments Download
A Source/core/html/canvas/CanvasImageSource.h View 1 2 3 4 5 6 1 chunk +76 lines, -0 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext.h View 1 2 2 chunks +0 lines, -17 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext.cpp View 1 2 2 chunks +0 lines, -69 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.h View 1 2 3 4 5 6 5 chunks +8 lines, -19 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 2 3 4 5 6 8 chunks +101 lines, -349 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.idl View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/canvas/WebGLRenderingContextBase.cpp View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Justin Novosad
PTAL
6 years, 10 months ago (2014-02-26 23:09:40 UTC) #1
Stephen White
Great stuff! Nice to see so many tests fixed. The main concern I have at ...
6 years, 9 months ago (2014-02-27 18:53:41 UTC) #2
Justin Novosad
On 2014/02/27 18:53:41, Stephen White wrote: > Great stuff! Nice to see so many tests ...
6 years, 9 months ago (2014-03-04 20:10:14 UTC) #3
Stephen White
https://codereview.chromium.org/181693006/diff/20001/Source/core/frame/ImageBitmap.h File Source/core/frame/ImageBitmap.h (right): https://codereview.chromium.org/181693006/diff/20001/Source/core/frame/ImageBitmap.h#newcode36 Source/core/frame/ImageBitmap.h:36: virtual IntPoint bitmapOffset() const { return m_bitmapOffset; } Is ...
6 years, 9 months ago (2014-03-06 16:06:16 UTC) #4
Justin Novosad
New Patch
6 years, 9 months ago (2014-03-07 16:39:07 UTC) #5
Stephen White
LGTM. Much cleaner, thank you! Remainder of comments are at your discretion. https://codereview.chromium.org/181693006/diff/100001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp ...
6 years, 9 months ago (2014-03-10 15:27:02 UTC) #6
Stephen White
6 years, 9 months ago (2014-03-10 15:27:10 UTC) #7
Justin Novosad
On 2014/03/10 15:27:02, Stephen White wrote: > LGTM. Much cleaner, thank you! > > Remainder ...
6 years, 9 months ago (2014-03-10 19:01:20 UTC) #8
Justin Novosad
The CQ bit was checked by junov@chromium.org
6 years, 9 months ago (2014-03-10 19:27:21 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/181693006/120001
6 years, 9 months ago (2014-03-10 19:27:28 UTC) #10
commit-bot: I haz the power
6 years, 9 months ago (2014-03-10 22:10:26 UTC) #11
Message was sent while issue was closed.
Change committed as 168864

Powered by Google App Engine
This is Rietveld 408576698