| 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 c02fda228115f7c4a46718e4594e98761b8b3f09..1faf89f7727c4a8bcbeb293978e3c643e5d2693a 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(bitmap_data) {
|
| - let receivedStruct = new Uint8Array(bitmap_data.pixel_data);
|
| + detect(frame_data, width, height) {
|
| + let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0);
|
| this.buffer_data_ = new Uint32Array(receivedStruct.buffer);
|
| return Promise.resolve({
|
| result: {
|
| @@ -56,6 +56,7 @@ let mockFaceDetectionProviderReady = define(
|
| ]
|
| }
|
| });
|
| + mojo.unmapBuffer(receivedStruct.buffer);
|
| }
|
| }
|
| return new MockFaceDetectionProvider();
|
|
|