Provide a mechanism in generic_sensor to mark which sensor data field is unavailable |
|||
Issue descriptionThis is from the discussion in "Refactor DeviceOrientationEventPump to use generic sensor as its backend" CL: https://chromium-review.googlesource.com/c/chromium/src/+/656139/9 The deviceorientationevent spec https://w3c.github.io/deviceorientation/spec-source-orientation.html#deviceorientation says: "Implementations that are unable to provide all three angles must set the values of the unknown angles to null." And for the RelativeOrientationEulerAnglesFusionAlgorithmUsingAccelerometer: https://cs.chromium.org/chromium/src/services/device/generic_sensor/relative_orientation_euler_angles_fusion_algorithm_using_accelerometer.cc?l=40-43 |alpha| can not be provided and it is set as 0.0. On platforms that uses this fusion algorithm, the |alpha| should be set to null, but it is set to 0.0. So on the browser side, the generic_sensor backend needs a mechanism to inform the renderer side which sensor data field it can not provide. One possible solution is to set the unavailable sensor data field Not-A-Number, and the renderer side just needs to check if the data is Not-A-Number.
,
Sep 25 2017
,
Oct 3 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/05201d651839d0ed5498bbb3e4b17a3d52a69950 commit 05201d651839d0ed5498bbb3e4b17a3d52a69950 Author: Jun Cai <juncai@chromium.org> Date: Tue Oct 03 01:48:48 2017 Set unavailable sensor data field Not-A-Number Currently the generic_sensor code doesn't provide a mechanism to mark which sensor data field is unavailable. This CL uses Not-A-Number to mark that. Bug: 768473 Change-Id: I7debdfde015cd5bec83c01f4a01b781a419e74e7 Reviewed-on: https://chromium-review.googlesource.com/682557 Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Jun Cai <juncai@chromium.org> Cr-Commit-Position: refs/heads/master@{#505918} [modify] https://crrev.com/05201d651839d0ed5498bbb3e4b17a3d52a69950/services/device/generic_sensor/relative_orientation_euler_angles_fusion_algorithm_using_accelerometer.cc [modify] https://crrev.com/05201d651839d0ed5498bbb3e4b17a3d52a69950/services/device/generic_sensor/relative_orientation_euler_angles_fusion_algorithm_using_accelerometer_unittest.cc
,
Oct 3 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by juncai@chromium.org
, Sep 25 2017