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

Issue 2448193002: ShapeDetection: support CanvasImageSource as detect() source (Closed)

Created:
4 years, 1 month ago by mcasas
Modified:
4 years, 1 month ago
Reviewers:
haraken, esprehn, xianglu
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ShapeDetection: support CanvasImageSource as detect() source This CL changes the input parameter to FaceDetector.detect() to be a CanvasImageSource, refactors the current code to handle HTMLImageElement inputs, and adds support for ImageBitmap. So now we'll have a single detect() method doing the common stuff and delegating the specifics to e.g. detectFacesOnImageElement(), detectFacesOnImageBitmap() etc. It also beefs up the corresponding LayoutTests, renaming some files/functions where appropriate BUG=659138 TEST=layout tests (fast, non fast, http). Committed: https://crrev.com/a4f0895546f2d20906d5b276a9aafae9af50dd30 Cr-Commit-Position: refs/heads/master@{#428094}

Patch Set 1 : #

Total comments: 12

Patch Set 2 : xianglu@s comments #

Total comments: 2

Patch Set 3 : Using CanvasImageSource as input for detect() #

Total comments: 4

Patch Set 4 : esprehn@ comments and specific LayoutTest for empty HTMLImageElement #

Messages

Total messages: 36 (18 generated)
mcasas
xianglu@ PTAL
4 years, 1 month ago (2016-10-25 19:16:11 UTC) #5
xianglu
Just a few comments. https://codereview.chromium.org/2448193002/diff/40001/third_party/WebKit/LayoutTests/http/tests/shapedetection/shapedetection-cross-origin.html File third_party/WebKit/LayoutTests/http/tests/shapedetection/shapedetection-cross-origin.html (right): https://codereview.chromium.org/2448193002/diff/40001/third_party/WebKit/LayoutTests/http/tests/shapedetection/shapedetection-cross-origin.html#newcode7 third_party/WebKit/LayoutTests/http/tests/shapedetection/shapedetection-cross-origin.html:7: const imageUrl = "http://localhost:8080/security/resources/abe.png"; IMAGE_URL? ...
4 years, 1 month ago (2016-10-25 21:07:46 UTC) #6
mcasas
PTAL https://codereview.chromium.org/2448193002/diff/40001/third_party/WebKit/LayoutTests/http/tests/shapedetection/shapedetection-cross-origin.html File third_party/WebKit/LayoutTests/http/tests/shapedetection/shapedetection-cross-origin.html (right): https://codereview.chromium.org/2448193002/diff/40001/third_party/WebKit/LayoutTests/http/tests/shapedetection/shapedetection-cross-origin.html#newcode7 third_party/WebKit/LayoutTests/http/tests/shapedetection/shapedetection-cross-origin.html:7: const imageUrl = "http://localhost:8080/security/resources/abe.png"; On 2016/10/25 21:07:45, xianglu ...
4 years, 1 month ago (2016-10-25 21:47:38 UTC) #7
xianglu
lgtm.
4 years, 1 month ago (2016-10-25 22:06:46 UTC) #8
mcasas
haraken@ please RS modules/shapedetection
4 years, 1 month ago (2016-10-25 22:21:31 UTC) #10
mcasas
esprehn@ RS plz changes in modules/shapedetection
4 years, 1 month ago (2016-10-26 15:46:14 UTC) #16
haraken
Sorry, I forgot to publish the comment. LGTM. https://codereview.chromium.org/2448193002/diff/60001/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp File third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp (right): https://codereview.chromium.org/2448193002/diff/60001/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp#newcode170 third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp:170: allocationSize ...
4 years, 1 month ago (2016-10-26 15:50:59 UTC) #17
esprehn
I don't think we should land this, the api should just take a CanvasImageSource and ...
4 years, 1 month ago (2016-10-26 16:03:50 UTC) #18
mcasas
On 2016/10/26 16:03:50, esprehn wrote: > I don't think we should land this, the api ...
4 years, 1 month ago (2016-10-26 17:44:37 UTC) #19
mcasas
PTAL https://codereview.chromium.org/2448193002/diff/60001/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp File third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp (right): https://codereview.chromium.org/2448193002/diff/60001/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp#newcode170 third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp:170: allocationSize = imageBitmap->size().area() * 4; // 4 bpp. ...
4 years, 1 month ago (2016-10-26 18:08:26 UTC) #23
xianglu
still lgtm.
4 years, 1 month ago (2016-10-27 02:55:20 UTC) #24
mcasas
On 2016/10/27 02:55:20, xianglu wrote: > still lgtm. haraken@, esprehn@ PTAL
4 years, 1 month ago (2016-10-27 03:45:39 UTC) #25
haraken
On 2016/10/27 03:45:39, mcasas wrote: > On 2016/10/27 02:55:20, xianglu wrote: > > still lgtm. ...
4 years, 1 month ago (2016-10-27 06:53:10 UTC) #26
esprehn
Lgtm, Im not sure why the spec wants to throw for zero sized images though. ...
4 years, 1 month ago (2016-10-27 15:46:47 UTC) #27
mcasas
https://codereview.chromium.org/2448193002/diff/100001/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp File third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp (right): https://codereview.chromium.org/2448193002/diff/100001/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp#newcode90 third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp:90: if (img->bitmapSourceSize().isZero()) { On 2016/10/27 15:46:47, esprehn wrote: > ...
4 years, 1 month ago (2016-10-27 17:09:12 UTC) #29
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/2448193002/140001
4 years, 1 month ago (2016-10-27 17:54:54 UTC) #32
commit-bot: I haz the power
Committed patchset #4 (id:140001)
4 years, 1 month ago (2016-10-27 18:47:10 UTC) #34
commit-bot: I haz the power
4 years, 1 month ago (2016-10-27 19:01:52 UTC) #36
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/a4f0895546f2d20906d5b276a9aafae9af50dd30
Cr-Commit-Position: refs/heads/master@{#428094}

Powered by Google App Engine
This is Rietveld 408576698