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

Issue 2878333004: Use SkJpegEncoder in WebKit platform (Closed)

Created:
3 years, 7 months ago by msarett
Modified:
3 years, 7 months ago
CC:
chromium-reviews, krit, dshwang, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-html_chromium.org, pdr+graphicswatchlist_chromium.org, Justin Novosad, dglazkov+blink, Rik, fmalita+watch_chromium.org, blink-reviews, kinuko+watch, Stephen Chennney, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use SkJpegEncoder in WebKit platform This also makes CanvasAsyncBlobCreator use SkPngEncoder, since it is natural to land jpeg and png together here. The motivations for using Skia encoders are: ***Support for embedding ICC profiles ***Support for linear unpremultiplication and blending ***Support for multiple color types (including F16) ***Support for multiple alpha types (possible follow-up optimization) As a long term refactoring goal, we should be able to delete the WebKit image encoders and the ui/gfx image encoders, thus leaving one set of image encoders to maintain. Incidentally, I think this CL is also a nice simplication for CanvasAsyncBlobCreator. BUG=713862 Review-Url: https://codereview.chromium.org/2878333004 Cr-Commit-Position: refs/heads/master@{#472781} Committed: https://chromium.googlesource.com/chromium/src/+/86074971b9640dbf59869071b4a18bec51c61424

Patch Set 1 #

Total comments: 6

Patch Set 2 : Response to comments + jpeg quality adjustment #

Total comments: 1

Patch Set 3 : Use default jpeg quality when input is out of range #

Total comments: 10

Patch Set 4 : Create instead of Make #

Unified diffs Side-by-side diffs Delta from patch set Stats (+258 lines, -917 lines) Patch
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h View 1 6 chunks +11 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp View 1 2 3 13 chunks +79 lines, -190 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp View 4 chunks +15 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp View 1 2 3 chunks +23 lines, -11 lines 0 comments Download
A third_party/WebKit/Source/platform/image-encoders/ImageEncoder.h View 1 2 3 1 chunk +71 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/image-encoders/ImageEncoder.cpp View 1 2 3 1 chunk +57 lines, -0 lines 0 comments Download
D third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.h View 1 chunk +0 lines, -89 lines 0 comments Download
D third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.cpp View 1 chunk +0 lines, -318 lines 0 comments Download
D third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoderTest.cpp View 1 chunk +0 lines, -236 lines 0 comments Download
D third_party/WebKit/Source/platform/image-encoders/RGBAtoRGB.h View 1 chunk +0 lines, -30 lines 0 comments Download

Messages

Total messages: 50 (42 generated)
msarett1
3 years, 7 months ago (2017-05-15 18:58:33 UTC) #4
f(malita)
https://codereview.chromium.org/2878333004/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2878333004/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode201 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:201: dst_ = WTF::WrapUnique(new VectorWStream(encoded_image_.get())); This is in part pre-existing, ...
3 years, 7 months ago (2017-05-15 19:53:26 UTC) #7
msarett1
https://codereview.chromium.org/2878333004/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2878333004/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode201 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:201: dst_ = WTF::WrapUnique(new VectorWStream(encoded_image_.get())); On 2017/05/15 19:53:25, f(malita) wrote: ...
3 years, 7 months ago (2017-05-15 23:49:08 UTC) #9
msarett1
Justin, would you be the right person to take a look for Olivia and Reza? ...
3 years, 7 months ago (2017-05-16 20:33:43 UTC) #16
f(malita)
lgtm % some nits https://codereview.chromium.org/2878333004/diff/60001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2878333004/diff/60001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode440 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:440: encoder_ = ImageEncoder::Make(&encoded_image_, src_data_, options); ...
3 years, 7 months ago (2017-05-16 21:09:46 UTC) #19
msarett1
https://codereview.chromium.org/2878333004/diff/60001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2878333004/diff/60001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode440 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:440: encoder_ = ImageEncoder::Make(&encoded_image_, src_data_, options); On 2017/05/16 21:09:45, f(malita) ...
3 years, 7 months ago (2017-05-17 02:26:59 UTC) #22
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/2878333004/80001
3 years, 7 months ago (2017-05-18 12:19:40 UTC) #47
commit-bot: I haz the power
3 years, 7 months ago (2017-05-18 12:25:49 UTC) #50
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/86074971b9640dbf59869071b4a1...

Powered by Google App Engine
This is Rietveld 408576698