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

Issue 2395853003: [Sensors] Improvements in shared buffer managing (Closed)

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

Description

[Sensors] Improvements in shared buffer managing This patch adds the following improvements: -Introduces SeqLock synchronization for shared buffer reads and writes. - Single sensor shared buffer is guaranteed to have same fixed size on every platform. This is important as our layout tests use fixed sized shared buffer on JS side. - Introduced common data structures for sensor reading and sensor reading buffer that are used in both blink and platform layers. For the implementation on Android shared buffer operations moved from java to generic C++ code, same code is to be reused for implementations on other platforms. BUG=606766 Committed: https://crrev.com/9e8d58c66a5c826d4b517ecb8988508fc877ef39 Cr-Commit-Position: refs/heads/master@{#424403}

Patch Set 1 #

Total comments: 7

Patch Set 2 : rebased #

Patch Set 3 : Comments from Alex + other improvements #

Patch Set 4 : Introduce device::SensorReading #

Patch Set 5 : Pass task runner to PlatformSensor constructor #

Total comments: 13

Patch Set 6 : Comments from Ken and Reilly. #

Patch Set 7 : Fixed "gn check" #

Total comments: 1

Patch Set 8 : Test compilation fix + comment from Ken #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -234 lines) Patch
M device/generic_sensor/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java View 1 2 6 chunks +26 lines, -56 lines 0 comments Download
M device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java View 1 2 3 12 chunks +29 lines, -69 lines 0 comments Download
M device/generic_sensor/fake_platform_sensor.h View 1 2 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M device/generic_sensor/fake_platform_sensor.cc View 1 2 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M device/generic_sensor/fake_platform_sensor_provider.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M device/generic_sensor/fake_platform_sensor_provider.cc View 1 2 5 1 chunk +1 line, -2 lines 0 comments Download
M device/generic_sensor/platform_sensor.h View 1 2 3 4 5 6 7 3 chunks +12 lines, -3 lines 0 comments Download
M device/generic_sensor/platform_sensor.cc View 1 2 3 5 3 chunks +18 lines, -1 line 0 comments Download
M device/generic_sensor/platform_sensor_android.h View 1 2 5 2 chunks +8 lines, -8 lines 0 comments Download
M device/generic_sensor/platform_sensor_android.cc View 1 2 3 5 3 chunks +19 lines, -15 lines 0 comments Download
M device/generic_sensor/platform_sensor_provider_android.cc View 1 2 5 3 chunks +1 line, -4 lines 0 comments Download
M device/generic_sensor/platform_sensor_provider_base.h View 1 2 3 4 5 2 chunks +0 lines, -3 lines 0 comments Download
M device/generic_sensor/platform_sensor_provider_base.cc View 1 2 3 4 5 4 chunks +8 lines, -8 lines 0 comments Download
M device/generic_sensor/platform_sensor_provider_unittest.cc View 1 2 5 chunks +5 lines, -29 lines 0 comments Download
A + device/generic_sensor/public/cpp/BUILD.gn View 1 2 3 4 5 6 1 chunk +5 lines, -3 lines 0 comments Download
A device/generic_sensor/public/cpp/sensor_reading.h View 1 2 3 4 5 6 7 1 chunk +62 lines, -0 lines 0 comments Download
A device/generic_sensor/public/cpp/sensor_reading.cc View 1 2 3 4 5 1 chunk +23 lines, -0 lines 0 comments Download
M device/generic_sensor/public/interfaces/sensor_provider.mojom View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M device/generic_sensor/sensor_provider_impl.cc View 1 2 3 4 5 3 chunks +2 lines, -9 lines 0 comments Download
M third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js View 1 2 3 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/sensor/AmbientLightSensorReading.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/DEPS View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProxy.h View 1 2 3 4 chunks +9 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProxy.cpp View 1 2 3 4 chunks +24 lines, -5 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 65 (42 generated)
shalamov
https://codereview.chromium.org/2395853003/diff/1/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/2395853003/diff/1/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java#newcode16 device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java:16: import java.nio.ByteBuffer; not needed anymore. https://codereview.chromium.org/2395853003/diff/1/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java#newcode107 device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java:107: private void ...
4 years, 2 months ago (2016-10-06 12:46:09 UTC) #3
shalamov
nit: CL description synchromization => synchronization
4 years, 2 months ago (2016-10-06 13:15:05 UTC) #4
Andrew44e
How to make resetBuffer() function in sensor-helpers.js? Is there a simple way to do that? ...
4 years, 2 months ago (2016-10-07 08:20:38 UTC) #9
Mikhail
Alex, thanks for commenting https://codereview.chromium.org/2395853003/diff/1/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/2395853003/diff/1/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java#newcode16 device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java:16: import java.nio.ByteBuffer; On 2016/10/06 12:46:09, ...
4 years, 2 months ago (2016-10-07 10:07:02 UTC) #13
Mikhail
Please take a look.
4 years, 2 months ago (2016-10-07 21:12:45 UTC) #20
Tom Sepez
mojom lgtm
4 years, 2 months ago (2016-10-07 22:33:28 UTC) #23
haraken
modules/ LGTM on my side
4 years, 2 months ago (2016-10-08 01:15:45 UTC) #24
shalamov
lgtm
4 years, 2 months ago (2016-10-10 11:00:59 UTC) #28
Mikhail
Tim, Ken, Reilly, do you have any comments for device/generic_sensor/ changes? Thanks.
4 years, 2 months ago (2016-10-10 12:56:44 UTC) #32
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2395853003/diff/100001/device/generic_sensor/platform_sensor.cc File device/generic_sensor/platform_sensor.cc (right): https://codereview.chromium.org/2395853003/diff/100001/device/generic_sensor/platform_sensor.cc#newcode97 device/generic_sensor/platform_sensor.cc:97: task_runner_->PostTask( I believe this is incorrect. The PlatformSensor instance ...
4 years, 2 months ago (2016-10-10 16:02:09 UTC) #33
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2395853003/diff/100001/device/generic_sensor/platform_sensor.cc File device/generic_sensor/platform_sensor.cc (right): https://codereview.chromium.org/2395853003/diff/100001/device/generic_sensor/platform_sensor.cc#newcode97 device/generic_sensor/platform_sensor.cc:97: task_runner_->PostTask( On 2016/10/10 at 16:02:08, Ken Rockot wrote: > ...
4 years, 2 months ago (2016-10-10 16:30:41 UTC) #34
Ken Rockot(use gerrit already)
On Mon, Oct 10, 2016 at 9:30 AM, <reillyg@chromium.org> wrote: > > https://codereview.chromium.org/2395853003/diff/100001/ > device/generic_sensor/platform_sensor.cc ...
4 years, 2 months ago (2016-10-10 16:32:09 UTC) #35
Ken Rockot(use gerrit already)
On Mon, Oct 10, 2016 at 9:30 AM, <reillyg@chromium.org> wrote: > > https://codereview.chromium.org/2395853003/diff/100001/ > device/generic_sensor/platform_sensor.cc ...
4 years, 2 months ago (2016-10-10 16:32:10 UTC) #36
Mikhail
Ken, Reilly, thanks for review! https://codereview.chromium.org/2395853003/diff/100001/device/generic_sensor/platform_sensor.cc File device/generic_sensor/platform_sensor.cc (right): https://codereview.chromium.org/2395853003/diff/100001/device/generic_sensor/platform_sensor.cc#newcode97 device/generic_sensor/platform_sensor.cc:97: task_runner_->PostTask( On 2016/10/10 16:30:41, ...
4 years, 2 months ago (2016-10-10 18:29:20 UTC) #39
Ken Rockot(use gerrit already)
Ah thanks for the explanation on task runner usage, makes sense. However, I am still ...
4 years, 2 months ago (2016-10-10 19:12:43 UTC) #46
Mikhail
On 2016/10/10 19:12:43, Ken Rockot wrote: > Ah thanks for the explanation on task runner ...
4 years, 2 months ago (2016-10-10 20:05:15 UTC) #49
Ken Rockot(use gerrit already)
Well, I won't block this CL on that discussion, so LGTM. I think that either: ...
4 years, 2 months ago (2016-10-10 20:16:03 UTC) #50
Ken Rockot(use gerrit already)
On 2016/10/10 at 20:16:03, Ken Rockot wrote: > Well, I won't block this CL on ...
4 years, 2 months ago (2016-10-10 20:16:41 UTC) #51
Reilly Grant (use Gerrit)
lgtm
4 years, 2 months ago (2016-10-10 21:02:36 UTC) #52
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/2395853003/160001
4 years, 2 months ago (2016-10-11 09:13:54 UTC) #57
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/2395853003/160001
4 years, 2 months ago (2016-10-11 10:57:14 UTC) #61
commit-bot: I haz the power
Committed patchset #8 (id:160001)
4 years, 2 months ago (2016-10-11 11:02:29 UTC) #63
commit-bot: I haz the power
4 years, 2 months ago (2016-10-11 11:04:06 UTC) #65
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/9e8d58c66a5c826d4b517ecb8988508fc877ef39
Cr-Commit-Position: refs/heads/master@{#424403}

Powered by Google App Engine
This is Rietveld 408576698