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

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

Issue 2875243002: RELAND: ShapeDetection: use mojom::Bitmap for mojo interface. (Closed)
Patch Set: Rebasing as all Java files were moved to //services 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/FaceDetectionImplGmsCore.java
diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java
index e0c8394777a985ecf56c6aa41cf96285a93df1e6..8aacf66ecf07be7fe6181fcf6205727a27f55111 100644
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java
@@ -16,7 +16,6 @@ import com.google.android.gms.vision.face.Landmark;
import org.chromium.base.Log;
import org.chromium.gfx.mojom.RectF;
import org.chromium.mojo.system.MojoException;
-import org.chromium.mojo.system.SharedBufferHandle;
import org.chromium.shape_detection.mojom.FaceDetection;
import org.chromium.shape_detection.mojom.FaceDetectionResult;
import org.chromium.shape_detection.mojom.FaceDetectorOptions;
@@ -56,8 +55,7 @@ public class FaceDetectionImplGmsCore implements FaceDetection {
}
@Override
- public void detect(
- SharedBufferHandle frameData, int width, int height, DetectResponse callback) {
+ public void detect(org.chromium.skia.mojom.Bitmap bitmapData, DetectResponse callback) {
// The vision library will be downloaded the first time the API is used
// on the device; this happens "fast", but it might have not completed,
// bail in this case.
@@ -69,11 +67,11 @@ public class FaceDetectionImplGmsCore implements FaceDetection {
options.fastMode = mFastMode;
options.maxDetectedFaces = mMaxFaces;
FaceDetectionImpl detector = new FaceDetectionImpl(options);
- detector.detect(frameData, width, height, callback);
+ detector.detect(bitmapData, callback);
return;
}
- Frame frame = SharedBufferUtils.convertToFrame(frameData, width, height);
+ Frame frame = SharedBufferUtils.convertToFrame(bitmapData);
if (frame == null) {
Log.e(TAG, "Error converting SharedMemory to Frame");
callback.call(new FaceDetectionResult[0]);

Powered by Google App Engine
This is Rietveld 408576698