Loading libs/gui/include/gui/ISurfaceComposerClient.h +2 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ public: DECLARE_META_INTERFACE(SurfaceComposerClient) // flags for createSurface() enum { // (keep in sync with Surface.java) enum { // (keep in sync with SurfaceControl.java) eHidden = 0x00000004, eDestroyBackbuffer = 0x00000020, eSecure = 0x00000080, Loading @@ -42,6 +42,7 @@ public: eProtectedByApp = 0x00000800, eProtectedByDRM = 0x00001000, eCursorWindow = 0x00002000, eNoColorFill = 0x00004000, eFXSurfaceBufferQueue = 0x00000000, eFXSurfaceEffect = 0x00020000, Loading services/sensorservice/SensorDevice.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -820,7 +820,7 @@ status_t SensorDevice::updateBatchParamsLocked(int handle, Info &info) { status_t err(NO_ERROR); // If the min period or min timeout has changed since the last batch call, call batch. if (prevBestBatchParams != info.bestBatchParams) { if (prevBestBatchParams != info.bestBatchParams && info.numActiveClients() > 0) { ALOGD_IF(DEBUG_CONNECTIONS, "\t>>> actuating h/w BATCH 0x%08x %" PRId64 " %" PRId64, handle, info.bestBatchParams.mTSample, info.bestBatchParams.mTBatch); err = checkReturnAndGetStatus(mSensors->batch( Loading Loading @@ -890,9 +890,9 @@ void SensorDevice::setUidStateForConnection(void* ident, SensorService::UidState Info& info = mActivationCount.editValueAt(i); if (info.hasBatchParamsForIdent(ident)) { if (updateBatchParamsLocked(handle, info) != NO_ERROR) { bool enable = info.numActiveClients() == 0 && info.isActive; bool disable = info.numActiveClients() > 0 && !info.isActive; updateBatchParamsLocked(handle, info); bool disable = info.numActiveClients() == 0 && info.isActive; bool enable = info.numActiveClients() > 0 && !info.isActive; if ((enable || disable) && doActivateHardwareLocked(handle, enable) == NO_ERROR) { Loading @@ -901,7 +901,6 @@ void SensorDevice::setUidStateForConnection(void* ident, SensorService::UidState } } } } bool SensorDevice::isSensorActive(int handle) const { Mutex::Autolock _l(mLock); Loading services/sensorservice/SensorDeviceUtils.cpp +1 −14 Original line number Diff line number Diff line Loading @@ -40,22 +40,12 @@ void quantizeSensorEventValues(sensors_event_t *event, float resolution) { switch ((SensorTypeV2_1)event->type) { case SensorTypeV2_1::ACCELEROMETER: case SensorTypeV2_1::MAGNETIC_FIELD: case SensorTypeV2_1::ORIENTATION: case SensorTypeV2_1::GYROSCOPE: case SensorTypeV2_1::GRAVITY: case SensorTypeV2_1::LINEAR_ACCELERATION: case SensorTypeV2_1::MAGNETIC_FIELD_UNCALIBRATED: case SensorTypeV2_1::GYROSCOPE_UNCALIBRATED: case SensorTypeV2_1::ACCELEROMETER_UNCALIBRATED: axes = 3; break; case SensorTypeV2_1::GAME_ROTATION_VECTOR: axes = 4; break; case SensorTypeV2_1::ROTATION_VECTOR: case SensorTypeV2_1::GEOMAGNETIC_ROTATION_VECTOR: axes = 5; break; case SensorTypeV2_1::DEVICE_ORIENTATION: case SensorTypeV2_1::LIGHT: case SensorTypeV2_1::PRESSURE: Loading @@ -77,11 +67,8 @@ void quantizeSensorEventValues(sensors_event_t *event, float resolution) { case SensorTypeV2_1::HINGE_ANGLE: axes = 1; break; case SensorTypeV2_1::POSE_6DOF: axes = 15; break; default: // No other sensors have data that needs to be rounded. // No other sensors have data that needs to be quantized. break; } Loading services/surfaceflinger/BufferQueueLayer.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include "SurfaceInterceptor.h" #include "FrameTracer/FrameTracer.h" #include "Scheduler/LayerHistory.h" #include "TimeStats/TimeStats.h" namespace android { Loading Loading @@ -399,7 +400,8 @@ void BufferQueueLayer::onFrameAvailable(const BufferItem& item) { // Add this buffer from our internal queue tracker { // Autolock scope const nsecs_t presentTime = item.mIsAutoTimestamp ? 0 : item.mTimestamp; mFlinger->mScheduler->recordLayerHistory(this, presentTime); mFlinger->mScheduler->recordLayerHistory(this, presentTime, LayerHistory::LayerUpdateType::Buffer); Mutex::Autolock lock(mQueueItemLock); // Reset the frame number tracker when we receive the first buffer after Loading services/surfaceflinger/BufferStateLayer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -283,7 +283,8 @@ bool BufferStateLayer::setBuffer(const sp<GraphicBuffer>& buffer, const sp<Fence desiredPresentTime = desiredPresentTime <= 0 ? 0 : desiredPresentTime; mCurrentState.desiredPresentTime = desiredPresentTime; mFlinger->mScheduler->recordLayerHistory(this, desiredPresentTime); mFlinger->mScheduler->recordLayerHistory(this, desiredPresentTime, LayerHistory::LayerUpdateType::Buffer); addFrameEvent(acquireFence, postTime, desiredPresentTime); return true; Loading Loading
libs/gui/include/gui/ISurfaceComposerClient.h +2 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ public: DECLARE_META_INTERFACE(SurfaceComposerClient) // flags for createSurface() enum { // (keep in sync with Surface.java) enum { // (keep in sync with SurfaceControl.java) eHidden = 0x00000004, eDestroyBackbuffer = 0x00000020, eSecure = 0x00000080, Loading @@ -42,6 +42,7 @@ public: eProtectedByApp = 0x00000800, eProtectedByDRM = 0x00001000, eCursorWindow = 0x00002000, eNoColorFill = 0x00004000, eFXSurfaceBufferQueue = 0x00000000, eFXSurfaceEffect = 0x00020000, Loading
services/sensorservice/SensorDevice.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -820,7 +820,7 @@ status_t SensorDevice::updateBatchParamsLocked(int handle, Info &info) { status_t err(NO_ERROR); // If the min period or min timeout has changed since the last batch call, call batch. if (prevBestBatchParams != info.bestBatchParams) { if (prevBestBatchParams != info.bestBatchParams && info.numActiveClients() > 0) { ALOGD_IF(DEBUG_CONNECTIONS, "\t>>> actuating h/w BATCH 0x%08x %" PRId64 " %" PRId64, handle, info.bestBatchParams.mTSample, info.bestBatchParams.mTBatch); err = checkReturnAndGetStatus(mSensors->batch( Loading Loading @@ -890,9 +890,9 @@ void SensorDevice::setUidStateForConnection(void* ident, SensorService::UidState Info& info = mActivationCount.editValueAt(i); if (info.hasBatchParamsForIdent(ident)) { if (updateBatchParamsLocked(handle, info) != NO_ERROR) { bool enable = info.numActiveClients() == 0 && info.isActive; bool disable = info.numActiveClients() > 0 && !info.isActive; updateBatchParamsLocked(handle, info); bool disable = info.numActiveClients() == 0 && info.isActive; bool enable = info.numActiveClients() > 0 && !info.isActive; if ((enable || disable) && doActivateHardwareLocked(handle, enable) == NO_ERROR) { Loading @@ -901,7 +901,6 @@ void SensorDevice::setUidStateForConnection(void* ident, SensorService::UidState } } } } bool SensorDevice::isSensorActive(int handle) const { Mutex::Autolock _l(mLock); Loading
services/sensorservice/SensorDeviceUtils.cpp +1 −14 Original line number Diff line number Diff line Loading @@ -40,22 +40,12 @@ void quantizeSensorEventValues(sensors_event_t *event, float resolution) { switch ((SensorTypeV2_1)event->type) { case SensorTypeV2_1::ACCELEROMETER: case SensorTypeV2_1::MAGNETIC_FIELD: case SensorTypeV2_1::ORIENTATION: case SensorTypeV2_1::GYROSCOPE: case SensorTypeV2_1::GRAVITY: case SensorTypeV2_1::LINEAR_ACCELERATION: case SensorTypeV2_1::MAGNETIC_FIELD_UNCALIBRATED: case SensorTypeV2_1::GYROSCOPE_UNCALIBRATED: case SensorTypeV2_1::ACCELEROMETER_UNCALIBRATED: axes = 3; break; case SensorTypeV2_1::GAME_ROTATION_VECTOR: axes = 4; break; case SensorTypeV2_1::ROTATION_VECTOR: case SensorTypeV2_1::GEOMAGNETIC_ROTATION_VECTOR: axes = 5; break; case SensorTypeV2_1::DEVICE_ORIENTATION: case SensorTypeV2_1::LIGHT: case SensorTypeV2_1::PRESSURE: Loading @@ -77,11 +67,8 @@ void quantizeSensorEventValues(sensors_event_t *event, float resolution) { case SensorTypeV2_1::HINGE_ANGLE: axes = 1; break; case SensorTypeV2_1::POSE_6DOF: axes = 15; break; default: // No other sensors have data that needs to be rounded. // No other sensors have data that needs to be quantized. break; } Loading
services/surfaceflinger/BufferQueueLayer.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include "SurfaceInterceptor.h" #include "FrameTracer/FrameTracer.h" #include "Scheduler/LayerHistory.h" #include "TimeStats/TimeStats.h" namespace android { Loading Loading @@ -399,7 +400,8 @@ void BufferQueueLayer::onFrameAvailable(const BufferItem& item) { // Add this buffer from our internal queue tracker { // Autolock scope const nsecs_t presentTime = item.mIsAutoTimestamp ? 0 : item.mTimestamp; mFlinger->mScheduler->recordLayerHistory(this, presentTime); mFlinger->mScheduler->recordLayerHistory(this, presentTime, LayerHistory::LayerUpdateType::Buffer); Mutex::Autolock lock(mQueueItemLock); // Reset the frame number tracker when we receive the first buffer after Loading
services/surfaceflinger/BufferStateLayer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -283,7 +283,8 @@ bool BufferStateLayer::setBuffer(const sp<GraphicBuffer>& buffer, const sp<Fence desiredPresentTime = desiredPresentTime <= 0 ? 0 : desiredPresentTime; mCurrentState.desiredPresentTime = desiredPresentTime; mFlinger->mScheduler->recordLayerHistory(this, desiredPresentTime); mFlinger->mScheduler->recordLayerHistory(this, desiredPresentTime, LayerHistory::LayerUpdateType::Buffer); addFrameEvent(acquireFence, postTime, desiredPresentTime); return true; Loading