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

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

Issue 2681913003: RELAND: ShapeDetection: use mojom::Bitmap for mojo interface. (Closed)
Patch Set: Fix the issue of failing to fetch bitmap module Created 3 years, 9 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 859361758609559cc8885e6a8aeca41c67a23d17..ca0b77b86a243d5a63a8f24134d2f02de25e27ee 100644
--- a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
@@ -35,11 +35,8 @@ FaceDetector::FaceDetector(const FaceDetectorOptions& options)
&FaceDetector::onFaceServiceConnectionError, wrapWeakPersistent(this))));
}
-ScriptPromise FaceDetector::doDetect(
- ScriptPromiseResolver* resolver,
- mojo::ScopedSharedBufferHandle sharedBufferHandle,
- int imageWidth,
- int imageHeight) {
+ScriptPromise FaceDetector::doDetect(ScriptPromiseResolver* resolver,
+ skia::mojom::blink::BitmapPtr bitmap) {
ScriptPromise promise = resolver->promise();
if (!m_faceService) {
resolver->reject(DOMException::create(
@@ -47,7 +44,7 @@ ScriptPromise FaceDetector::doDetect(
return promise;
}
m_faceServiceRequests.insert(resolver);
- m_faceService->Detect(std::move(sharedBufferHandle), imageWidth, imageHeight,
+ m_faceService->Detect(std::move(bitmap),
convertToBaseCallback(WTF::bind(
&FaceDetector::onDetectFaces, wrapPersistent(this),
wrapPersistent(resolver))));

Powered by Google App Engine
This is Rietveld 408576698