Loading libs/gui/ISurfaceComposer.cpp +34 −8 Original line number Diff line number Diff line Loading @@ -888,7 +888,7 @@ public: } virtual status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, int32_t defaultConfig, bool allowGroupSwitching, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, Loading @@ -909,6 +909,11 @@ public: ALOGE("setDesiredDisplayConfigSpecs failed to write defaultConfig: %d", result); return result; } result = data.writeBool(allowGroupSwitching); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write allowGroupSwitching: %d", result); return result; } result = data.writeFloat(primaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write primaryRefreshRateMin: %d", result); Loading Loading @@ -943,12 +948,14 @@ public: virtual status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, bool* outAllowGroupSwitching, float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) { if (!outDefaultConfig || !outPrimaryRefreshRateMin || !outPrimaryRefreshRateMax || !outAppRequestRefreshRateMin || !outAppRequestRefreshRateMax) { if (!outDefaultConfig || !outAllowGroupSwitching || !outPrimaryRefreshRateMin || !outPrimaryRefreshRateMax || !outAppRequestRefreshRateMin || !outAppRequestRefreshRateMax) { return BAD_VALUE; } Parcel data, reply; Loading @@ -973,6 +980,11 @@ public: ALOGE("getDesiredDisplayConfigSpecs failed to read defaultConfig: %d", result); return result; } result = reply.readBool(outAllowGroupSwitching); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read allowGroupSwitching: %d", result); return result; } result = reply.readFloat(outPrimaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read primaryRefreshRateMin: %d", result); Loading Loading @@ -1829,6 +1841,13 @@ status_t BnSurfaceComposer::onTransact( ALOGE("setDesiredDisplayConfigSpecs: failed to read defaultConfig: %d", result); return result; } bool allowGroupSwitching; result = data.readBool(&allowGroupSwitching); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to read allowGroupSwitching: %d", result); return result; } float primaryRefreshRateMin; result = data.readFloat(&primaryRefreshRateMin); if (result != NO_ERROR) { Loading Loading @@ -1857,9 +1876,9 @@ status_t BnSurfaceComposer::onTransact( result); return result; } result = setDesiredDisplayConfigSpecs(displayToken, defaultConfig, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, result = setDesiredDisplayConfigSpecs(displayToken, defaultConfig, allowGroupSwitching, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to call setDesiredDisplayConfigSpecs: " Loading @@ -1874,13 +1893,14 @@ status_t BnSurfaceComposer::onTransact( CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> displayToken = data.readStrongBinder(); int32_t defaultConfig; bool allowGroupSwitching; float primaryRefreshRateMin; float primaryRefreshRateMax; float appRequestRefreshRateMin; float appRequestRefreshRateMax; status_t result = getDesiredDisplayConfigSpecs(displayToken, &defaultConfig, getDesiredDisplayConfigSpecs(displayToken, &defaultConfig, &allowGroupSwitching, &primaryRefreshRateMin, &primaryRefreshRateMax, &appRequestRefreshRateMin, &appRequestRefreshRateMax); Loading @@ -1896,6 +1916,12 @@ status_t BnSurfaceComposer::onTransact( ALOGE("getDesiredDisplayConfigSpecs: failed to write defaultConfig: %d", result); return result; } result = reply->writeBool(allowGroupSwitching); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write allowGroupSwitching: %d", result); return result; } result = reply->writeFloat(primaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write primaryRefreshRateMin: %d", Loading libs/gui/SurfaceComposerClient.cpp +14 −17 Original line number Diff line number Diff line Loading @@ -1773,27 +1773,24 @@ int SurfaceComposerClient::getActiveConfig(const sp<IBinder>& display) { return ComposerService::getComposerService()->getActiveConfig(display); } status_t SurfaceComposerClient::setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, status_t SurfaceComposerClient::setDesiredDisplayConfigSpecs( const sp<IBinder>& displayToken, int32_t defaultConfig, bool allowGroupSwitching, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, float appRequestRefreshRateMax) { return ComposerService::getComposerService() ->setDesiredDisplayConfigSpecs(displayToken, defaultConfig, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, appRequestRefreshRateMax); ->setDesiredDisplayConfigSpecs(displayToken, defaultConfig, allowGroupSwitching, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, appRequestRefreshRateMax); } status_t SurfaceComposerClient::getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) { status_t SurfaceComposerClient::getDesiredDisplayConfigSpecs( const sp<IBinder>& displayToken, int32_t* outDefaultConfig, bool* outAllowGroupSwitching, float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) { return ComposerService::getComposerService() ->getDesiredDisplayConfigSpecs(displayToken, outDefaultConfig, outPrimaryRefreshRateMin, outPrimaryRefreshRateMax, outAppRequestRefreshRateMin, ->getDesiredDisplayConfigSpecs(displayToken, outDefaultConfig, outAllowGroupSwitching, outPrimaryRefreshRateMin, outPrimaryRefreshRateMax, outAppRequestRefreshRateMin, outAppRequestRefreshRateMax); } Loading libs/gui/include/gui/ISurfaceComposer.h +2 −1 Original line number Diff line number Diff line Loading @@ -395,7 +395,7 @@ public: * returned from getDisplayConfigs(). */ virtual status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, int32_t defaultConfig, bool allowGroupSwitching, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, Loading @@ -403,6 +403,7 @@ public: virtual status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, bool* outAllowGroupSwitching, float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, Loading libs/gui/include/gui/SurfaceComposerClient.h +3 −1 Original line number Diff line number Diff line Loading @@ -120,13 +120,15 @@ public: // Sets the refresh rate boundaries for the display. static status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float primaryRefreshRateMin, int32_t defaultConfig, bool allowGroupSwitching, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, float appRequestRefreshRateMax); // Gets the refresh rate boundaries for the display. static status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, bool* outAllowGroupSwitching, float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, Loading libs/gui/tests/Surface_test.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -844,7 +844,7 @@ public: return NO_ERROR; } status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& /*displayToken*/, int32_t /*defaultConfig*/, int32_t /*defaultConfig*/, bool /*allowGroupSwitching*/, float /*primaryRefreshRateMin*/, float /*primaryRefreshRateMax*/, float /*appRequestRefreshRateMin*/, Loading @@ -853,6 +853,7 @@ public: } status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& /*displayToken*/, int32_t* /*outDefaultConfig*/, bool* /*outAllowGroupSwitching*/, float* /*outPrimaryRefreshRateMin*/, float* /*outPrimaryRefreshRateMax*/, float* /*outAppRequestRefreshRateMin*/, Loading Loading
libs/gui/ISurfaceComposer.cpp +34 −8 Original line number Diff line number Diff line Loading @@ -888,7 +888,7 @@ public: } virtual status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, int32_t defaultConfig, bool allowGroupSwitching, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, Loading @@ -909,6 +909,11 @@ public: ALOGE("setDesiredDisplayConfigSpecs failed to write defaultConfig: %d", result); return result; } result = data.writeBool(allowGroupSwitching); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write allowGroupSwitching: %d", result); return result; } result = data.writeFloat(primaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write primaryRefreshRateMin: %d", result); Loading Loading @@ -943,12 +948,14 @@ public: virtual status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, bool* outAllowGroupSwitching, float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) { if (!outDefaultConfig || !outPrimaryRefreshRateMin || !outPrimaryRefreshRateMax || !outAppRequestRefreshRateMin || !outAppRequestRefreshRateMax) { if (!outDefaultConfig || !outAllowGroupSwitching || !outPrimaryRefreshRateMin || !outPrimaryRefreshRateMax || !outAppRequestRefreshRateMin || !outAppRequestRefreshRateMax) { return BAD_VALUE; } Parcel data, reply; Loading @@ -973,6 +980,11 @@ public: ALOGE("getDesiredDisplayConfigSpecs failed to read defaultConfig: %d", result); return result; } result = reply.readBool(outAllowGroupSwitching); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read allowGroupSwitching: %d", result); return result; } result = reply.readFloat(outPrimaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read primaryRefreshRateMin: %d", result); Loading Loading @@ -1829,6 +1841,13 @@ status_t BnSurfaceComposer::onTransact( ALOGE("setDesiredDisplayConfigSpecs: failed to read defaultConfig: %d", result); return result; } bool allowGroupSwitching; result = data.readBool(&allowGroupSwitching); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to read allowGroupSwitching: %d", result); return result; } float primaryRefreshRateMin; result = data.readFloat(&primaryRefreshRateMin); if (result != NO_ERROR) { Loading Loading @@ -1857,9 +1876,9 @@ status_t BnSurfaceComposer::onTransact( result); return result; } result = setDesiredDisplayConfigSpecs(displayToken, defaultConfig, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, result = setDesiredDisplayConfigSpecs(displayToken, defaultConfig, allowGroupSwitching, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to call setDesiredDisplayConfigSpecs: " Loading @@ -1874,13 +1893,14 @@ status_t BnSurfaceComposer::onTransact( CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> displayToken = data.readStrongBinder(); int32_t defaultConfig; bool allowGroupSwitching; float primaryRefreshRateMin; float primaryRefreshRateMax; float appRequestRefreshRateMin; float appRequestRefreshRateMax; status_t result = getDesiredDisplayConfigSpecs(displayToken, &defaultConfig, getDesiredDisplayConfigSpecs(displayToken, &defaultConfig, &allowGroupSwitching, &primaryRefreshRateMin, &primaryRefreshRateMax, &appRequestRefreshRateMin, &appRequestRefreshRateMax); Loading @@ -1896,6 +1916,12 @@ status_t BnSurfaceComposer::onTransact( ALOGE("getDesiredDisplayConfigSpecs: failed to write defaultConfig: %d", result); return result; } result = reply->writeBool(allowGroupSwitching); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write allowGroupSwitching: %d", result); return result; } result = reply->writeFloat(primaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write primaryRefreshRateMin: %d", Loading
libs/gui/SurfaceComposerClient.cpp +14 −17 Original line number Diff line number Diff line Loading @@ -1773,27 +1773,24 @@ int SurfaceComposerClient::getActiveConfig(const sp<IBinder>& display) { return ComposerService::getComposerService()->getActiveConfig(display); } status_t SurfaceComposerClient::setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, status_t SurfaceComposerClient::setDesiredDisplayConfigSpecs( const sp<IBinder>& displayToken, int32_t defaultConfig, bool allowGroupSwitching, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, float appRequestRefreshRateMax) { return ComposerService::getComposerService() ->setDesiredDisplayConfigSpecs(displayToken, defaultConfig, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, appRequestRefreshRateMax); ->setDesiredDisplayConfigSpecs(displayToken, defaultConfig, allowGroupSwitching, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, appRequestRefreshRateMax); } status_t SurfaceComposerClient::getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) { status_t SurfaceComposerClient::getDesiredDisplayConfigSpecs( const sp<IBinder>& displayToken, int32_t* outDefaultConfig, bool* outAllowGroupSwitching, float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) { return ComposerService::getComposerService() ->getDesiredDisplayConfigSpecs(displayToken, outDefaultConfig, outPrimaryRefreshRateMin, outPrimaryRefreshRateMax, outAppRequestRefreshRateMin, ->getDesiredDisplayConfigSpecs(displayToken, outDefaultConfig, outAllowGroupSwitching, outPrimaryRefreshRateMin, outPrimaryRefreshRateMax, outAppRequestRefreshRateMin, outAppRequestRefreshRateMax); } Loading
libs/gui/include/gui/ISurfaceComposer.h +2 −1 Original line number Diff line number Diff line Loading @@ -395,7 +395,7 @@ public: * returned from getDisplayConfigs(). */ virtual status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, int32_t defaultConfig, bool allowGroupSwitching, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, Loading @@ -403,6 +403,7 @@ public: virtual status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, bool* outAllowGroupSwitching, float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, Loading
libs/gui/include/gui/SurfaceComposerClient.h +3 −1 Original line number Diff line number Diff line Loading @@ -120,13 +120,15 @@ public: // Sets the refresh rate boundaries for the display. static status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float primaryRefreshRateMin, int32_t defaultConfig, bool allowGroupSwitching, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, float appRequestRefreshRateMax); // Gets the refresh rate boundaries for the display. static status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, bool* outAllowGroupSwitching, float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, Loading
libs/gui/tests/Surface_test.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -844,7 +844,7 @@ public: return NO_ERROR; } status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& /*displayToken*/, int32_t /*defaultConfig*/, int32_t /*defaultConfig*/, bool /*allowGroupSwitching*/, float /*primaryRefreshRateMin*/, float /*primaryRefreshRateMax*/, float /*appRequestRefreshRateMin*/, Loading @@ -853,6 +853,7 @@ public: } status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& /*displayToken*/, int32_t* /*outDefaultConfig*/, bool* /*outAllowGroupSwitching*/, float* /*outPrimaryRefreshRateMin*/, float* /*outPrimaryRefreshRateMax*/, float* /*outAppRequestRefreshRateMin*/, Loading