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

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

Issue 2875243002: RELAND: ShapeDetection: use mojom::Bitmap for mojo interface. (Closed)
Patch Set: RELAND2: ShapeDetection: use mojom::Bitmap for mojo interface. 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/BarcodeDetectionImpl.java
diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java
index 6f02069ab7c22b25421a4ebf02676f905b1bfe4a..337ab1d4d1f5c5895e5e1039192c896c292e4de6 100644
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java
@@ -19,7 +19,6 @@ import org.chromium.base.Log;
import org.chromium.gfx.mojom.PointF;
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.BarcodeDetection;
import org.chromium.shape_detection.mojom.BarcodeDetectionResult;
@@ -38,8 +37,7 @@ public class BarcodeDetectionImpl implements BarcodeDetection {
}
@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(
ContextUtils.getApplicationContext())
!= ConnectionResult.SUCCESS) {
@@ -57,7 +55,7 @@ public class BarcodeDetectionImpl implements BarcodeDetection {
return;
}
- Frame frame = SharedBufferUtils.convertToFrame(frameData, width, height);
+ Frame frame = BitmapUtils.convertToFrame(bitmapData);
if (frame == null) {
Log.e(TAG, "Error converting SharedMemory to Frame");
callback.call(new BarcodeDetectionResult[0]);
« no previous file with comments | « services/shape_detection/DEPS ('k') | services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698