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

Unified Diff: services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java

Issue 2868883003: Shape Detection: use Google Play services Face detection where available (Closed)
Patch Set: reillyg@ nit and filling faceArray[i].landmarks in FaceDetectionImpl.java Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java
diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java
index 0d7dcbb9f6c3671158b86139e509c93ff7b0c486..4d88df132ea630035c9358cb2dcdfaf8b07fd996 100644
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java
@@ -18,6 +18,7 @@ import org.chromium.mojo.system.SharedBufferHandle.MapFlags;
import org.chromium.shape_detection.mojom.FaceDetection;
import org.chromium.shape_detection.mojom.FaceDetectionResult;
import org.chromium.shape_detection.mojom.FaceDetectorOptions;
+import org.chromium.shape_detection.mojom.Landmark;
import java.nio.ByteBuffer;
@@ -104,6 +105,8 @@ public class FaceDetectionImpl implements FaceDetection {
faceArray[i].boundingBox.width = 2 * eyesDistance;
faceArray[i].boundingBox.height = 2 * eyesDistance;
// TODO(xianglu): Consider adding Face.confidence and Face.pose.
+
+ faceArray[i].landmarks = new Landmark[0];
Reilly Grant (use Gerrit) 2017/05/11 18:45:22 Why did this become necessary?
mcasas 2017/05/11 18:51:22 I believe leaving it empty caused a problem when d
mcasas 2017/05/11 19:00:58 Correction: it fails in the serialization:
}
callback.call(faceArray);

Powered by Google App Engine
This is Rietveld 408576698