New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 665150 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Mac
Pri: 3
Type: Bug

Blocked on:
issue 659139
issue 673052

Blocking:
issue 659138



Sign in to add a comment

Implement QR / barcode detection

Project Member Reported by mcasas@chromium.org, Nov 14 2016

Issue description

QR / barcode API part of Shape Detection API [1]

[1] https://wicg.github.io/shape-detection-api/#barcode-detection-api
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c

commit cd43abe6b873841f33cdbe5cc2789bd1611a3d4c
Author: mcasas <mcasas@chromium.org>
Date: Wed Nov 16 08:32:41 2016

ShapeDetection: implement barcode detection, blink part

This CL introduces the QR/barcode detection API idls
(BarcodeDetector.idl and DetectedBarcode.idl), and
the Blink-side implementation and mojo definition.

FaceDetector.cpp is almost emptied to become a
storefront for ShapeDetector, where most of the code
is moved to and that is used for both Face and Barcode
detection.

LayoutTests and mock mojo implementation are adapted
all over -- in particular, the tests under
LayoutTests/shapedetection are 'parameterised'.

BUG= 665150 

Review-Url: https://codereview.chromium.org/2502723002
Cr-Commit-Position: refs/heads/master@{#432429}

[modify] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/content/public/android/java/src/org/chromium/content/browser/shapedetection/ShapeDetectionImpl.java
[modify] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html
[modify] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-empty-input.html
[delete] https://crrev.com/21c0fa472d09f3fe0e01d6f02480a873c511c3dd/third_party/WebKit/LayoutTests/shapedetection/detectface-HTMLImageElement.html
[delete] https://crrev.com/21c0fa472d09f3fe0e01d6f02480a873c511c3dd/third_party/WebKit/LayoutTests/shapedetection/detectface-HTMLVideoElement.html
[delete] https://crrev.com/21c0fa472d09f3fe0e01d6f02480a873c511c3dd/third_party/WebKit/LayoutTests/shapedetection/detectface-ImageBitmap.html
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/LayoutTests/shapedetection/detectshape-HTMLImageElement.html
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/LayoutTests/shapedetection/detectshape-HTMLVideoElement.html
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/LayoutTests/shapedetection/detectshape-ImageBitmap.html
[modify] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/LayoutTests/shapedetection/resources/mock-shapedetection.js
[modify] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/BUILD.gn
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.h
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.idl
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.cpp
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.h
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.idl
[modify] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
[modify] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/FaceDetector.h
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
[add] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.h
[modify] https://crrev.com/cd43abe6b873841f33cdbe5cc2789bd1611a3d4c/third_party/WebKit/public/platform/modules/shapedetection/shapedetection.mojom

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3868f3870f951921323c6715be6a165cb0bfc221

commit 3868f3870f951921323c6715be6a165cb0bfc221
Author: mcasas <mcasas@chromium.org>
Date: Wed Nov 23 20:34:22 2016

ShapeDetection: split mojom into face and barcode interfaces

Barcode detection for Android, currently in shapedetection.mojom, can
only be implemented in Chrome due to it using Google Play Services
(see https://crrev.com/2512123002). This CL splits the current
interface in shapedetection.mojom, which has a method for detecting
faces and another for detecting barcodes, into two .mojom files, one
for each.

Java class names get s/Shape/Face/.

LayoutTests are updated to work with different mocks, one for
each service implementation.

BUG= 665150 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2522143002
Cr-Commit-Position: refs/heads/master@{#434240}

[modify] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/content/browser/DEPS
[modify] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/content/public/android/BUILD.gn
[modify] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java
[rename] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/content/public/android/java/src/org/chromium/content/browser/shapedetection/FaceDetectionFactory.java
[rename] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/content/public/android/java/src/org/chromium/content/browser/shapedetection/FaceDetectionImpl.java
[modify] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/content/public/app/mojo/content_browser_manifest.json
[rename] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLImageElement.html
[rename] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement.html
[rename] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/LayoutTests/shapedetection/detection-ImageBitmap.html
[rename] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/LayoutTests/shapedetection/detection-options.html
[add] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
[add] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js
[delete] https://crrev.com/94a2767135371369605eda754487ea11ff7213b2/third_party/WebKit/LayoutTests/shapedetection/resources/mock-shapedetection.js
[modify] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.h
[modify] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/Source/modules/shapedetection/FaceDetector.h
[modify] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
[modify] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.h
[modify] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/public/platform/modules/shapedetection/barcodedetection.mojom
[rename] https://crrev.com/3868f3870f951921323c6715be6a165cb0bfc221/third_party/WebKit/public/platform/modules/shapedetection/facedetection.mojom

Comment 4 by mcasas@chromium.org, Nov 23 2016

Components: Blink>ImageCapture

Comment 5 by mcasas@chromium.org, Nov 23 2016

Components: -Blink>Image

Comment 6 by mcasas@chromium.org, Nov 23 2016

Labels: ShapeDetection
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 29 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/4d0fd963ebe26b02d1c58632c2c0fff3eb7d518e

commit 4d0fd963ebe26b02d1c58632c2c0fff3eb7d518e
Author: Nicolas Dossou-gbete <dgn@chromium.org>
Date: Thu Nov 24 15:31:32 2016

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/android_tools/+/b43a6a289a7588b1769814f04dd6c7d7176974cc

commit b43a6a289a7588b1769814f04dd6c7d7176974cc
Author: Ian Wen <ianwen@google.com>
Date: Wed Nov 30 18:41:24 2016

Ignore gmscore repo in the android_tools repo

After dgn@'s change, android_tools now contains gmscore libraries. Yet
this is only local, and the gmscore library is not manged by this repo.

This CL makes git to acknowledge the fact that is should not care about
the gmscore part.

BUG= 665150 

Change-Id: Ibd179d954504a5ff49ade5d6c25cf4ff372e95c2
Reviewed-on: https://chromium-review.googlesource.com/415114
Tested-by: Ian Wen <ianwen@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>

[modify] https://crrev.com/b43a6a289a7588b1769814f04dd6c7d7176974cc/.gitignore

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a9431a4ed6f1bccd426271370ddd6b9530ff39c9

commit a9431a4ed6f1bccd426271370ddd6b9530ff39c9
Author: mcasas <mcasas@chromium.org>
Date: Fri Dec 02 00:04:05 2016

Shape Detection: QR detection in Chrome Android using Play Services

This CL adds a java interface implementation for Barcode
detection. Since it uses the Google Play Services "vision"
category [1], this is landed under chrome/, and hangs under
the ChromeInterfaceRegistrar.java.

Intent to implement: https://groups.google.com/a/chromium.org/forum/m/#!topic/blink-dev/JkdoxpINjxQ

Test: I'm planning to add a browser_test soon; however since
bots might now have the necessary Play services, I'd rather
land it in a followup CL.

BUG= 665150 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
TEST=http://codepen.io/miguelao/pen/bBWOzM, see e.g.
https://drive.google.com/file/d/0B82Jhdx0kSTVb3g5b2xOTWozd3M/view?pli=1

[1] https://developers.google.com/android/reference/com/google/android/gms/vision/barcode/package-summary

Review-Url: https://codereview.chromium.org/2512123002
Cr-Commit-Position: refs/heads/master@{#435781}

[modify] https://crrev.com/a9431a4ed6f1bccd426271370ddd6b9530ff39c9/chrome/android/BUILD.gn
[modify] https://crrev.com/a9431a4ed6f1bccd426271370ddd6b9530ff39c9/chrome/android/java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java
[add] https://crrev.com/a9431a4ed6f1bccd426271370ddd6b9530ff39c9/chrome/android/java/src/org/chromium/chrome/browser/shapedetection/BarcodeDetectionFactory.java
[add] https://crrev.com/a9431a4ed6f1bccd426271370ddd6b9530ff39c9/chrome/android/java/src/org/chromium/chrome/browser/shapedetection/BarcodeDetectionImpl.java
[modify] https://crrev.com/a9431a4ed6f1bccd426271370ddd6b9530ff39c9/chrome/android/java_sources.gni
[modify] https://crrev.com/a9431a4ed6f1bccd426271370ddd6b9530ff39c9/chrome/browser/DEPS
[modify] https://crrev.com/a9431a4ed6f1bccd426271370ddd6b9530ff39c9/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/a9431a4ed6f1bccd426271370ddd6b9530ff39c9/chrome/browser/chrome_content_browser_manifest_overlay.json

I was just trying to build a demo for this and I noticed although the spec says that it should be available in the Worker Context, in the current impl it is not.

The demo app that I am building (qrsnapper.appspot.com) has all the detection logic in a worker thread and I would like to keep it there as much as possible.

Is there a plan to implement this on the worker?
#10: oh, must have fallen down, we should add the
[exposed=Window,Worker] to the idl's.  Notably, it
also fell off the Spec except for DetectedObject.
Project Member

Comment 12 by bugdroid1@chromium.org, Dec 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a7ef3116ec25214bca7252c56bab8840beaf45eb

commit a7ef3116ec25214bca7252c56bab8840beaf45eb
Author: mcasas <mcasas@chromium.org>
Date: Sun Dec 04 19:11:13 2016

ShapeDetection: adding Exposed=(Window,Worker) to idls

Because they are missing as [1] mentions.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=665150#c10

BUG= 665150 

Review-Url: https://codereview.chromium.org/2546293002
Cr-Commit-Position: refs/heads/master@{#436199}

[modify] https://crrev.com/a7ef3116ec25214bca7252c56bab8840beaf45eb/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/a7ef3116ec25214bca7252c56bab8840beaf45eb/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/a7ef3116ec25214bca7252c56bab8840beaf45eb/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/a7ef3116ec25214bca7252c56bab8840beaf45eb/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/a7ef3116ec25214bca7252c56bab8840beaf45eb/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.idl
[modify] https://crrev.com/a7ef3116ec25214bca7252c56bab8840beaf45eb/third_party/WebKit/Source/modules/shapedetection/FaceDetector.idl

Blockedon: 659139
Blockedon: 673052
Project Member

Comment 16 by bugdroid1@chromium.org, Feb 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/90149a4889e454cdca844de420d9deac61b99db6

commit 90149a4889e454cdca844de420d9deac61b99db6
Author: mcasas <mcasas@chromium.org>
Date: Fri Feb 03 03:26:19 2017

Shape detection service: Add QR detection in Mac

This CL lands support for QR/barcode detection in Mac by
adding the correspondent files in services/shape_detection.

Most of the work is reshuffling code that was specific to
Face detection, to suit both Face and Barcode detection:

- Removed shape_detection_service_dispatcher.h and merged
 its two methods as statics in render_process_host_impl.cc.

- Moved common service/ code to detection_utils_mac.h/mm
 (1 helper function)

** Important note re. testing **
Chromium Mac bots seem to have troubles running CoreImage
methods, probably because they are virtual machines (no GPU).
This prevents testing the Barcode detection API properly, and also
renders void the current Face detection test. So, the plan is:
a) Remove the current Mac-Face detection test, because is not
testing anything, really (there was a bug in the error-return path
that is cleaned up here).
b) land (imminently) new unit tests for face and barcode, running
in Mac Gpu bots.

This CL does a); b) will be done in a subsequent CL.

BUG= 665150 
TEST=
./out/gn/Chromium.app/Contents/MacOS/Chromium --enable-blink-features=ShapeDetection,GeometryInterfaces  https://codepen.io/miguelao/full/wgrYjZ
NOTE: unittests for {face/barcode}_detection_impl_mac.mm coming
imminently after this).

Review-Url: https://codereview.chromium.org/2655303005
Cr-Commit-Position: refs/heads/master@{#447900}

[modify] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/base/mac/sdk_forward_declarations.h
[modify] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/base/mac/sdk_forward_declarations.mm
[modify] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/content/browser/BUILD.gn
[modify] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/content/browser/renderer_host/render_process_host_impl.cc
[delete] https://crrev.com/75dc75e5f12aa17db7d46d999d3029e2c9658a84/content/browser/shapedetection/face_detection_service_dispatcher.h
[modify] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/content/browser/shapedetection/shapedetection_browsertest.cc
[modify] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/content/test/data/media/face_detection_test.html
[modify] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/services/shape_detection/BUILD.gn
[add] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/services/shape_detection/barcode_detection_impl.cc
[add] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/services/shape_detection/barcode_detection_impl.h
[add] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/services/shape_detection/barcode_detection_impl_mac.h
[add] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/services/shape_detection/barcode_detection_impl_mac.mm
[add] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/services/shape_detection/detection_utils_mac.h
[add] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/services/shape_detection/detection_utils_mac.mm
[modify] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/services/shape_detection/face_detection_impl_mac.h
[modify] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/services/shape_detection/face_detection_impl_mac.mm
[modify] https://crrev.com/90149a4889e454cdca844de420d9deac61b99db6/services/shape_detection/shape_detection_service.cc

Hi mcasas@, seems the latest commit (90149a4889e454cdca844de420d9deac61b99db6) prevent me from compiling chromium on my MacBook, the compiler says

../../services/shape_detection/barcode_detection_impl_mac.mm:69:8: error: 'CIQRCodeFeature' is only available on macOS 10_10 or newer [-Werror,-Wunguarded-availability]
  for (CIQRCodeFeature* const f in features) {
       ^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFeature.h:113:12: note: 'CIQRCodeFeature' has been explicitly marked partial here
@interface CIQRCodeFeature : CIFeature
           ^
../../services/shape_detection/barcode_detection_impl_mac.mm:69:8: note: enclose 'CIQRCodeFeature' in an @available check to silence this warning
  for (CIQRCodeFeature* const f in features) {
       ^~~~~~~~~~~~~~~
1 error generated.

As you can see I am using 10.12 sdk and running MacOS 10.12.3, seems should not have this error. And can finish the compile before this CL landed. So please let me know if I missed something important, thanks!
ratsunny@: seems like you're compiling using the systems' XCode
and not the one checked out in build/mac_files/XCode.app, what's 
your gn file contents (e.g. out/gn/args.gn)?
Hi mcasas@:
It seems "out/gn/args.gn" not exist (by default) and also not have folder "build/mac_files".

The build instructions I followed is https://chromium.googlesource.com/chromium/src/+/master/docs/mac_build_instructions.md

#19: First, try running the script build/mac_toolchain.py.
OTOH you should have run some command line like:
 `gn gen out/gn` 
or any other folder instead of out/gn, to then proceed with e.g.
 `ninja -C out/gn chrome`
The gn command creates the file out/gn/args.gn and that's the
one I was asking about. 

Note that [1] says "using Xcode is unsupported,", you should try
to compile using the XCode downloaded with Chromium.



[1] https://chromium.googlesource.com/chromium/src/+/master/docs/mac_build_instructions.md#Using-Xcode_Ninja-Hybrid
mcasas@: I believe I did all things mentioned in instructions. And previous build (12 hours ago) before this CL landed are all success.

And the error message I pasted in #17 is generated by ninja, not Xcode

▶ python build/mac_toolchain.py
Using local toolchain for mac.

▶ gn gen out/test              
Done. Made 5668 targets from 1182 files in 3510ms

▶ ninja -C out/test chrome
ninja: Entering directory `out/test'
[53/28326] CC obj/native_client/src/trusted/desc/nrd_xfer/nacl_desc_cond.o^C
ninja: build stopped: interrupted by user.

▶ cat out/test/args.gn
cat: out/test/args.gn: No such file or directory

Since I'm not a googler, maybe we use different toolchain?

PS: I believe "using Xcode is unsupported," means use the built-in build function in Xcode is not supported, not the sdk shipped with Xcode.
#21: hmmm not sure what's happening, regardless, I'm working on a fix
via sdk_forward_declarations.
#22 Thanks! I will try build again once the fix landed.
Project Member

Comment 24 by bugdroid1@chromium.org, Feb 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7058aa1630b1508762a87d3fee3918e42c3046f7

commit 7058aa1630b1508762a87d3fee3918e42c3046f7
Author: mcasas <mcasas@chromium.org>
Date: Fri Feb 03 22:39:56 2017

Mac: forward declare CIQRCodeFeature in base/mac/sdk_forward_declarations.h

CIQRCodeFeature [1] is an interface in the CoreImage framework (which at a time
was part of the QuartzCore framework) and is used to detect QR Codes in
images.  CIQRCodeFeature is only available in Mac OS X 10.10+, which is fine
for the bots bug causes warnings elsewhere:

.../CoreImage.framework/Headers/CIFeature.h:113:12: note: 'CIQRCodeFeature' has been explicitly marked partial here
@interface CIQRCodeFeature : CIFeature
           ^
../../services/shape_detection/barcode_detection_impl_mac.mm:69:8: note: enclose 'CIQRCodeFeature' in an @available check to silence this warning

This CL adds it to sdk_forward_declarations so it's forward-defined when
needed.

[1] https://developer.apple.com/reference/coreimage/ciqrcodefeature?language=objc

BUG= 665150 
TBR=rockot

Review-Url: https://codereview.chromium.org/2667283006
Cr-Commit-Position: refs/heads/master@{#448092}

[modify] https://crrev.com/7058aa1630b1508762a87d3fee3918e42c3046f7/base/mac/sdk_forward_declarations.h
[modify] https://crrev.com/7058aa1630b1508762a87d3fee3918e42c3046f7/services/shape_detection/barcode_detection_impl_mac.h
[modify] https://crrev.com/7058aa1630b1508762a87d3fee3918e42c3046f7/services/shape_detection/face_detection_impl_mac.h
[modify] https://crrev.com/7058aa1630b1508762a87d3fee3918e42c3046f7/services/shape_detection/face_detection_impl_mac.mm

.

Dňa 3. 2. 2017 19:08 používateľ "ratsu… via monorail" <
monorail+v2.3512762969@chromium.org> napísal:
Project Member

Comment 26 by bugdroid1@chromium.org, Feb 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3764134e53831644d51c780f3d9b3a50f8d43865

commit 3764134e53831644d51c780f3d9b3a50f8d43865
Author: mcasas <mcasas@chromium.org>
Date: Mon Feb 13 20:14:20 2017

Shape detection unittests mac (QR and Face) in GPU bots

This CL adds {Barcode,Face}Detection Mac unittests as part of
service_unittests.  These new tests are run in the gpu bots, bc
the normal Mac bots don't have GPUs and that seems to screw
the CoreImage library (FTR I tried loading the lib and symbols in
runtime and/or using a software rendering context, see PS2, but
that didn't solve the problem).

BUG= 665150 ,  659139 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2677553003
Cr-Commit-Position: refs/heads/master@{#450061}

[modify] https://crrev.com/3764134e53831644d51c780f3d9b3a50f8d43865/content/test/gpu/generate_buildbot_json.py
[modify] https://crrev.com/3764134e53831644d51c780f3d9b3a50f8d43865/services/BUILD.gn
[modify] https://crrev.com/3764134e53831644d51c780f3d9b3a50f8d43865/services/shape_detection/BUILD.gn
[modify] https://crrev.com/3764134e53831644d51c780f3d9b3a50f8d43865/services/shape_detection/DEPS
[add] https://crrev.com/3764134e53831644d51c780f3d9b3a50f8d43865/services/shape_detection/PRESUBMIT.py
[modify] https://crrev.com/3764134e53831644d51c780f3d9b3a50f8d43865/services/shape_detection/barcode_detection_impl_mac.mm
[add] https://crrev.com/3764134e53831644d51c780f3d9b3a50f8d43865/services/shape_detection/barcode_detection_impl_mac_unittest.mm
[modify] https://crrev.com/3764134e53831644d51c780f3d9b3a50f8d43865/services/shape_detection/face_detection_impl_mac.mm
[add] https://crrev.com/3764134e53831644d51c780f3d9b3a50f8d43865/services/shape_detection/face_detection_impl_mac_unittest.mm
[modify] https://crrev.com/3764134e53831644d51c780f3d9b3a50f8d43865/testing/buildbot/chromium.gpu.fyi.json

Project Member

Comment 27 by bugdroid1@chromium.org, Feb 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bcc0e7acd0729e980c81a73ba7968045470711e2

commit bcc0e7acd0729e980c81a73ba7968045470711e2
Author: gcasto <gcasto@chromium.org>
Date: Mon Feb 13 21:24:44 2017

Revert of Shape detection unittests mac (QR and Face) in GPU bots (patchset #6 id:280001 of https://codereview.chromium.org/2677553003/ )

Reason for revert:
This causes a failure in service_unittest for Mac 10.10:
https://uberchromegw.corp.google.com/i/chromium.mac/builders/Mac10.10%20Tests

Original issue's description:
> Shape detection unittests mac (QR and Face) in GPU bots
>
> This CL adds {Barcode,Face}Detection Mac unittests as part of
> service_unittests.  These new tests are run in the gpu bots, bc
> the normal Mac bots don't have GPUs and that seems to screw
> the CoreImage library (FTR I tried loading the lib and symbols in
> runtime and/or using a software rendering context, see PS2, but
> that didn't solve the problem).
>
> BUG= 665150 ,  659139 
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
>
> Review-Url: https://codereview.chromium.org/2677553003
> Cr-Commit-Position: refs/heads/master@{#450061}
> Committed: https://chromium.googlesource.com/chromium/src/+/3764134e53831644d51c780f3d9b3a50f8d43865

TBR=rockot@chromium.org,kbr@chromium.org,rsesek@chromium.org,bajones@chromium.org,erg@chromium.org,bsalomon@chromium.org,bsalomon@google.com,mcasas@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 665150 ,  659139 

Review-Url: https://codereview.chromium.org/2692123002
Cr-Commit-Position: refs/heads/master@{#450094}

[modify] https://crrev.com/bcc0e7acd0729e980c81a73ba7968045470711e2/content/test/gpu/generate_buildbot_json.py
[modify] https://crrev.com/bcc0e7acd0729e980c81a73ba7968045470711e2/services/BUILD.gn
[modify] https://crrev.com/bcc0e7acd0729e980c81a73ba7968045470711e2/services/shape_detection/BUILD.gn
[modify] https://crrev.com/bcc0e7acd0729e980c81a73ba7968045470711e2/services/shape_detection/DEPS
[delete] https://crrev.com/cda5197c6532a6ff59171f0bbcb5b34e0652b3db/services/shape_detection/PRESUBMIT.py
[modify] https://crrev.com/bcc0e7acd0729e980c81a73ba7968045470711e2/services/shape_detection/barcode_detection_impl_mac.mm
[delete] https://crrev.com/cda5197c6532a6ff59171f0bbcb5b34e0652b3db/services/shape_detection/barcode_detection_impl_mac_unittest.mm
[modify] https://crrev.com/bcc0e7acd0729e980c81a73ba7968045470711e2/services/shape_detection/face_detection_impl_mac.mm
[delete] https://crrev.com/cda5197c6532a6ff59171f0bbcb5b34e0652b3db/services/shape_detection/face_detection_impl_mac_unittest.mm
[modify] https://crrev.com/bcc0e7acd0729e980c81a73ba7968045470711e2/testing/buildbot/chromium.gpu.fyi.json

Project Member

Comment 28 by bugdroid1@chromium.org, Feb 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7f59d2c0512aae8b641dab53f6a44c407c5f8086

commit 7f59d2c0512aae8b641dab53f6a44c407c5f8086
Author: mcasas <mcasas@chromium.org>
Date: Tue Feb 14 02:50:42 2017

RELAND: Shape detection unittests mac (QR and Face) in GPU bots

The original CL got reverted due to failing in the Mac10.10Tests bot,
which was not adequately filtered out because it wasn't in the CQ :-)

This reland uses --use-gpu-in-tests like all other GPU-specific
tests, checking its presence in the added files.

TBR=rockot@chromium.org, rsesek@chromium.org, kbr@chromium.org, bsalomon@chromium.org, erg@chromium.org
since the changes are straightforward and only affect tests.

Original CL description ------------------------------------------------
Shape detection unittests mac (QR and Face) in GPU bots

This CL adds {Barcode,Face}Detection Mac unittests as part of
service_unittests.  These new tests are run in the gpu bots, bc
the normal Mac bots don't have GPUs and that seems to screw
the CoreImage library (FTR I tried loading the lib and symbols in
runtime and/or using a software rendering context, see PS2, but
that didn't solve the problem).

BUG= 665150 ,  659139 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2677553003
Cr-Commit-Position: refs/heads/master@{#450061}
Committed: https://chromium.googlesource.com/chromium/src/+/3764134e53831644d51c780f3d9b3a50f8d43865

patch from issue 2677553003 at patchset 280001 (http://crrev.com/2677553003#ps280001)

Review-Url: https://codereview.chromium.org/2690253002
Cr-Commit-Position: refs/heads/master@{#450213}

[modify] https://crrev.com/7f59d2c0512aae8b641dab53f6a44c407c5f8086/content/test/gpu/generate_buildbot_json.py
[modify] https://crrev.com/7f59d2c0512aae8b641dab53f6a44c407c5f8086/services/BUILD.gn
[modify] https://crrev.com/7f59d2c0512aae8b641dab53f6a44c407c5f8086/services/shape_detection/BUILD.gn
[modify] https://crrev.com/7f59d2c0512aae8b641dab53f6a44c407c5f8086/services/shape_detection/DEPS
[add] https://crrev.com/7f59d2c0512aae8b641dab53f6a44c407c5f8086/services/shape_detection/PRESUBMIT.py
[modify] https://crrev.com/7f59d2c0512aae8b641dab53f6a44c407c5f8086/services/shape_detection/barcode_detection_impl_mac.mm
[add] https://crrev.com/7f59d2c0512aae8b641dab53f6a44c407c5f8086/services/shape_detection/barcode_detection_impl_mac_unittest.mm
[modify] https://crrev.com/7f59d2c0512aae8b641dab53f6a44c407c5f8086/services/shape_detection/face_detection_impl_mac.mm
[add] https://crrev.com/7f59d2c0512aae8b641dab53f6a44c407c5f8086/services/shape_detection/face_detection_impl_mac_unittest.mm
[modify] https://crrev.com/7f59d2c0512aae8b641dab53f6a44c407c5f8086/testing/buildbot/chromium.gpu.fyi.json

Project Member

Comment 29 by bugdroid1@chromium.org, Feb 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e48e4fcb452ba756a04f1b163123cbd54c485ed

commit 2e48e4fcb452ba756a04f1b163123cbd54c485ed
Author: kbr <kbr@chromium.org>
Date: Wed Feb 15 07:06:40 2017

Disable service_unittests on Mac Pros.

They're failing on these machines. I don't have time to investigate why.

BUG= 659139 , 665150 
TBR=zmo@chromium.org
NOTRY=true
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2694193005
Cr-Commit-Position: refs/heads/master@{#450620}

[modify] https://crrev.com/2e48e4fcb452ba756a04f1b163123cbd54c485ed/content/test/gpu/generate_buildbot_json.py
[modify] https://crrev.com/2e48e4fcb452ba756a04f1b163123cbd54c485ed/testing/buildbot/chromium.gpu.fyi.json

Project Member

Comment 30 by bugdroid1@chromium.org, Feb 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2a7e01bdad5216e739c2a18d1f0ff907641f6609

commit 2a7e01bdad5216e739c2a18d1f0ff907641f6609
Author: kbr <kbr@chromium.org>
Date: Fri Feb 17 00:38:17 2017

Convert remaining PostUploadHooks to use EnsureCQIncludeTrybotsAreAdded.

BUG= 665150 , 659139 ,688765
TBR=dbeam@chromium.org,clamy@chromium.org,rockot@chromium.org,mcasas@chromium.org,dpranke@chromium.org,pdr@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:linux_site_isolation;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2701603004
Cr-Commit-Position: refs/heads/master@{#451158}

[modify] https://crrev.com/2a7e01bdad5216e739c2a18d1f0ff907641f6609/chrome/browser/resources/PRESUBMIT.py
[modify] https://crrev.com/2a7e01bdad5216e739c2a18d1f0ff907641f6609/content/browser/frame_host/PRESUBMIT.py
[modify] https://crrev.com/2a7e01bdad5216e739c2a18d1f0ff907641f6609/services/shape_detection/PRESUBMIT.py
[modify] https://crrev.com/2a7e01bdad5216e739c2a18d1f0ff907641f6609/third_party/WebKit/PRESUBMIT.py

Project Member

Comment 31 by bugdroid1@chromium.org, Mar 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/04e8ca70316308763a6f51d1ee11960819887f7e

commit 04e8ca70316308763a6f51d1ee11960819887f7e
Author: mcasas <mcasas@chromium.org>
Date: Wed Mar 01 03:19:19 2017

Shape detection: moar content_browsertests (face, qr/barcode)

In the spirit of "if it can be tested, it ought to be tested", this
CL cleans up and expands the a few tests related to Shape Detection.

- the current content_browsertest, which on ToT is extended to
work on Mac and cleaned up (generalized and parameterized, variable
names clarified).

- the test face is changed to a smaller, public domain one of size
6182B (~1.4K smaller).

- Also corrected names: s/shapedetection/shape_detection/

- QR/barcode and text detection in Android is based on coreGMS,
so need to be tested under chrome/. A new ShapeDetectionTest.java
is added for that.  To use coreGMS, we have to guarantee that
StrictMode.allowThreadDiskWrites().

BUG= 665150 ,  676124 

Review-Url: https://codereview.chromium.org/2711893003
Cr-Commit-Position: refs/heads/master@{#453818}

[modify] https://crrev.com/04e8ca70316308763a6f51d1ee11960819887f7e/chrome/android/java_sources.gni
[add] https://crrev.com/04e8ca70316308763a6f51d1ee11960819887f7e/chrome/android/javatests/src/org/chromium/chrome/browser/shape_detection/ShapeDetectionTest.java
[add] https://crrev.com/04e8ca70316308763a6f51d1ee11960819887f7e/chrome/test/data/android/barcode_detection.html
[add] https://crrev.com/04e8ca70316308763a6f51d1ee11960819887f7e/chrome/test/data/android/text_detection.html
[add] https://crrev.com/04e8ca70316308763a6f51d1ee11960819887f7e/content/browser/shape_detection/shape_detection_browsertest.cc
[delete] https://crrev.com/bd3f676ad85ff5e61204c2e8c41d3328fe2ae182/content/browser/shapedetection/shapedetection_browsertest.cc
[modify] https://crrev.com/04e8ca70316308763a6f51d1ee11960819887f7e/content/test/BUILD.gn
[rename] https://crrev.com/04e8ca70316308763a6f51d1ee11960819887f7e/content/test/data/media/shape_detection_test.html
[modify] https://crrev.com/04e8ca70316308763a6f51d1ee11960819887f7e/content/test/data/single_face.jpg

Status: Fixed (was: Started)
With #31 sticking, we have now tests for both Mac and Android
for QR detection, so I'm marking this Issue as fixed.

Sign in to add a comment