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

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

Issue 2564123003: Face Detection: Use DetectedFace in FaceDetector.cpp iso DOMRect (Closed)
Patch Set: Created 4 years 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 fd0952b230ad67b9c46ea1dbb3e446b3c56507f9..fc557c67afd7952793bf111ce06566d5af955843 100644
--- a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
@@ -9,6 +9,7 @@
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/LocalFrame.h"
#include "core/html/canvas/CanvasImageSource.h"
+#include "modules/shapedetection/DetectedFace.h"
#include "public/platform/InterfaceProvider.h"
namespace blink {
@@ -55,11 +56,11 @@ void FaceDetector::onDetectFaces(
DCHECK(m_faceServiceRequests.contains(resolver));
m_faceServiceRequests.remove(resolver);
- HeapVector<Member<DOMRect>> detectedFaces;
+ HeapVector<Member<DetectedFace>> detectedFaces;
for (const auto& boundingBox : faceDetectionResult->bounding_boxes) {
- detectedFaces.append(DOMRect::create(boundingBox->x, boundingBox->y,
- boundingBox->width,
- boundingBox->height));
+ detectedFaces.append(DetectedFace::create(
+ DOMRect::create(boundingBox->x, boundingBox->y, boundingBox->width,
+ boundingBox->height)));
}
resolver->resolve(detectedFaces);

Powered by Google App Engine
This is Rietveld 408576698