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

Unified Diff: third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp

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: third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
diff --git a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
index e9390f47e68287e72c0c0cc00b3dd1a426b4ae47..2f5c485fd8376c02e511c1a4f0bd8571d29e7ed1 100644
--- a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
@@ -37,11 +37,8 @@ FaceDetector::FaceDetector(const FaceDetectorOptions& options)
&FaceDetector::OnFaceServiceConnectionError, WrapWeakPersistent(this))));
}
-ScriptPromise FaceDetector::DoDetect(
- ScriptPromiseResolver* resolver,
- mojo::ScopedSharedBufferHandle shared_buffer_handle,
- int image_width,
- int image_height) {
+ScriptPromise FaceDetector::DoDetect(ScriptPromiseResolver* resolver,
+ skia::mojom::blink::BitmapPtr bitmap) {
ScriptPromise promise = resolver->Promise();
if (!face_service_) {
resolver->Reject(DOMException::Create(
@@ -49,8 +46,7 @@ ScriptPromise FaceDetector::DoDetect(
return promise;
}
face_service_requests_.insert(resolver);
- face_service_->Detect(std::move(shared_buffer_handle), image_width,
- image_height,
+ face_service_->Detect(std::move(bitmap),
ConvertToBaseCallback(WTF::Bind(
&FaceDetector::OnDetectFaces, WrapPersistent(this),
WrapPersistent(resolver))));

Powered by Google App Engine
This is Rietveld 408576698