Skip to content

Commit

Permalink
Use double type to idl files in third_party/blink/renderer/modules/im…
Browse files Browse the repository at this point in the history
…agecapture

This CL updates IDL files to follow spec APIs and changes float type
to double type of c++/java implementation using Point2D struct.

Bug: 938800
Change-Id: I50064e6530457c9499a21613544579cd0f31cd1e
  • Loading branch information
MyidShin authored and chromium-wpt-export-bot committed Apr 8, 2019
1 parent 3a4ed45 commit 9ba66c0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions resources/chromium/image_capture.mojom.js
Expand Up @@ -434,7 +434,7 @@
return err;

var kVersionSizes = [
{version: 0, numBytes: 16}
{version: 0, numBytes: 24}
];
err = messageValidator.validateStructVersion(offset, kVersionSizes);
if (err !== validator.validationError.NONE)
Expand All @@ -445,24 +445,24 @@
return validator.validationError.NONE;
};

Point2D.encodedSize = codec.kStructHeaderSize + 8;
Point2D.encodedSize = codec.kStructHeaderSize + 16;

Point2D.decode = function(decoder) {
var packed;
var val = new Point2D();
var numberOfBytes = decoder.readUint32();
var version = decoder.readUint32();
val.x = decoder.decodeStruct(codec.Float);
val.y = decoder.decodeStruct(codec.Float);
val.x = decoder.decodeStruct(codec.Double);
val.y = decoder.decodeStruct(codec.Double);
return val;
};

Point2D.encode = function(encoder, val) {
var packed;
encoder.writeUint32(Point2D.encodedSize);
encoder.writeUint32(0);
encoder.encodeStruct(codec.Float, val.x);
encoder.encodeStruct(codec.Float, val.y);
encoder.encodeStruct(codec.Double, val.x);
encoder.encodeStruct(codec.Double, val.y);
};
function PhotoSettings(values) {
this.initDefaults_();
Expand Down

0 comments on commit 9ba66c0

Please sign in to comment.