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

Unified Diff: third_party/WebKit/Source/modules/shapedetection/ShapeDetector.h

Issue 2550413005: ShapeDetection: use ImageBitmapSource as input and support ImageData (Closed)
Patch Set: xianglu@ comments and added forgotten LayoutTest detection-ImageData.html 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/ShapeDetector.h
diff --git a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.h b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.h
index 3a1cc10ac55694c20d8b7e635ba074281be35cee..9f0d7b127bc7c15a8f125555814b1cb4d468d7d0 100644
--- a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.h
+++ b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.h
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
+#include "core/imagebitmap/ImageBitmapFactories.h"
#include "modules/ModulesExport.h"
#include "modules/canvas2d/CanvasRenderingContext2D.h"
@@ -22,10 +23,11 @@ class MODULES_EXPORT ShapeDetector
explicit ShapeDetector(LocalFrame&);
virtual ~ShapeDetector() = default;
- ScriptPromise detect(ScriptState*, const CanvasImageSourceUnion&);
+ ScriptPromise detect(ScriptState*, const ImageBitmapSourceUnion&);
DEFINE_INLINE_VIRTUAL_TRACE() {}
private:
+ ScriptPromise detectShapesOnImageData(ScriptPromiseResolver*, ImageData*);
ScriptPromise detectShapesOnImageElement(ScriptPromiseResolver*,
const HTMLImageElement*);

Powered by Google App Engine
This is Rietveld 408576698