Closed
Bug 1291434
Opened 8 years ago
Closed 6 years ago
[webvr] Replace nsRefPtrHashtable with std::vector for VRManager::mVRDisplays
Categories
(Core :: WebVR, defect)
Core
WebVR
Tracking
()
RESOLVED
FIXED
People
(Reporter: kip, Unassigned)
Details
(Whiteboard: [gfx-noted][webvr])
std::vector is more appropriate than nsRefPtrHashtable for VRManager::mVRDisplays.
This is a remnant from prior refactoring. Rationale for using the hashmap was that due to hardware hot-swapping, there will not always be a 1:1 relationship between the vector index and the displayid used for the entry. The benefits of the hashmap are limited; however, as there is expected to be < 10 entries in the most extreme case. Iterating over the small std::vector is probably faster than the hashmap.
In the pre-WebVR 1.0 API, this map was also going to hold individual sensors and controllers which could greatly increase the length of the array. This is no longer the case as these have been moved out to Gamepad API.
Updated•8 years ago
|
Whiteboard: [gfx-noted]
Updated•8 years ago
|
Whiteboard: [gfx-noted] → [gfx-noted][webvr]
Reporter | ||
Updated•8 years ago
|
Component: Graphics → WebVR
Reporter | ||
Comment 1•6 years ago
|
||
VRManager::mVRDisplays no longer exists. Closing.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•