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

Issue 2399593005: ShapeDetectionImpl: Android implementation of detectFace() (Closed)

Created:
4 years, 2 months ago by xianglu
Modified:
4 years, 2 months ago
CC:
chromium-reviews, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, agrieve+watch_chromium.org, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ShapeDetectionImpl: Android implementation of detectFace() detectFace() method calls android FaceDetecor API to get Face positions. A temporary github demo is used for testing and visualization. Currently it can crash if the image comes from camera. BUG=646083 TEST=https://rawgit.com/Nadia-mint/chrome-demos/shapedetection/shapedetection.html CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/c43957493361040d68a66bd4df7d8693d954799c Cr-Commit-Position: refs/heads/master@{#425270}

Patch Set 1 : Android implementation of detectFace() #

Total comments: 14

Patch Set 2 : ShapeDetectionImpl: Added explanation on bitmap. #

Total comments: 12

Patch Set 3 : mcasas@ comments #

Total comments: 6

Patch Set 4 : Move factory class into a separate file and rebase #

Total comments: 3

Patch Set 5 : Reorder alphabetically #

Total comments: 17

Patch Set 6 : Add security check in ShapeDetectionImpl.java #

Total comments: 2

Patch Set 7 : tsepez@ comment #

Total comments: 2

Patch Set 8 : ncarter@ comment #

Total comments: 1

Patch Set 9 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -3 lines) Patch
M content/browser/DEPS View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M content/public/android/BUILD.gn View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionFactory.java View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java View 1 2 3 4 5 6 7 8 1 chunk +117 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp View 1 2 2 chunks +10 lines, -3 lines 0 comments Download

Messages

Total messages: 84 (54 generated)
xianglu
mcasas@ ptal.
4 years, 2 months ago (2016-10-10 22:30:59 UTC) #9
mcasas
looking good, a few comments https://codereview.chromium.org/2399593005/diff/90001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2399593005/diff/90001/content/browser/frame_host/render_frame_host_impl.cc#newcode2166 content/browser/frame_host/render_frame_host_impl.cc:2166: ->CreateInterfaceFactory<blink::mojom::ShapeDetection>()); These 3 lines ...
4 years, 2 months ago (2016-10-11 02:51:18 UTC) #14
xianglu
ptal. https://codereview.chromium.org/2399593005/diff/90001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2399593005/diff/90001/content/browser/frame_host/render_frame_host_impl.cc#newcode2166 content/browser/frame_host/render_frame_host_impl.cc:2166: ->CreateInterfaceFactory<blink::mojom::ShapeDetection>()); On 2016/10/11 02:51:17, mcasas wrote: > These ...
4 years, 2 months ago (2016-10-11 20:25:51 UTC) #17
xianglu
@qinmin ptal.
4 years, 2 months ago (2016-10-11 21:01:28 UTC) #21
mcasas
lgtm % comments/nits https://codereview.chromium.org/2399593005/diff/110001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2399593005/diff/110001/content/browser/frame_host/render_frame_host_impl.cc#newcode2171 content/browser/frame_host/render_frame_host_impl.cc:2171: ->CreateInterfaceFactory<blink::mojom::ShapeDetection>()); nit: move this before l.2165, ...
4 years, 2 months ago (2016-10-11 23:04:49 UTC) #22
qinmin
https://codereview.chromium.org/2399593005/diff/130001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2399593005/diff/130001/content/browser/frame_host/render_frame_host_impl.cc#newcode2166 content/browser/frame_host/render_frame_host_impl.cc:2166: GetGlobalJavaInterfaces() nit: fix the indent here https://codereview.chromium.org/2399593005/diff/130001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java File content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java ...
4 years, 2 months ago (2016-10-12 17:28:16 UTC) #23
xianglu
@qinmin ptal. https://codereview.chromium.org/2399593005/diff/110001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2399593005/diff/110001/content/browser/frame_host/render_frame_host_impl.cc#newcode2171 content/browser/frame_host/render_frame_host_impl.cc:2171: ->CreateInterfaceFactory<blink::mojom::ShapeDetection>()); On 2016/10/11 23:04:48, mcasas wrote: > ...
4 years, 2 months ago (2016-10-12 18:25:18 UTC) #26
xianglu
@qinmin ptal.
4 years, 2 months ago (2016-10-12 18:25:19 UTC) #27
qinmin
lgtm % nits https://codereview.chromium.org/2399593005/diff/150001/content/browser/frame_host/DEPS File content/browser/frame_host/DEPS (right): https://codereview.chromium.org/2399593005/diff/150001/content/browser/frame_host/DEPS#newcode10 content/browser/frame_host/DEPS:10: "+public/platform/modules/shapedetection/shapedetection.mojom.h" nit: order the include alphabetically ...
4 years, 2 months ago (2016-10-12 18:32:18 UTC) #28
xianglu
@ncarter ptal.
4 years, 2 months ago (2016-10-12 19:29:33 UTC) #32
ncarter (slow)
Just some quick first-impression comments. I'm a little scared of this as attack surface, so ...
4 years, 2 months ago (2016-10-12 20:08:35 UTC) #33
xianglu
tsepez@ ptal.
4 years, 2 months ago (2016-10-12 20:27:44 UTC) #36
xianglu
tsepez@ ptal.
4 years, 2 months ago (2016-10-12 20:27:45 UTC) #37
Tom Sepez
https://codereview.chromium.org/2399593005/diff/170001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java File content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java (right): https://codereview.chromium.org/2399593005/diff/170001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java#newcode35 content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java:35: final int numBytes = width * height * 4; ...
4 years, 2 months ago (2016-10-12 20:46:01 UTC) #38
ncarter (slow)
Also: can you write a browsertest that exercises this codepath?
4 years, 2 months ago (2016-10-12 20:51:51 UTC) #39
ncarter (slow)
(a layouttest might suffice too. is it possible to transform the github example into a ...
4 years, 2 months ago (2016-10-12 20:54:26 UTC) #40
xianglu
ptal. ncarter@, there is a layout test with mock service in third_party/WebKit/LayoutTests/shapedetection/detectface.html. For browsertest, since ...
4 years, 2 months ago (2016-10-13 00:02:33 UTC) #44
Tom Sepez
https://codereview.chromium.org/2399593005/diff/210001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java File content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java (right): https://codereview.chromium.org/2399593005/diff/210001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java#newcode46 content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java:46: if (numBytes > 16777216 || numBytes < 0) { ...
4 years, 2 months ago (2016-10-13 18:08:12 UTC) #49
xianglu
tsepez@ ptal. https://codereview.chromium.org/2399593005/diff/210001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java File content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java (right): https://codereview.chromium.org/2399593005/diff/210001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java#newcode46 content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java:46: if (numBytes > 16777216 || numBytes < ...
4 years, 2 months ago (2016-10-13 18:30:22 UTC) #50
ncarter (slow)
https://codereview.chromium.org/2399593005/diff/230001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java File content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java (right): https://codereview.chromium.org/2399593005/diff/230001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java#newcode45 content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java:45: final long numBytes = ((long) width * height) * ...
4 years, 2 months ago (2016-10-13 18:43:08 UTC) #53
xianglu
ncarter@ ptal. https://codereview.chromium.org/2399593005/diff/230001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java File content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java (right): https://codereview.chromium.org/2399593005/diff/230001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java#newcode45 content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java:45: final long numBytes = ((long) width * ...
4 years, 2 months ago (2016-10-13 19:37:50 UTC) #56
Tom Sepez
lgtm https://codereview.chromium.org/2399593005/diff/250001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java File content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java (right): https://codereview.chromium.org/2399593005/diff/250001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java#newcode32 content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java:32: private static final int MOJO_SHAREDBUFFER_MAX_SIZE = 16 * ...
4 years, 2 months ago (2016-10-13 21:38:34 UTC) #59
ncarter (slow)
lgtm https://codereview.chromium.org/2399593005/diff/170001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java File content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java (right): https://codereview.chromium.org/2399593005/diff/170001/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java#newcode44 content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java:44: bitmap.copyPixelsFromBuffer(imageBuffer); On 2016/10/13 00:02:33, xianglu wrote: > It ...
4 years, 2 months ago (2016-10-13 21:54:09 UTC) #62
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/2399593005/270001
4 years, 2 months ago (2016-10-14 00:28:27 UTC) #67
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/280928)
4 years, 2 months ago (2016-10-14 00:40:30 UTC) #69
xianglu
@haraken ptal.
4 years, 2 months ago (2016-10-14 01:31:16 UTC) #73
haraken
modules/ LGTM
4 years, 2 months ago (2016-10-14 01:37:32 UTC) #75
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/2399593005/290001
4 years, 2 months ago (2016-10-14 07:43:46 UTC) #80
commit-bot: I haz the power
Committed patchset #9 (id:290001)
4 years, 2 months ago (2016-10-14 07:50:14 UTC) #82
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 07:52:14 UTC) #84
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/c43957493361040d68a66bd4df7d8693d954799c
Cr-Commit-Position: refs/heads/master@{#425270}

Powered by Google App Engine
This is Rietveld 408576698