[Android] Avoid creating new objects on each Device Orientation update.
commit4fd5f57cc0f6c0bf21cbba1550b2317735635a44
authortimvolodine <timvolodine@chromium.org>
Tue, 31 Mar 2015 10:45:32 +0000 (31 03:45 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 31 Mar 2015 10:46:19 +0000 (31 10:46 +0000)
treee05cfa2e6667d449efb4ba58449672b1ca1b23c9
parent3f8a241fe8b695f765f6c56ef57e4691f389c4c6
[Android] Avoid creating new objects on each Device Orientation update.

Device Orientation updates are happening very frequently (typically 60Hz),
hence it is important to not create any new objects for each update and
instead use preallocated memory. This decreases pressure on the gc and
improves efficiency.

BUG=
TEST=http://jsbin.com/device-inertial-sensor-diagnostics

Review URL: https://codereview.chromium.org/894633003

Cr-Commit-Position: refs/heads/master@{#323006}
content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java