Loading libs/vr/libbroadcastring/include/libbroadcastring/broadcast_ring.h +3 −0 Original line number Diff line number Diff line Loading @@ -348,6 +348,9 @@ class BroadcastRing { return Get(sequence, record); } // Returns true if this instance has been created or imported. bool is_valid() const { return !!data_.mmap; } uint32_t record_count() const { return record_count_internal(); } uint32_t record_size() const { return record_size_internal(); } static constexpr uint32_t mmap_alignment() { return alignof(Mmap); } Loading libs/vr/libdisplay/display_manager_client.cpp +14 −2 Original line number Diff line number Diff line Loading @@ -49,8 +49,8 @@ pdx::Status<std::unique_ptr<IonBuffer>> DisplayManagerClient::SetupGlobalBuffer( const int ret = native_buffer_handle.Import(ion_buffer.get()); if (ret < 0) { ALOGE( "DisplayClient::GetGlobalBuffer: Failed to import global buffer: " "key=%d; error=%s", "DisplayManagerClient::GetGlobalBuffer: Failed to import global " "buffer: key=%d; error=%s", key, strerror(-ret)); return ErrorStatus(-ret); } Loading @@ -58,6 +58,18 @@ pdx::Status<std::unique_ptr<IonBuffer>> DisplayManagerClient::SetupGlobalBuffer( return {std::move(ion_buffer)}; } pdx::Status<void> DisplayManagerClient::DeleteGlobalBuffer( DvrGlobalBufferKey key) { auto status = InvokeRemoteMethod<DisplayManagerProtocol::DeleteGlobalBuffer>(key); if (!status) { ALOGE("DisplayManagerClient::DeleteGlobalBuffer Failed: %s", status.GetErrorMessage().c_str()); } return status; } pdx::Status<std::string> DisplayManagerClient::GetConfigurationData( ConfigFileType config_type) { auto status = Loading libs/vr/libdisplay/include/private/dvr/display_manager_client.h +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ class DisplayManagerClient : public pdx::ClientBase<DisplayManagerClient> { pdx::Status<std::vector<SurfaceState>> GetSurfaceState(); pdx::Status<std::unique_ptr<IonBuffer>> SetupGlobalBuffer( DvrGlobalBufferKey key, size_t size, uint64_t usage); pdx::Status<void> DeleteGlobalBuffer(DvrGlobalBufferKey key); pdx::Status<std::unique_ptr<ConsumerQueue>> GetSurfaceQueue(int surface_id, int queue_id); Loading libs/vr/libdisplay/include/private/dvr/display_protocol.h +3 −0 Original line number Diff line number Diff line Loading @@ -235,6 +235,7 @@ struct DisplayManagerProtocol { kOpGetSurfaceQueue, kOpSetupGlobalBuffer, kOpGetConfigurationData, kOpDeleteGlobalBuffer, }; // Aliases. Loading @@ -251,6 +252,8 @@ struct DisplayManagerProtocol { uint64_t usage)); PDX_REMOTE_METHOD(GetConfigurationData, kOpGetConfigurationData, std::string(ConfigFileType config_type)); PDX_REMOTE_METHOD(DeleteGlobalBuffer, kOpDeleteGlobalBuffer, void(DvrGlobalBufferKey key)); }; struct VSyncSchedInfo { Loading libs/vr/libdvr/dvr_display_manager.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,23 @@ int dvrDisplayManagerSetupGlobalBuffer(DvrDisplayManager* client, return 0; } int dvrDisplayManagerDeleteGlobalBuffer(DvrDisplayManager* client, DvrGlobalBufferKey key) { if (!client) return -EINVAL; auto buffer_status = client->client->DeleteGlobalBuffer(key); if (!buffer_status) { ALOGE( "dvrDisplayManagerDeleteGlobalBuffer: Failed to delete named buffer: " "%s", buffer_status.GetErrorMessage().c_str()); return -buffer_status.error(); } return 0; } int dvrConfigurationDataGet(DvrDisplayManager* client, int config_type, uint8_t** data, size_t* data_size) { if (!client || !data || !data_size) { Loading Loading
libs/vr/libbroadcastring/include/libbroadcastring/broadcast_ring.h +3 −0 Original line number Diff line number Diff line Loading @@ -348,6 +348,9 @@ class BroadcastRing { return Get(sequence, record); } // Returns true if this instance has been created or imported. bool is_valid() const { return !!data_.mmap; } uint32_t record_count() const { return record_count_internal(); } uint32_t record_size() const { return record_size_internal(); } static constexpr uint32_t mmap_alignment() { return alignof(Mmap); } Loading
libs/vr/libdisplay/display_manager_client.cpp +14 −2 Original line number Diff line number Diff line Loading @@ -49,8 +49,8 @@ pdx::Status<std::unique_ptr<IonBuffer>> DisplayManagerClient::SetupGlobalBuffer( const int ret = native_buffer_handle.Import(ion_buffer.get()); if (ret < 0) { ALOGE( "DisplayClient::GetGlobalBuffer: Failed to import global buffer: " "key=%d; error=%s", "DisplayManagerClient::GetGlobalBuffer: Failed to import global " "buffer: key=%d; error=%s", key, strerror(-ret)); return ErrorStatus(-ret); } Loading @@ -58,6 +58,18 @@ pdx::Status<std::unique_ptr<IonBuffer>> DisplayManagerClient::SetupGlobalBuffer( return {std::move(ion_buffer)}; } pdx::Status<void> DisplayManagerClient::DeleteGlobalBuffer( DvrGlobalBufferKey key) { auto status = InvokeRemoteMethod<DisplayManagerProtocol::DeleteGlobalBuffer>(key); if (!status) { ALOGE("DisplayManagerClient::DeleteGlobalBuffer Failed: %s", status.GetErrorMessage().c_str()); } return status; } pdx::Status<std::string> DisplayManagerClient::GetConfigurationData( ConfigFileType config_type) { auto status = Loading
libs/vr/libdisplay/include/private/dvr/display_manager_client.h +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ class DisplayManagerClient : public pdx::ClientBase<DisplayManagerClient> { pdx::Status<std::vector<SurfaceState>> GetSurfaceState(); pdx::Status<std::unique_ptr<IonBuffer>> SetupGlobalBuffer( DvrGlobalBufferKey key, size_t size, uint64_t usage); pdx::Status<void> DeleteGlobalBuffer(DvrGlobalBufferKey key); pdx::Status<std::unique_ptr<ConsumerQueue>> GetSurfaceQueue(int surface_id, int queue_id); Loading
libs/vr/libdisplay/include/private/dvr/display_protocol.h +3 −0 Original line number Diff line number Diff line Loading @@ -235,6 +235,7 @@ struct DisplayManagerProtocol { kOpGetSurfaceQueue, kOpSetupGlobalBuffer, kOpGetConfigurationData, kOpDeleteGlobalBuffer, }; // Aliases. Loading @@ -251,6 +252,8 @@ struct DisplayManagerProtocol { uint64_t usage)); PDX_REMOTE_METHOD(GetConfigurationData, kOpGetConfigurationData, std::string(ConfigFileType config_type)); PDX_REMOTE_METHOD(DeleteGlobalBuffer, kOpDeleteGlobalBuffer, void(DvrGlobalBufferKey key)); }; struct VSyncSchedInfo { Loading
libs/vr/libdvr/dvr_display_manager.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,23 @@ int dvrDisplayManagerSetupGlobalBuffer(DvrDisplayManager* client, return 0; } int dvrDisplayManagerDeleteGlobalBuffer(DvrDisplayManager* client, DvrGlobalBufferKey key) { if (!client) return -EINVAL; auto buffer_status = client->client->DeleteGlobalBuffer(key); if (!buffer_status) { ALOGE( "dvrDisplayManagerDeleteGlobalBuffer: Failed to delete named buffer: " "%s", buffer_status.GetErrorMessage().c_str()); return -buffer_status.error(); } return 0; } int dvrConfigurationDataGet(DvrDisplayManager* client, int config_type, uint8_t** data, size_t* data_size) { if (!client || !data || !data_size) { Loading