Index: services/shape_detection/face_detection_impl_mac.mm |
diff --git a/services/shape_detection/face_detection_impl_mac.mm b/services/shape_detection/face_detection_impl_mac.mm |
index b8539f0d2c3475c99496eaedcae991a27e05e4a3..41b9e619b8f6a1a3ec1fe3b7627a1e3e8dce150d 100644 |
--- a/services/shape_detection/face_detection_impl_mac.mm |
+++ b/services/shape_detection/face_detection_impl_mac.mm |
@@ -47,21 +47,19 @@ FaceDetectionImplMac::FaceDetectionImplMac( |
FaceDetectionImplMac::~FaceDetectionImplMac() {} |
-void FaceDetectionImplMac::Detect(mojo::ScopedSharedBufferHandle frame_data, |
- uint32_t width, |
- uint32_t height, |
+void FaceDetectionImplMac::Detect(const SkBitmap& bitmap_data, |
const DetectCallback& callback) { |
media::ScopedResultCallback<DetectCallback> scoped_callback( |
base::Bind(&RunCallbackWithFaces, callback), |
base::Bind(&RunCallbackWithNoFaces)); |
- 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]; |
+ int height = bitmap_data.height(); |
mcasas
2017/02/07 19:04:44
Const.
|
shape_detection::mojom::FaceDetectionResultPtr faces = |
shape_detection::mojom::FaceDetectionResult::New(); |
for (CIFaceFeature* const f in features) { |