Index: third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js |
diff --git a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js |
index 129c660ee89a424d41cf2773d26f66c9ba6712b8..1f6a479d8c22017486e0e4dbb35c089b4cb6e393 100644 |
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js |
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js |
@@ -18,8 +18,8 @@ |
handle => this.bindingSet_.addBinding(this, handle)); |
} |
- 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({ |
results: [ |
@@ -45,6 +45,7 @@ |
}, |
], |
}); |
+ mojo.unmapBuffer(receivedStruct.buffer); |
} |
getFrameData() { |