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

Issue 2192103002: Implement resize option for createImageBitmap(HTMLVideoElement) (Closed)

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

Description

Implement resize option for createImageBitmap(HTMLVideoElement) Without resize, this function works like this: It creates a ImageBuffer, and calls video->paintCurrentFrame to the SkCanvas backed by the buffer, then it calls buffer's snapshot to get a SkImage. To make resize efficient, we just need to carefully calculate the parameter for the video->paintCurrentFrame, and we can do the resize in one pass. BUG=627855 Committed: https://crrev.com/2fb8cdf52aabd723d1cf9724a4814cda98078fb8 Cr-Commit-Position: refs/heads/master@{#408850}

Patch Set 1 #

Total comments: 2

Patch Set 2 : make ratio local var #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -4 lines) Patch
A third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-video-resize.html View 1 chunk +115 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 1 2 chunks +11 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (6 generated)
xidachen
PTAL
4 years, 4 months ago (2016-07-29 12:13:31 UTC) #2
Justin Novosad
https://codereview.chromium.org/2192103002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2192103002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode333 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:333: dstPoint.scale(parsedOptions.scaleRatioX, parsedOptions.scaleRatioY); putting the scaleRAtion in parsedOptions is overkill ...
4 years, 4 months ago (2016-07-29 15:08:52 UTC) #3
xidachen
https://codereview.chromium.org/2192103002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2192103002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode333 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:333: dstPoint.scale(parsedOptions.scaleRatioX, parsedOptions.scaleRatioY); On 2016/07/29 15:08:52, Justin Novosad wrote: > ...
4 years, 4 months ago (2016-07-29 17:22:11 UTC) #4
Justin Novosad
lgtm
4 years, 4 months ago (2016-07-30 00:32:03 UTC) #5
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/2192103002/20001
4 years, 4 months ago (2016-07-30 02:06:41 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-07-30 02:53:19 UTC) #11
commit-bot: I haz the power
4 years, 4 months ago (2016-07-30 02:54:37 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/2fb8cdf52aabd723d1cf9724a4814cda98078fb8
Cr-Commit-Position: refs/heads/master@{#408850}

Powered by Google App Engine
This is Rietveld 408576698