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 0e873d7f14f43ee8e7aa3a383f7e68cde4088143..f596e6fd37e06280980546945a416ed124354101 100644 |
--- a/services/shape_detection/barcode_detection_impl_mac.mm |
+++ b/services/shape_detection/barcode_detection_impl_mac.mm |
@@ -50,22 +50,20 @@ BarcodeDetectionImplMac::BarcodeDetectionImplMac() { |
BarcodeDetectionImplMac::~BarcodeDetectionImplMac() {} |
-void BarcodeDetectionImplMac::Detect(mojo::ScopedSharedBufferHandle frame_data, |
- uint32_t width, |
- uint32_t height, |
+void BarcodeDetectionImplMac::Detect(const SkBitmap& bitmap_data, |
mcasas
2017/02/07 19:04:44
s/bitmap_data/bitmap/
|
const DetectCallback& callback) { |
media::ScopedResultCallback<DetectCallback> scoped_callback( |
base::Bind(&RunCallbackWithBarcodes, callback), |
base::Bind(&RunCallbackWithNoBarcodes)); |
- base::scoped_nsobject<CIImage> ci_image = |
- CreateCIImageFromSharedMemory(std::move(frame_data), width, height); |
+ base::scoped_nsobject<CIImage> ci_image = CreateCIImageFromData(bitmap_data); |
if (!ci_image) |
return; |
NSArray* const features = [detector_ featuresInImage:ci_image]; |
std::vector<mojom::BarcodeDetectionResultPtr> results; |
+ int height = bitmap_data.height(); |
mcasas
2017/02/07 19:04:44
Const.
|
for (CIQRCodeFeature* const f in features) { |
shape_detection::mojom::BarcodeDetectionResultPtr result = |
shape_detection::mojom::BarcodeDetectionResult::New(); |