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

Unified Diff: services/shape_detection/face_detection_impl_mac.mm

Issue 2677553003: Shape detection unittests mac (QR and Face) in GPU bots (Closed)
Patch Set: rsesek@ comments Created 3 years, 10 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/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..151e0a7ce8666a6d51627393af66d0329c01b90b 100644
--- a/services/shape_detection/face_detection_impl_mac.mm
+++ b/services/shape_detection/face_detection_impl_mac.mm
@@ -4,8 +4,6 @@
#include "services/shape_detection/face_detection_impl_mac.h"
-#import <QuartzCore/QuartzCore.h>
-
#include "base/mac/scoped_cftyperef.h"
#include "media/capture/video/scoped_result_callback.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
@@ -39,10 +37,12 @@ void FaceDetectionProviderImpl::CreateFaceDetection(
FaceDetectionImplMac::FaceDetectionImplMac(
shape_detection::mojom::FaceDetectorOptionsPtr options) {
- NSDictionary* const opts = @{CIDetectorAccuracy : CIDetectorAccuracyHigh};
+ NSString* const accuracy =
+ options->fast_mode ? CIDetectorAccuracyHigh : CIDetectorAccuracyLow;
+ NSDictionary* const detector_options = @{CIDetectorAccuracy : accuracy};
detector_.reset([[CIDetector detectorOfType:CIDetectorTypeFace
context:nil
- options:opts] retain]);
+ options:detector_options] retain]);
}
FaceDetectionImplMac::~FaceDetectionImplMac() {}

Powered by Google App Engine
This is Rietveld 408576698