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

Issue 388253004: Drawing an animated image to a canvas now behave as expected (Closed)

Created:
6 years, 5 months ago by Rémi Piotaix
Modified:
6 years, 5 months ago
CC:
blink-reviews, jamesr, krit, blink-reviews-html_chromium.org, jbroman, danakj, dglazkov+blink, Rik, Stephen Chennney, aandrey+blink_chromium.org, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Drawing an animated image to a canvas now behave as expected According to the spec, drawing an animated image to a canvas should only draw the first frame. BUG=286673 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178959

Patch Set 1 #

Total comments: 2

Patch Set 2 : Refactoring according to comments #

Total comments: 2

Patch Set 3 : Correcting nit #

Patch Set 4 : Adding test #

Total comments: 2

Patch Set 5 : Correcting bug and moving logic to HTMLImageElenemt #

Total comments: 8

Patch Set 6 : Corrections according to comments + rebase master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -1 line) Patch
A LayoutTests/fast/canvas/canvas-drawImage-animated.html View 1 2 3 4 5 1 chunk +32 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/canvas-drawImage-animated-expected.txt View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M Source/core/html/HTMLImageElement.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/BitmapImage.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/graphics/BitmapImage.cpp View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M Source/platform/graphics/Image.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M Source/platform/graphics/Image.cpp View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Rémi Piotaix
PTAL
6 years, 5 months ago (2014-07-14 20:20:54 UTC) #1
Justin Novosad
https://codereview.chromium.org/388253004/diff/1/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/388253004/diff/1/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1513 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1513: image = BitmapImage::create(static_cast<BitmapImage*>(image.get())->frameAtIndex(0)); Would be cleaner to put this ...
6 years, 5 months ago (2014-07-16 19:36:02 UTC) #2
Rémi Piotaix
https://codereview.chromium.org/388253004/diff/1/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/388253004/diff/1/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1513 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1513: image = BitmapImage::create(static_cast<BitmapImage*>(image.get())->frameAtIndex(0)); On 2014/07/16 19:36:02, junov wrote: > ...
6 years, 5 months ago (2014-07-17 17:38:20 UTC) #3
Justin Novosad
Code looks good. All you are missing now is a layout test. https://codereview.chromium.org/388253004/diff/20001/Source/platform/graphics/Image.cpp File Source/platform/graphics/Image.cpp ...
6 years, 5 months ago (2014-07-17 17:45:25 UTC) #4
Rémi Piotaix
Test is on his way... https://codereview.chromium.org/388253004/diff/20001/Source/platform/graphics/Image.cpp File Source/platform/graphics/Image.cpp (right): https://codereview.chromium.org/388253004/diff/20001/Source/platform/graphics/Image.cpp#newcode242 Source/platform/graphics/Image.cpp:242: RefPtr<Image> img(this); On 2014/07/17 ...
6 years, 5 months ago (2014-07-17 17:56:45 UTC) #5
pdr.
On 2014/07/17 17:56:45, Rémi Piotaix wrote: > Test is on his way... > > https://codereview.chromium.org/388253004/diff/20001/Source/platform/graphics/Image.cpp ...
6 years, 5 months ago (2014-07-18 14:42:09 UTC) #6
Justin Novosad
https://codereview.chromium.org/388253004/diff/60001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/388253004/diff/60001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1512 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1512: image = image->imageForDefaultFrame(); Wait a minute.. according to the ...
6 years, 5 months ago (2014-07-18 15:22:32 UTC) #7
Justin Novosad
On 2014/07/18 14:42:09, pdr wrote: > On 2014/07/17 17:56:45, Rémi Piotaix wrote: > > Test ...
6 years, 5 months ago (2014-07-18 15:24:33 UTC) #8
Rémi Piotaix
https://codereview.chromium.org/388253004/diff/60001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/388253004/diff/60001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1512 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1512: image = image->imageForDefaultFrame(); On 2014/07/18 15:22:32, junov wrote: > ...
6 years, 5 months ago (2014-07-18 16:04:35 UTC) #9
Justin Novosad
https://codereview.chromium.org/388253004/diff/80001/LayoutTests/fast/canvas/canvas-drawImage-animated.html File LayoutTests/fast/canvas/canvas-drawImage-animated.html (right): https://codereview.chromium.org/388253004/diff/80001/LayoutTests/fast/canvas/canvas-drawImage-animated.html#newcode7 LayoutTests/fast/canvas/canvas-drawImage-animated.html:7: <img id="image" src="data:image/gif;base64,R0lGODlhAQABAIACAEAEHgqZHiH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAkAAAEALAAAAAABAAEAAAICRAEAIfkECAAA/wAsAAAAAAEAAQAAAgJMAQA7" alt="Animated Image" /> Add a comment ...
6 years, 5 months ago (2014-07-24 17:49:22 UTC) #10
Rémi Piotaix
https://codereview.chromium.org/388253004/diff/80001/LayoutTests/fast/canvas/canvas-drawImage-animated.html File LayoutTests/fast/canvas/canvas-drawImage-animated.html (right): https://codereview.chromium.org/388253004/diff/80001/LayoutTests/fast/canvas/canvas-drawImage-animated.html#newcode7 LayoutTests/fast/canvas/canvas-drawImage-animated.html:7: <img id="image" src="data:image/gif;base64,R0lGODlhAQABAIACAEAEHgqZHiH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAkAAAEALAAAAAABAAEAAAICRAEAIfkECAAA/wAsAAAAAAEAAQAAAgJMAQA7" alt="Animated Image" /> On 2014/07/24 17:49:22, ...
6 years, 5 months ago (2014-07-25 18:21:00 UTC) #11
Justin Novosad
On 2014/07/25 18:21:00, Rémi Piotaix wrote: > https://codereview.chromium.org/388253004/diff/80001/LayoutTests/fast/canvas/canvas-drawImage-animated.html > File LayoutTests/fast/canvas/canvas-drawImage-animated.html (right): > > https://codereview.chromium.org/388253004/diff/80001/LayoutTests/fast/canvas/canvas-drawImage-animated.html#newcode7 ...
6 years, 5 months ago (2014-07-25 18:26:14 UTC) #12
Rémi Piotaix
The CQ bit was checked by piotaixr@chromium.org
6 years, 5 months ago (2014-07-25 20:10:01 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piotaixr@chromium.org/388253004/100001
6 years, 5 months ago (2014-07-25 20:11:03 UTC) #14
commit-bot: I haz the power
6 years, 5 months ago (2014-07-25 21:21:09 UTC) #15
Message was sent while issue was closed.
Change committed as 178959

Powered by Google App Engine
This is Rietveld 408576698