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

Unified Diff: third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js

Issue 2629433003: ShapeDetection: use mojom::Bitmap for mojo interface. (Closed)
Patch Set: ShapeDetection: use mojom::Bitmap for mojo interface. Created 3 years, 11 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/LayoutTests/shapedetection/resources/mock-facedetection.js
diff --git a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js
index 8e48375370a12826de3f1166dd09208675d3080d..7c0305d33584a670128c571731acc2f6b85198b4 100644
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js
@@ -44,8 +44,8 @@ let mockFaceDetectionProviderReady = define(
request);
}
- detect(frame_data, width, height) {
- let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0);
+ detect(bitmap_data) {
+ let receivedStruct = new Uint8Array(bitmap_data.pixel_data);
this.buffer_data_ = new Uint32Array(receivedStruct.buffer);
return Promise.resolve({
result: {
@@ -56,7 +56,6 @@ let mockFaceDetectionProviderReady = define(
]
}
});
- mojo.unmapBuffer(receivedStruct.buffer);
}
}
return new MockFaceDetectionProvider();

Powered by Google App Engine
This is Rietveld 408576698