History log of /frameworks/native/libs/vr/libdvr/dvr_surface.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7190e8af99a51fe2250e5ea988c962448e5b09f1 23-Jun-2017 Corey Tabaka <eieio@google.com> Fix VR surface attributes.

VR surface attributes had two issues that prevented the full extent
of their use:
1. The older clang version missed that templated copy constructor
and assignment operators do not override the default ones in
the Variant class. This caused issues with certain types when
copy constructing / assigning from another Variant of the same
type. This was noticed by running tests with a newer version of
clang which provided warnings.
2. C++ rules about implicit conversion to bool from types that
decay to pointers causes subtle issues with Variants that have
bool elements.

For example this assignment compiles but produces the wrong
result:

const int array[3] = { 1, 2, 3};
Variant<int, bool, std::array<int, 3>> variant = array;
EXPECT_FALSE(variant.is<bool>()); // Actually true.

Here the programmer might accidentally think that the std::array
element of the variant can be assigned from the regular array.
This doesn't work, but instead the compiler decays the array to
a pointer and assigns the bool element to true.

The first issue is addressed by defining copy/move constructors /
assignment operators on Variant and deleting the default ones from
the internal Union type for extra safety.

The second issue is addressed by making a more restrictive version
of the std::is_constructible trait that rejects bool construction
from types that decay to pointers. Once this was put in place the
erroneous use cases no longer compiled and is fixed as part of
this CL.

Tests are updated to verify the fixes to these issues.

Bug: 62557221
Test: pdx_tests and dvr_api-test passes.
Change-Id: Id4647e54e0a7b1753217fe7fe351462fe5bcfd83
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
49a706d548ac78d5bea896e922286cad4df026dc 08-Jun-2017 Corey Tabaka <eieio@google.com> DVR API: Implement support for deleting surface attributes.

- Implement support for deleting surface attributes using the "NONE"
attribute type.
- Add tests for attribute events and attribute deletion.

Bug: 62456002
Test: dvr_api-test passes.
Change-Id: I66b6edbd35077596d89e85829bcbe7c52829ef5b
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
c6033316b07615db91360559926459946efbd0f1 09-Jun-2017 Stephen Kiazyk <skiazyk@google.com> Add DVR method to get native display metrics

This seems like the kind of infomration we should be able to communicate
to vrcore.

Bug: 62494565
Test: Builds and loads, still need to test with vrcore
Change-Id: I2342fabcd2bcb8a34c0b783391b60defc381f3c6
(cherry picked from commit 6c5a92f142b5fa1907ff91a7dce4d09ddcb554c6)
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
99c2d73588dad4a4d12a17d37354237b8c11a16a 08-Jun-2017 Corey Tabaka <eieio@google.com> Move global buffer ops to VR display service.

The original home for these ops was the VR display manager service,
which is a protected singleton service that may only have one client.
Since more than one service needs to create global buffers, move these
ops to the display service. They are already protected by permission
checks.

Bug: 62424911
Test: dvr_api-test passes
Change-Id: Ia2f57fdf8a5258b52a652935d160e90db0f1cf9e
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
4a51d555edaa074ed1e2dc5c26b2cb258497203c 03-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Setting queue metadata size via dvrSurface API"
532e529ec8f87578d024da0c5b71d4b12da21862 03-Jun-2017 Jiwen 'Steve' Cai <jwcai@google.com> Setting queue metadata size via dvrSurface API

This allows VRCore to use metadata feature on each individual DvrBufferQueue.

Bug: 62301995
Test: build, dvr_api-test
Change-Id: I8e0eb8ca1a2c197426c4853cae99a4ed63caeffe
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
a4f106b4e9acf931d707e34270d9e08b6b09e993 01-Jun-2017 Hendrik Wagenaar <hendrikw@google.com> Remove error when trying to get a global buffer that doesn't exist

* Calling Get on a missing buffer isn't system error,
The error should be handled by the caller

Bug: None
Test: None
Change-Id: I0a49a4d104e9db025f4cfd213182f565d141bbf8
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
656f406fcb0c45fd3c729a513bdd3f353cc6ec1f 22-May-2017 Jiwen 'Steve' Cai <jwcai@google.com> DvrWriteBufferQueue: support buffer resizing

Currently, the buffer resising is implemented at the C API's
implementation level, i.e. it's a pure client side logic out of the core
BufferHubQueue C++/PDX implementation. The logic is similar to
BufferHubQueueProducer's buffer resizing logic.

Other minor changes:
1/ Use ProducerQueueConfig in DisplaySurface as well, and plumb default
width, height, and format to bufferhubd when a BufferHubQueue is created
through a Display Surface.
2/ Added detailed dvr_buffer_queue comments.
3/ Since we now have more and more logic in dvr_buffer_queue, refactored
Dvr{Read,Write}BufferQueue to be C++-styled class.

Bug: 38324405
Test: buffer_hub_queue_producer-test, buffer_hub_queue-test, dvr_api-test
Change-Id: I7186fc04e84eafda46eca316a94739bb3b5c07ca
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
36d23803882c64b1006cd3b8a47e00a4193a9b49 16-May-2017 Okan Arikan <okana@google.com> Int key for the named buffers.

Also, rename them to global buffers from named buffers.

Bug: 38320428
Test: Run frameworks/native/libs/vr/libdvr/tests on device
Change-Id: I2109aea77e35f2ccd8055208058df4b7287c1d5e
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
108e84f7e6a9117b66dba000dcf16c6d8c862e16 08-May-2017 Hendrik Wagenaar <hendrikw@google.com> dvrapi: Pass layer_count down

* We were missing layer count, which would prevent multiview
from working

Bug: 37245304
Test: MultiLayerBufferQueue
Change-Id: I88b41f1aa7665df01e89a7386cbc23b15c9a79b0
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
2251d822dac2a96aad4184a6fdc2690f0a58af7c 21-Apr-2017 Corey Tabaka <eieio@google.com> Remove the VR compositor from the framework.

Remove the VR compositor framework and enable out-of-process VR composition
in VrCore.

This CL seems large due to the ripple effect of changing the VrFlinger
API and protocol types. There are three major modules that require
concurrent changes:
1. Protocol definitions and low-level VrFlinger API in libdisplay.
* Additional changes needed to keep old interfaces working for
a short time while replacing the dependent code (dvrGraphics*).
2. VrFlinger service implementation changes to support VrCore compositor
and the removal of the internal compositor.
3. Changes to libdvr platform library API due to changes in #1 and #2.

Because of the nature of the interdependence of types and other defs it is
difficult to break this CL into smaller chunks. However, review of the three
major modules (libdisplay, libdvr, and libvrflinger) may be done separately
to ease the mental burden on reviewers.

Change Summary:
- Remove obsolete screenshot service. VR screenshots will be implemented
by VrCore.
- Update display protocol definitions for changes in VrFlinger service
requirements. The majority of the changes in libdisplay are a
consequence of these protocol and service changes.
- Update VrFlinger to support two kinds of surfaces:
1. Application - use by VR apps.
2. Direct - used by VrCore (protected by permission check).
- Remove VrFlinger internal compositor and GL context.
- Remove obsolete debug console.
- Update VrFlinger hardware composer interface to handle direct
surfaces only, removing the concept of GPU (compositor) layers.
- Update display manager to expose access to application surface info
to VrCore (protected by permission check).
- Update libdvr platform library interfaces for changes to VrFlinger
API / protocol.
- Clean up libdvr API struct setup using a common include.
- Add C++ header-only helpers for DVR platform library opaque types.

Bug: 36401174
Test: Build; run VrFlinger display test tool.
Change-Id: I15abfde5f72dbb3725a3f58621486afba6b64902
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
eaa5522feac452703a0836310047d4b15702487d 06-Apr-2017 Hendrik Wagenaar <hendrikw@google.com> Convert the pose buffer into a more generic named buffer

* It's likely that we'll have more than one pose buffer
* It's cleaner to separate the vsync info into a separate buffer

Bug: 37001881
Bug: 37240552
Test: Added and manually ran TestNamedBuffersSetup
Change-Id: I76621d3cfa8c21c9d5d1e6e648854067673be9ab
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
74cf084cab653537e89f46b90344b3133a94b3a3 24-Mar-2017 Jiwen 'Steve' Cai <jwcai@google.com> Add basic dvrSurface C API

Test: Build and flash system
Bug: 36563654
Change-Id: Id6c79d33d80e719b1d1d7f43aec99aadfad40c03
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp
bdcee79b0d7e87cb48049907a7ba8201d0288f75 23-Mar-2017 Jiwen 'Steve' Cai <jwcai@google.com> Move DVR platform C API into libdvr

Introduce a new static library build with Android.mk. The reasoning
behind this is:
1/ This library is going to consolidate all C headers and implementation
of the DVR platform library.
2/ No other internal system components need to depend on this library.
3/ This library is build with Android.mk so that it has depend on other
system components (such as libandroid_runtime) without worrying about
that Android.bp-based libs cannot depent and Androib.mk-based libraries.
4/ This library defines dvr_api.h header as the official definition of
DVR platform library headers. The header is moved from
'vendor/unbundled_google/packages/PrebuiltGoogleVr', which is not an
ideal place to hold the platform library anyway.
5/ If we ever decide to move these C wrappers out of frameworks/native,
this makes it easier to do so by bundling things now.

TODO: C APIs from libvrsensor and libvirtualtouchpadclient are not moved
into this bundle as some functions are still used by internal system
components. Ideally, these will be moved either to Google3 or vendor projects.

Test: Built and flash
Bug: 36563654
Change-Id: Ie5ce89faa70f86ac934a77d8f7d4fca7e94112ee
/frameworks/native/libs/vr/libdvr/dvr_surface.cpp