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

Issue 2589283003: [Sensors] Reland: Align sensor reading updates and 'onchange' notification with rAF. (Closed)

Created:
4 years ago by Mikhail
Modified:
4 years ago
CC:
chromium-reviews, blink-reviews, wanming.lin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sensors] Reland: Align sensor reading updates and 'onchange' notification with rAF. For all sensors new reading values are read and 'onchange' notfication is send from rAF callbacks, thus avoiding possible Critical Rendering Path interruption. Before this change a timers were used and this could unnecessarily drain CPU and battery. BUG=668052 BUG=606766 Committed: https://crrev.com/6b071fe7dc3bd64a2914eadd5c67b483d064a6cb Cr-Commit-Position: refs/heads/master@{#439467} patch from issue 2551223003 at patchset 140001 (http://crrev.com/2551223003#ps140001) Committed: https://crrev.com/5f2cde61f6ff4a764b9b1c7d74a24ef6de815835 Cr-Commit-Position: refs/heads/master@{#440208}

Patch Set 1 : Initial patch #

Patch Set 2 : Robust tests #

Total comments: 2

Patch Set 3 : Comments from Alex. Initialize m_lastUpdateTimestamp from Sensor::updateState. #

Patch Set 4 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -256 lines) Patch
M third_party/WebKit/LayoutTests/sensor/accelerometer.html View 1 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html View 1 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/sensor/gyroscope.html View 1 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/sensor/magnetometer.html View 1 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js View 1 2 3 4 chunks +11 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/BUILD.gn View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/Sensor.h View 4 chunks +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/Sensor.cpp View 1 2 10 chunks +24 lines, -45 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProviderProxy.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProxy.h View 7 chunks +24 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProxy.cpp View 15 chunks +32 lines, -54 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.h View 1 chunk +39 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp View 1 chunk +112 lines, -0 lines 0 comments Download
D third_party/WebKit/Source/modules/sensor/SensorUpdateNotificationStrategy.h View 1 chunk +0 lines, -29 lines 0 comments Download
D third_party/WebKit/Source/modules/sensor/SensorUpdateNotificationStrategy.cpp View 1 chunk +0 lines, -85 lines 0 comments Download

Messages

Total messages: 30 (18 generated)
Mikhail
PTAL
4 years ago (2016-12-21 10:28:35 UTC) #5
shalamov
https://codereview.chromium.org/2589283003/diff/20001/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js File third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js (right): https://codereview.chromium.org/2589283003/diff/20001/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js#newcode203 third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js:203: this.sensor_reading_timer_id_ = window.setInterval(() => { Should we clear previous ...
4 years ago (2016-12-21 10:41:03 UTC) #6
haraken
The previous patch was reverted because it broke Linux Leak bot, right? Did you confirm ...
4 years ago (2016-12-21 11:44:45 UTC) #7
Mikhail
https://codereview.chromium.org/2589283003/diff/20001/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js File third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js (right): https://codereview.chromium.org/2589283003/diff/20001/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js#newcode203 third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js:203: this.sensor_reading_timer_id_ = window.setInterval(() => { On 2016/12/21 10:41:03, shalamov ...
4 years ago (2016-12-21 13:06:28 UTC) #12
Mikhail
On 2016/12/21 11:44:45, haraken wrote: > The previous patch was reverted because it broke Linux ...
4 years ago (2016-12-21 13:11:42 UTC) #15
haraken
LGTM
4 years ago (2016-12-21 13:14:38 UTC) #18
shalamov
lgtm
4 years ago (2016-12-21 13:19:25 UTC) #19
Reilly Grant (use Gerrit)
lgtm
4 years ago (2016-12-21 19:48:39 UTC) #22
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/2589283003/60001
4 years ago (2016-12-21 20:47:44 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-21 20:59:04 UTC) #27
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/5f2cde61f6ff4a764b9b1c7d74a24ef6de815835 Cr-Commit-Position: refs/heads/master@{#440208}
4 years ago (2016-12-21 21:02:41 UTC) #29
hcarmona
4 years ago (2016-12-21 23:07:52 UTC) #30
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:60001) has been created in
https://codereview.chromium.org/2596063003/ by hcarmona@chromium.org.

The reason for reverting is: This looks like a likely cause of these failures:
https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Linu....

Powered by Google App Engine
This is Rietveld 408576698