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

Issue 2182583002: Change implementation of resize ImageBitmap to meet specs (Closed)

Created:
4 years, 5 months ago by xidachen
Modified:
4 years, 4 months ago
Reviewers:
Justin Novosad
CC:
chromium-reviews, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change implementation of resize ImageBitmap to meet specs In a previous CL: https://codereview.chromium.org/2035113002, the implementation of resize options for ImageBitmap follows the procedure of resize the input and then crop the resized input. The specs recently changed here: https://github.com/whatwg/html/pull/1546, where now we should crop the input first and then scale the cropped input. This CL changes the implementation. The change is actually quite simple, we let parsedOption.cropRect() to keep the information of the cropRect specified by the user, and let parsedOption.resizeWidth(Height) be the resizeWidth && resizeHeight specified by the user. In the cropImage, we only need to change the srcRect and dstRect when we do SkCanvas::drawImageRect. Layout test has been updated to account for this change. BUG=627855 Committed: https://crrev.com/e41056398cca63a760554d3ae7a63857bca93214 Cr-Commit-Position: refs/heads/master@{#407807}

Patch Set 1 #

Total comments: 8

Patch Set 2 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -26 lines) Patch
M third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-resize.html View 2 chunks +4 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 1 5 chunks +18 lines, -17 lines 0 comments Download

Messages

Total messages: 16 (9 generated)
xidachen
PTAL
4 years, 5 months ago (2016-07-25 17:43:39 UTC) #3
Justin Novosad
https://codereview.chromium.org/2182583002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2182583002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode215 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:215: SkImageInfo info = SkImageInfo::Make(parsedOptions.shouldScaleInput ? parsedOptions.resizeWidth : parsedOptions.cropRect.width(), This ...
4 years, 5 months ago (2016-07-25 18:03:10 UTC) #4
xidachen
https://codereview.chromium.org/2182583002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2182583002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode215 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:215: SkImageInfo info = SkImageInfo::Make(parsedOptions.shouldScaleInput ? parsedOptions.resizeWidth : parsedOptions.cropRect.width(), On ...
4 years, 5 months ago (2016-07-25 19:02:02 UTC) #5
Justin Novosad
lgtm
4 years, 4 months ago (2016-07-26 14:09:58 UTC) #6
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/2182583002/20001
4 years, 4 months ago (2016-07-26 15:30:48 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-07-26 15:35:04 UTC) #14
commit-bot: I haz the power
4 years, 4 months ago (2016-07-26 15:37:27 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/e41056398cca63a760554d3ae7a63857bca93214
Cr-Commit-Position: refs/heads/master@{#407807}

Powered by Google App Engine
This is Rietveld 408576698