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

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

Issue 2755393002: Revert of RELAND: ShapeDetection: use mojom::Bitmap for mojo interface. (Closed)
Patch Set: Created 3 years, 9 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-textdetection.js
diff --git a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js
index a622605059285368be8612c276033e52a1f44142..08195c993242b69e0061be7e34b6f1644f426c9d 100644
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js
@@ -17,8 +17,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: [
@@ -32,6 +32,7 @@
},
],
});
+ mojo.unmapBuffer(receivedStruct.buffer);
}
getFrameData() {

Powered by Google App Engine
This is Rietveld 408576698