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

Issue 2465363004: [Sensors] Consider maximum supported frequency (Closed)

Created:
4 years, 1 month ago by Mikhail
Modified:
4 years, 1 month ago
CC:
Aaron Boodman, abarth-chromium, agrieve+watch_chromium.org, blink-reviews, chromium-reviews, darin (slow to review), haraken, mlamouri+watch-sensors_chromium.org, qsr+mojo_chromium.org, riju_, timvolodine, Tom Sepez, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sensors] Consider maximum supported frequency This patch improves capping of the given sensor frequency hint, now it considers the actual sensor capabilities obtained from the platform (if available). So now the behavior has changed in the following way: frequency = min(given frequency, 60 Hz) -> frequency = min(given frequency, min(maximum supported frequency, 60 Hz)) BUG=606766 Committed: https://crrev.com/9d5b8269d088402d1d9c261d1c12585d81a4ac78 Cr-Commit-Position: refs/heads/master@{#431520}

Patch Set 1 #

Total comments: 5

Patch Set 2 : [Sensors] Consider maximum supported frequency #

Total comments: 6

Patch Set 3 : Added support on Win #

Total comments: 1

Patch Set 4 : Comments from Alex #

Total comments: 17

Patch Set 5 : Review comments #

Patch Set 6 : Rebased #

Patch Set 7 : Comment from Tim #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -22 lines) Patch
M device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java View 1 2 chunks +12 lines, -0 lines 0 comments Download
M device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java View 1 1 chunk +16 lines, -0 lines 0 comments Download
M device/generic_sensor/platform_sensor.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M device/generic_sensor/platform_sensor.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M device/generic_sensor/platform_sensor_and_provider_unittest_win.cc View 1 2 3 4 1 chunk +18 lines, -0 lines 0 comments Download
M device/generic_sensor/platform_sensor_android.h View 1 chunk +1 line, -0 lines 0 comments Download
M device/generic_sensor/platform_sensor_android.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M device/generic_sensor/platform_sensor_win.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M device/generic_sensor/platform_sensor_win.cc View 1 2 3 4 2 chunks +10 lines, -2 lines 0 comments Download
M device/generic_sensor/public/interfaces/sensor_provider.mojom View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M device/generic_sensor/sensor_provider_impl.cc View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html View 1 2 3 4 5 6 1 chunk +28 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js View 1 2 3 4 5 6 5 chunks +9 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/AmbientLightSensor.h View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp View 1 2 3 4 5 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/Sensor.h View 1 2 3 4 5 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/Sensor.cpp View 1 2 3 4 5 2 chunks +20 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProxy.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProxy.cpp View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 48 (24 generated)
shalamov
https://codereview.chromium.org/2465363004/diff/20001/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp File third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp (right): https://codereview.chromium.org/2465363004/diff/20001/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp#newcode49 third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp:49: if (maxSupportedFrequency && frequency > maxSupportedFrequency) Can this be ...
4 years, 1 month ago (2016-11-02 14:42:46 UTC) #4
darktears
On 2016/11/02 at 14:42:46, alexander.shalamov wrote: > https://codereview.chromium.org/2465363004/diff/20001/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp > File third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp (right): > > https://codereview.chromium.org/2465363004/diff/20001/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp#newcode49 ...
4 years, 1 month ago (2016-11-02 22:55:22 UTC) #5
darktears
https://codereview.chromium.org/2465363004/diff/20001/device/generic_sensor/platform_sensor.h File device/generic_sensor/platform_sensor.h (right): https://codereview.chromium.org/2465363004/diff/20001/device/generic_sensor/platform_sensor.h#newcode46 device/generic_sensor/platform_sensor.h:46: // If this information is unavailable '0.0' is returned. ...
4 years, 1 month ago (2016-11-02 23:06:09 UTC) #7
Mikhail
On 2016/11/02 14:42:46, shalamov wrote: > https://codereview.chromium.org/2465363004/diff/20001/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp > File third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp (right): > > https://codereview.chromium.org/2465363004/diff/20001/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp#newcode49 > ...
4 years, 1 month ago (2016-11-03 12:09:55 UTC) #8
Mikhail
https://codereview.chromium.org/2465363004/diff/20001/device/generic_sensor/platform_sensor.h File device/generic_sensor/platform_sensor.h (right): https://codereview.chromium.org/2465363004/diff/20001/device/generic_sensor/platform_sensor.h#newcode46 device/generic_sensor/platform_sensor.h:46: // If this information is unavailable '0.0' is returned. ...
4 years, 1 month ago (2016-11-03 12:13:17 UTC) #9
shalamov
Could you also add implementation for win platform adaptation? https://codereview.chromium.org/2465363004/diff/40001/device/generic_sensor/public/interfaces/sensor_provider.mojom File device/generic_sensor/public/interfaces/sensor_provider.mojom (right): https://codereview.chromium.org/2465363004/diff/40001/device/generic_sensor/public/interfaces/sensor_provider.mojom#newcode22 device/generic_sensor/public/interfaces/sensor_provider.mojom:22: ...
4 years, 1 month ago (2016-11-03 12:54:05 UTC) #10
Mikhail
thanks for your comments! https://codereview.chromium.org/2465363004/diff/40001/device/generic_sensor/public/interfaces/sensor_provider.mojom File device/generic_sensor/public/interfaces/sensor_provider.mojom (right): https://codereview.chromium.org/2465363004/diff/40001/device/generic_sensor/public/interfaces/sensor_provider.mojom#newcode22 device/generic_sensor/public/interfaces/sensor_provider.mojom:22: // Maximum sampling frequency for ...
4 years, 1 month ago (2016-11-03 13:28:17 UTC) #11
shalamov
lgtm with nits https://codereview.chromium.org/2465363004/diff/60001/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc File device/generic_sensor/platform_sensor_and_provider_unittest_win.cc (right): https://codereview.chromium.org/2465363004/diff/60001/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc#newcode498 device/generic_sensor/platform_sensor_and_provider_unittest_win.cc:498: // Tests that GetMaximumSupportedFrequency is returns ...
4 years, 1 month ago (2016-11-03 13:32:55 UTC) #12
Mikhail
CC'ing Tom for .mojom changes
4 years, 1 month ago (2016-11-03 13:42:26 UTC) #13
haraken
modules/ implementation LGTM https://codereview.chromium.org/2465363004/diff/80001/third_party/WebKit/Source/modules/sensor/Sensor.cpp File third_party/WebKit/Source/modules/sensor/Sensor.cpp (right): https://codereview.chromium.org/2465363004/diff/80001/third_party/WebKit/Source/modules/sensor/Sensor.cpp#newcode155 third_party/WebKit/Source/modules/sensor/Sensor.cpp:155: frequency = maximumFrequency; Duplicated code.
4 years, 1 month ago (2016-11-03 13:58:45 UTC) #16
timvolodine
just a few more comments below https://codereview.chromium.org/2465363004/diff/80001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java File device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java (right): https://codereview.chromium.org/2465363004/diff/80001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java#newcode25 device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java:25: private static final ...
4 years, 1 month ago (2016-11-03 17:32:56 UTC) #19
Mikhail
Thanks for your comments. https://codereview.chromium.org/2465363004/diff/80001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java File device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java (right): https://codereview.chromium.org/2465363004/diff/80001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java#newcode25 device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java:25: private static final double SECONDS_IN_MICROSECOND ...
4 years, 1 month ago (2016-11-04 21:17:45 UTC) #22
Mikhail
Tim, do you have more comments for this CL?
4 years, 1 month ago (2016-11-08 08:01:21 UTC) #25
Mikhail
CC'ing Reilly to have a look
4 years, 1 month ago (2016-11-09 08:59:07 UTC) #29
Reilly Grant (use Gerrit)
lgtm
4 years, 1 month ago (2016-11-09 16:57:30 UTC) #32
timvolodine
fine with me, one nit comment, otherwise lgtm thanks! https://codereview.chromium.org/2465363004/diff/80001/device/generic_sensor/sensor_provider_impl.cc File device/generic_sensor/sensor_provider_impl.cc (right): https://codereview.chromium.org/2465363004/diff/80001/device/generic_sensor/sensor_provider_impl.cc#newcode93 device/generic_sensor/sensor_provider_impl.cc:93: ...
4 years, 1 month ago (2016-11-09 20:31:52 UTC) #33
Mikhail
On 2016/11/09 20:31:52, timvolodine wrote: > fine with me, one nit comment, otherwise lgtm thanks! ...
4 years, 1 month ago (2016-11-10 12:06:13 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2465363004/140001
4 years, 1 month ago (2016-11-10 12:08:20 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/301301)
4 years, 1 month ago (2016-11-10 12:15:52 UTC) #39
Mikhail
On 2016/11/03 13:42:26, Mikhail wrote: > CC'ing Tom for .mojom changes Could you take a ...
4 years, 1 month ago (2016-11-10 12:20:34 UTC) #41
Tom Sepez
mojom LGTM
4 years, 1 month ago (2016-11-10 16:52:53 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2465363004/140001
4 years, 1 month ago (2016-11-11 07:34:07 UTC) #44
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 1 month ago (2016-11-11 08:00:31 UTC) #46
commit-bot: I haz the power
4 years, 1 month ago (2016-11-11 08:04:13 UTC) #48
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/9d5b8269d088402d1d9c261d1c12585d81a4ac78
Cr-Commit-Position: refs/heads/master@{#431520}

Powered by Google App Engine
This is Rietveld 408576698