Index: services/shape_detection/barcode_detection_impl_mac.mm |
diff --git a/services/shape_detection/barcode_detection_impl_mac.mm b/services/shape_detection/barcode_detection_impl_mac.mm |
index 2abbc03406a34ddea960f2c5d539b9c984e3863a..ec0ac0bb6219482cdf7e8124cc9dfa566a7470cd 100644 |
--- a/services/shape_detection/barcode_detection_impl_mac.mm |
+++ b/services/shape_detection/barcode_detection_impl_mac.mm |
@@ -50,20 +50,22 @@ |
BarcodeDetectionImplMac::~BarcodeDetectionImplMac() {} |
-void BarcodeDetectionImplMac::Detect(const SkBitmap& bitmap, |
+void BarcodeDetectionImplMac::Detect(mojo::ScopedSharedBufferHandle frame_data, |
+ uint32_t width, |
+ uint32_t height, |
const DetectCallback& callback) { |
media::ScopedResultCallback<DetectCallback> scoped_callback( |
base::Bind(&RunCallbackWithBarcodes, callback), |
base::Bind(&RunCallbackWithNoBarcodes)); |
- base::scoped_nsobject<CIImage> ci_image = CreateCIImageFromSkBitmap(bitmap); |
+ base::scoped_nsobject<CIImage> ci_image = |
+ CreateCIImageFromSharedMemory(std::move(frame_data), width, height); |
if (!ci_image) |
return; |
NSArray* const features = [detector_ featuresInImage:ci_image]; |
std::vector<mojom::BarcodeDetectionResultPtr> results; |
- const int height = bitmap.height(); |
for (CIQRCodeFeature* const f in features) { |
shape_detection::mojom::BarcodeDetectionResultPtr result = |
shape_detection::mojom::BarcodeDetectionResult::New(); |