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

Issue 837643002: Remove Uint8ClampedArray use from ImageBuffer.h ImageDataBuffer (Closed)

Created:
5 years, 11 months ago by Noel Gordon
Modified:
5 years, 11 months ago
Reviewers:
haraken, Yuki
CC:
blink-reviews, krit, pdr+graphicswatchlist_chromium.org, Dominik Röttsches, jzern, blink-reviews-html_chromium.org, skal, jbroman, danakj, dglazkov+blink, Rik, f(malita), urvang (Google), vikasa, Stephen Chennney, rwlbuis, Justin Novosad
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Remove Uint8ClampedArray use from ImageBuffer.h ImageDataBuffer Per issue 235436, wtf/Uint8ClampedArray is moving to Core. Platform should no longer use this type therefore. Replace Uint8ClampedArray use in helper ImageDataBuffer and update the <canvas> "3d" toDataURL code paths. Also, const-correct the encodePixel() inputPixel argument (the encoders do not change the input pixels). Add a bug reference to the PNG encoder. Filed issue 446853 about null data checking the "3d" toDataURL case. Noted that the helper class could be removed eventually, perhaps by wrapping the data in a temporary skia bitmap. TBR=haraken@chromium.org BUG=235436, 446853 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188199

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -20 lines) Patch
M Source/core/html/HTMLCanvasElement.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/graphics/ImageBuffer.h View 1 2 1 chunk +6 lines, -7 lines 0 comments Download
M Source/platform/graphics/ImageBuffer.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/platform/image-encoders/skia/JPEGImageEncoder.cpp View 1 4 chunks +4 lines, -4 lines 0 comments Download
M Source/platform/image-encoders/skia/PNGImageEncoder.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/image-encoders/skia/PNGImageEncoder.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download
M Source/platform/image-encoders/skia/WEBPImageEncoder.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 31 (2 generated)
Noel Gordon
5 years, 11 months ago (2015-01-06 11:51:19 UTC) #2
haraken
https://codereview.chromium.org/837643002/diff/1/Source/platform/image-encoders/skia/PNGImageEncoder.cpp File Source/platform/image-encoders/skia/PNGImageEncoder.cpp (right): https://codereview.chromium.org/837643002/diff/1/Source/platform/image-encoders/skia/PNGImageEncoder.cpp#newcode71 Source/platform/image-encoders/skia/PNGImageEncoder.cpp:71: static bool encodePixels(IntSize imageSize, const unsigned char* inputPixels, bool ...
5 years, 11 months ago (2015-01-06 12:08:45 UTC) #3
Noel Gordon
https://codereview.chromium.org/837643002/diff/1/Source/platform/image-encoders/skia/PNGImageEncoder.cpp File Source/platform/image-encoders/skia/PNGImageEncoder.cpp (right): https://codereview.chromium.org/837643002/diff/1/Source/platform/image-encoders/skia/PNGImageEncoder.cpp#newcode71 Source/platform/image-encoders/skia/PNGImageEncoder.cpp:71: static bool encodePixels(IntSize imageSize, const unsigned char* inputPixels, bool ...
5 years, 11 months ago (2015-01-06 13:54:57 UTC) #4
Yuki
I've not yet taken a careful and deep look at your CL, but I wanted ...
5 years, 11 months ago (2015-01-06 14:57:48 UTC) #5
Noel Gordon
On 2015/01/06 14:57:48, Yuki wrote: > I've not yet taken a careful and deep look ...
5 years, 11 months ago (2015-01-06 15:11:39 UTC) #6
Noel Gordon
On 2015/01/06 15:11:39, noel gordon wrote: > Of course, we could also just pass a ...
5 years, 11 months ago (2015-01-06 16:26:11 UTC) #7
Yuki
1. I'm a little afraid of abuse of DataPiece / ArrayPiece. Unlike ArrayBuffer or ArrayBufferContents, ...
5 years, 11 months ago (2015-01-07 09:05:35 UTC) #8
Noel Gordon
Interesting discussion. DataPiece was just an idea, and there'd sure be pros / cons. Somewhat ...
5 years, 11 months ago (2015-01-07 10:51:08 UTC) #9
Yuki
Although I was not able to find a ChangeLog of ImageDataBuffer, I think it's a ...
5 years, 11 months ago (2015-01-07 13:00:57 UTC) #10
Noel Gordon
On 2015/01/07 13:00:57, Yuki wrote: > Although I was not able to find a ChangeLog ...
5 years, 11 months ago (2015-01-07 13:27:52 UTC) #11
Noel Gordon
On 2015/01/07 13:00:57, Yuki wrote: > I think it's a good chance to refactor ImageDataBuffer. ...
5 years, 11 months ago (2015-01-07 13:59:24 UTC) #12
Yuki
On 2015/01/07 13:27:52, noel gordon wrote: > On 2015/01/07 13:00:57, Yuki wrote: > > Although ...
5 years, 11 months ago (2015-01-07 14:11:33 UTC) #13
Noel Gordon
On 2015/01/07 14:11:33, Yuki wrote: > On 2015/01/07 13:27:52, noel gordon wrote: > > On ...
5 years, 11 months ago (2015-01-07 14:26:11 UTC) #14
Noel Gordon
Another question i had was about ImageBuffer.cpp. The "2d" toDataURL path checks the skia bitmap ...
5 years, 11 months ago (2015-01-07 14:37:40 UTC) #15
Yuki
I agree with a plan to do a refactoring in a separate CL. Could you ...
5 years, 11 months ago (2015-01-07 14:42:06 UTC) #16
Noel Gordon
On 2015/01/07 14:11:33, Yuki wrote: > I think this CL https://codereview.chromium.org/54653004 introduced > ImageDataBuffer. It ...
5 years, 11 months ago (2015-01-07 14:44:16 UTC) #17
Noel Gordon
On 2015/01/07 14:42:06, Yuki wrote: > I agree with a plan to do a refactoring ...
5 years, 11 months ago (2015-01-07 15:09:32 UTC) #18
Yuki
https://codereview.chromium.org/837643002/diff/20001/Source/platform/graphics/ImageBuffer.h File Source/platform/graphics/ImageBuffer.h (right): https://codereview.chromium.org/837643002/diff/20001/Source/platform/graphics/ImageBuffer.h#newcode163 Source/platform/graphics/ImageBuffer.h:163: struct ImageDataBuffer : public IntSize { If ImageDataBuffer inherits ...
5 years, 11 months ago (2015-01-08 04:32:39 UTC) #19
Noel Gordon
On 2015/01/08 04:32:39, Yuki wrote: > https://codereview.chromium.org/837643002/diff/20001/Source/platform/graphics/ImageBuffer.h > File Source/platform/graphics/ImageBuffer.h (right): > > https://codereview.chromium.org/837643002/diff/20001/Source/platform/graphics/ImageBuffer.h#newcode163 > ...
5 years, 11 months ago (2015-01-08 05:29:37 UTC) #20
Yuki
On 2015/01/08 05:29:37, noel gordon wrote: > On 2015/01/08 04:32:39, Yuki wrote: > > > ...
5 years, 11 months ago (2015-01-08 05:44:44 UTC) #21
Noel Gordon
I think I explained that already.
5 years, 11 months ago (2015-01-08 06:25:07 UTC) #22
Yuki
On 2015/01/08 06:25:07, noel gordon wrote: > I think I explained that already. Did you ...
5 years, 11 months ago (2015-01-08 06:28:48 UTC) #23
Noel Gordon
On 2015/01/08 06:28:48, Yuki wrote: > On 2015/01/08 06:25:07, noel gordon wrote: > > I ...
5 years, 11 months ago (2015-01-08 07:14:43 UTC) #24
Yuki
On 2015/01/08 07:14:43, noel gordon wrote: > On 2015/01/08 06:28:48, Yuki wrote: > > On ...
5 years, 11 months ago (2015-01-08 07:22:03 UTC) #25
Noel Gordon
On 2015/01/08 07:22:03, Yuki wrote: > I'm really afraid of implicit conversions. It shouldn't be ...
5 years, 11 months ago (2015-01-09 15:39:31 UTC) #26
Noel Gordon
New patch uploaded.
5 years, 11 months ago (2015-01-09 15:45:00 UTC) #27
Noel Gordon
All review comments addressed. toDataURL security issues 445107 and 445743 resolved.
5 years, 11 months ago (2015-01-12 03:38:21 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/837643002/40001
5 years, 11 months ago (2015-01-12 03:40:00 UTC) #30
commit-bot: I haz the power
5 years, 11 months ago (2015-01-12 03:43:16 UTC) #31
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=188199

Powered by Google App Engine
This is Rietveld 408576698