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

Unified Diff: services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.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/TextDetectionImpl.java
diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java
index 3636c1baf495f9808ba640515677a4a93b210e2f..d693f73b8938a1bd44e0711808efebee4d46f0b1 100644
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java
@@ -17,7 +17,6 @@ import com.google.android.gms.vision.text.TextRecognizer;
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.services.service_manager.InterfaceFactory;
import org.chromium.shape_detection.mojom.TextDetection;
import org.chromium.shape_detection.mojom.TextDetectionResult;
@@ -38,8 +37,7 @@ public class TextDetectionImpl implements TextDetection {
}
@Override
- public void detect(
- SharedBufferHandle frameData, int width, int height, DetectResponse callback) {
+ public void detect(org.chromium.skia.mojom.Bitmap bitmapData, DetectResponse callback) {
if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext)
!= ConnectionResult.SUCCESS) {
Log.e(TAG, "Google Play Services not available");
@@ -56,7 +54,7 @@ public class TextDetectionImpl implements TextDetection {
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 TextDetectionResult[0]);

Powered by Google App Engine
This is Rietveld 408576698