Loading data/etc/android.hardware.camera.concurrent.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2020 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- This is the set of features required for a camera2 device that supports concurrent operation of front and back cameras --> <permissions> <feature name="android.hardware.camera.front" /> <feature name="android.hardware.camera.concurrent" /> </permissions> libs/nativedisplay/include/android/choreographer.h→include/android/choreographer.h +9 −5 Original line number Diff line number Diff line Loading @@ -75,14 +75,16 @@ AChoreographer* AChoreographer_getInstance() __INTRODUCED_IN(24); * Deprecated: Use AChoreographer_postFrameCallback64 instead. */ void AChoreographer_postFrameCallback(AChoreographer* choreographer, AChoreographer_frameCallback callback, void* data) __INTRODUCED_IN(24) __DEPRECATED_IN(29); AChoreographer_frameCallback callback, void* data) __INTRODUCED_IN(24) __DEPRECATED_IN(29); /** * Deprecated: Use AChoreographer_postFrameCallbackDelayed64 instead. */ void AChoreographer_postFrameCallbackDelayed(AChoreographer* choreographer, AChoreographer_frameCallback callback, void* data, long delayMillis) __INTRODUCED_IN(24) __DEPRECATED_IN(29); long delayMillis) __INTRODUCED_IN(24) __DEPRECATED_IN(29); #endif /* __ANDROID_API__ >= 24 */ Loading @@ -95,7 +97,8 @@ void AChoreographer_postFrameCallbackDelayed(AChoreographer* choreographer, * Available since API level 29. */ void AChoreographer_postFrameCallback64(AChoreographer* choreographer, AChoreographer_frameCallback64 callback, void* data) __INTRODUCED_IN(29); AChoreographer_frameCallback64 callback, void* data) __INTRODUCED_IN(29); /** * Post a callback to be run on the frame following the specified delay. The Loading @@ -105,7 +108,8 @@ void AChoreographer_postFrameCallback64(AChoreographer* choreographer, * Available since API level 29. */ void AChoreographer_postFrameCallbackDelayed64(AChoreographer* choreographer, AChoreographer_frameCallback64 callback, void* data, uint32_t delayMillis) __INTRODUCED_IN(29); AChoreographer_frameCallback64 callback, void* data, uint32_t delayMillis) __INTRODUCED_IN(29); #endif /* __ANDROID_API__ >= 29 */ Loading libs/gui/DisplayEventDispatcher.cpp +3 −10 Original line number Diff line number Diff line Loading @@ -36,10 +36,7 @@ static const size_t EVENT_BUFFER_SIZE = 100; DisplayEventDispatcher::DisplayEventDispatcher(const sp<Looper>& looper, ISurfaceComposer::VsyncSource vsyncSource, ISurfaceComposer::ConfigChanged configChanged) : mLooper(looper), mReceiver(vsyncSource, configChanged), mWaitingForVsync(false), mConfigChangeFlag(configChanged) { : mLooper(looper), mReceiver(vsyncSource, configChanged), mWaitingForVsync(false) { ALOGV("dispatcher %p ~ Initializing display event dispatcher.", this); } Loading Loading @@ -92,16 +89,12 @@ status_t DisplayEventDispatcher::scheduleVsync() { return OK; } void DisplayEventDispatcher::toggleConfigEvents(ISurfaceComposer::ConfigChanged configChangeFlag) { if (mConfigChangeFlag == configChangeFlag) { return; } status_t status = mReceiver.toggleConfigEvents(configChangeFlag); void DisplayEventDispatcher::requestLatestConfig() { status_t status = mReceiver.requestLatestConfig(); if (status) { ALOGW("Failed enable config events, status=%d", status); return; } mConfigChangeFlag = configChangeFlag; } int DisplayEventDispatcher::getFd() const { Loading libs/gui/DisplayEventReceiver.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -79,10 +79,9 @@ status_t DisplayEventReceiver::requestNextVsync() { return NO_INIT; } status_t DisplayEventReceiver::toggleConfigEvents( ISurfaceComposer::ConfigChanged configChangeFlag) { status_t DisplayEventReceiver::requestLatestConfig() { if (mEventConnection != nullptr) { mEventConnection->toggleConfigEvents(configChangeFlag); mEventConnection->requestLatestConfig(); return NO_ERROR; } return NO_INIT; Loading libs/gui/IDisplayEventConnection.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ enum class Tag : uint32_t { STEAL_RECEIVE_CHANNEL = IBinder::FIRST_CALL_TRANSACTION, SET_VSYNC_RATE, REQUEST_NEXT_VSYNC, TOGGLE_CONFIG_EVENTS, LAST = TOGGLE_CONFIG_EVENTS, REQUEST_LATEST_CONFIG, LAST = REQUEST_LATEST_CONFIG, }; } // Anonymous namespace Loading Loading @@ -55,10 +55,9 @@ public: Tag::REQUEST_NEXT_VSYNC); } void toggleConfigEvents(ISurfaceComposer::ConfigChanged configChangeFlag) override { callRemoteAsync<decltype( &IDisplayEventConnection::toggleConfigEvents)>(Tag::TOGGLE_CONFIG_EVENTS, configChangeFlag); void requestLatestConfig() override { callRemoteAsync<decltype(&IDisplayEventConnection::requestLatestConfig)>( Tag::REQUEST_LATEST_CONFIG); } }; Loading @@ -81,8 +80,8 @@ status_t BnDisplayEventConnection::onTransact(uint32_t code, const Parcel& data, return callLocal(data, reply, &IDisplayEventConnection::setVsyncRate); case Tag::REQUEST_NEXT_VSYNC: return callLocalAsync(data, reply, &IDisplayEventConnection::requestNextVsync); case Tag::TOGGLE_CONFIG_EVENTS: return callLocalAsync(data, reply, &IDisplayEventConnection::toggleConfigEvents); case Tag::REQUEST_LATEST_CONFIG: return callLocalAsync(data, reply, &IDisplayEventConnection::requestLatestConfig); } } Loading Loading
data/etc/android.hardware.camera.concurrent.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2020 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- This is the set of features required for a camera2 device that supports concurrent operation of front and back cameras --> <permissions> <feature name="android.hardware.camera.front" /> <feature name="android.hardware.camera.concurrent" /> </permissions>
libs/nativedisplay/include/android/choreographer.h→include/android/choreographer.h +9 −5 Original line number Diff line number Diff line Loading @@ -75,14 +75,16 @@ AChoreographer* AChoreographer_getInstance() __INTRODUCED_IN(24); * Deprecated: Use AChoreographer_postFrameCallback64 instead. */ void AChoreographer_postFrameCallback(AChoreographer* choreographer, AChoreographer_frameCallback callback, void* data) __INTRODUCED_IN(24) __DEPRECATED_IN(29); AChoreographer_frameCallback callback, void* data) __INTRODUCED_IN(24) __DEPRECATED_IN(29); /** * Deprecated: Use AChoreographer_postFrameCallbackDelayed64 instead. */ void AChoreographer_postFrameCallbackDelayed(AChoreographer* choreographer, AChoreographer_frameCallback callback, void* data, long delayMillis) __INTRODUCED_IN(24) __DEPRECATED_IN(29); long delayMillis) __INTRODUCED_IN(24) __DEPRECATED_IN(29); #endif /* __ANDROID_API__ >= 24 */ Loading @@ -95,7 +97,8 @@ void AChoreographer_postFrameCallbackDelayed(AChoreographer* choreographer, * Available since API level 29. */ void AChoreographer_postFrameCallback64(AChoreographer* choreographer, AChoreographer_frameCallback64 callback, void* data) __INTRODUCED_IN(29); AChoreographer_frameCallback64 callback, void* data) __INTRODUCED_IN(29); /** * Post a callback to be run on the frame following the specified delay. The Loading @@ -105,7 +108,8 @@ void AChoreographer_postFrameCallback64(AChoreographer* choreographer, * Available since API level 29. */ void AChoreographer_postFrameCallbackDelayed64(AChoreographer* choreographer, AChoreographer_frameCallback64 callback, void* data, uint32_t delayMillis) __INTRODUCED_IN(29); AChoreographer_frameCallback64 callback, void* data, uint32_t delayMillis) __INTRODUCED_IN(29); #endif /* __ANDROID_API__ >= 29 */ Loading
libs/gui/DisplayEventDispatcher.cpp +3 −10 Original line number Diff line number Diff line Loading @@ -36,10 +36,7 @@ static const size_t EVENT_BUFFER_SIZE = 100; DisplayEventDispatcher::DisplayEventDispatcher(const sp<Looper>& looper, ISurfaceComposer::VsyncSource vsyncSource, ISurfaceComposer::ConfigChanged configChanged) : mLooper(looper), mReceiver(vsyncSource, configChanged), mWaitingForVsync(false), mConfigChangeFlag(configChanged) { : mLooper(looper), mReceiver(vsyncSource, configChanged), mWaitingForVsync(false) { ALOGV("dispatcher %p ~ Initializing display event dispatcher.", this); } Loading Loading @@ -92,16 +89,12 @@ status_t DisplayEventDispatcher::scheduleVsync() { return OK; } void DisplayEventDispatcher::toggleConfigEvents(ISurfaceComposer::ConfigChanged configChangeFlag) { if (mConfigChangeFlag == configChangeFlag) { return; } status_t status = mReceiver.toggleConfigEvents(configChangeFlag); void DisplayEventDispatcher::requestLatestConfig() { status_t status = mReceiver.requestLatestConfig(); if (status) { ALOGW("Failed enable config events, status=%d", status); return; } mConfigChangeFlag = configChangeFlag; } int DisplayEventDispatcher::getFd() const { Loading
libs/gui/DisplayEventReceiver.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -79,10 +79,9 @@ status_t DisplayEventReceiver::requestNextVsync() { return NO_INIT; } status_t DisplayEventReceiver::toggleConfigEvents( ISurfaceComposer::ConfigChanged configChangeFlag) { status_t DisplayEventReceiver::requestLatestConfig() { if (mEventConnection != nullptr) { mEventConnection->toggleConfigEvents(configChangeFlag); mEventConnection->requestLatestConfig(); return NO_ERROR; } return NO_INIT; Loading
libs/gui/IDisplayEventConnection.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ enum class Tag : uint32_t { STEAL_RECEIVE_CHANNEL = IBinder::FIRST_CALL_TRANSACTION, SET_VSYNC_RATE, REQUEST_NEXT_VSYNC, TOGGLE_CONFIG_EVENTS, LAST = TOGGLE_CONFIG_EVENTS, REQUEST_LATEST_CONFIG, LAST = REQUEST_LATEST_CONFIG, }; } // Anonymous namespace Loading Loading @@ -55,10 +55,9 @@ public: Tag::REQUEST_NEXT_VSYNC); } void toggleConfigEvents(ISurfaceComposer::ConfigChanged configChangeFlag) override { callRemoteAsync<decltype( &IDisplayEventConnection::toggleConfigEvents)>(Tag::TOGGLE_CONFIG_EVENTS, configChangeFlag); void requestLatestConfig() override { callRemoteAsync<decltype(&IDisplayEventConnection::requestLatestConfig)>( Tag::REQUEST_LATEST_CONFIG); } }; Loading @@ -81,8 +80,8 @@ status_t BnDisplayEventConnection::onTransact(uint32_t code, const Parcel& data, return callLocal(data, reply, &IDisplayEventConnection::setVsyncRate); case Tag::REQUEST_NEXT_VSYNC: return callLocalAsync(data, reply, &IDisplayEventConnection::requestNextVsync); case Tag::TOGGLE_CONFIG_EVENTS: return callLocalAsync(data, reply, &IDisplayEventConnection::toggleConfigEvents); case Tag::REQUEST_LATEST_CONFIG: return callLocalAsync(data, reply, &IDisplayEventConnection::requestLatestConfig); } } Loading