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

Side by Side Diff: content/common/device_motion_hardware_buffer.h

Issue 14678012: Implement the content/renderer and content/browser part of the Device Motion API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_DEVICE_MOTION_HARDWARE_BUFFER_H_
6 #define CONTENT_COMMON_DEVICE_MOTION_HARDWARE_BUFFER_H_
7
8 #include "content/common/gamepad_seqlock.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebDeviceMotionData .h"
10
11 namespace content {
12
13 /*
jamesr 2013/05/16 19:53:05 we pretty much never use /* style comments in chro
timvolodine 2013/05/20 18:18:48 it is actually used in gamepad_hardware_buffer, on
14 This structure is stored in shared memory that's shared between the browser
15 which does the hardware polling, and the consumers of the device motion
16 data, i.e. the renderers. The performance characteristics are that
17 we want low latency (so would like to avoid explicit communication via IPC
18 between producer and consumer) and relatively large data size.
19
20 Writer and reader operate on the same buffer assuming contention is low, and
21 contention is detected by using the associated SeqLock.
22 */
23
24 struct DeviceMotionHardwareBuffer {
25 GamepadSeqLock sequence;
jamesr 2013/05/16 19:53:06 Gamepad? What does this have to do with game pad?
timvolodine 2013/05/20 18:18:48 As a first step the GamepadLock can be used for sh
26 WebKit::WebDeviceMotionData buffer;
27
28 // This boolean flag indicates that the values in the buffer are reliable and
29 // ready for reading. This is needed in cases where no motion information is
30 // available, but the event should be fired anyway (with null values)
31 // according to spec: http://dev.w3.org/geo/api/spec-source-orientation.html.
32 bool is_ready_for_read;
33 };
34
35 } // namespace content
36
37 #endif // CONTENT_COMMON_DEVICE_MOTION_HARDWARE_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698