Loading libs/gui/ISurfaceComposer.cpp +99 −30 Original line number Diff line number Diff line Loading @@ -931,8 +931,11 @@ public: } virtual status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float minRefreshRate, float maxRefreshRate) { int32_t defaultConfig, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, float appRequestRefreshRateMax) { Parcel data, reply; status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); if (result != NO_ERROR) { Loading @@ -949,14 +952,26 @@ public: ALOGE("setDesiredDisplayConfigSpecs failed to write defaultConfig: %d", result); return result; } result = data.writeFloat(minRefreshRate); result = data.writeFloat(primaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write minRefreshRate: %d", result); ALOGE("setDesiredDisplayConfigSpecs failed to write primaryRefreshRateMin: %d", result); return result; } result = data.writeFloat(maxRefreshRate); result = data.writeFloat(primaryRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write maxRefreshRate: %d", result); ALOGE("setDesiredDisplayConfigSpecs failed to write primaryRefreshRateMax: %d", result); return result; } result = data.writeFloat(appRequestRefreshRateMin); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write appRequestRefreshRateMin: %d", result); return result; } result = data.writeFloat(appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write appRequestRefreshRateMax: %d", result); return result; } Loading @@ -971,9 +986,14 @@ public: virtual status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, float* outMinRefreshRate, float* outMaxRefreshRate) { if (!outDefaultConfig || !outMinRefreshRate || !outMaxRefreshRate) return BAD_VALUE; float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) { if (!outDefaultConfig || !outPrimaryRefreshRateMin || !outPrimaryRefreshRateMax || !outAppRequestRefreshRateMin || !outAppRequestRefreshRateMax) { return BAD_VALUE; } Parcel data, reply; status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); if (result != NO_ERROR) { Loading @@ -996,14 +1016,26 @@ public: ALOGE("getDesiredDisplayConfigSpecs failed to read defaultConfig: %d", result); return result; } result = reply.readFloat(outMinRefreshRate); result = reply.readFloat(outPrimaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read minRefreshRate: %d", result); ALOGE("getDesiredDisplayConfigSpecs failed to read primaryRefreshRateMin: %d", result); return result; } result = reply.readFloat(outMaxRefreshRate); result = reply.readFloat(outPrimaryRefreshRateMax); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read maxRefreshRate: %d", result); ALOGE("getDesiredDisplayConfigSpecs failed to read primaryRefreshRateMax: %d", result); return result; } result = reply.readFloat(outAppRequestRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read appRequestRefreshRateMin: %d", result); return result; } result = reply.readFloat(outAppRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read appRequestRefreshRateMax: %d", result); return result; } return reply.readInt32(); Loading Loading @@ -1835,20 +1867,38 @@ status_t BnSurfaceComposer::onTransact( ALOGE("setDesiredDisplayConfigSpecs: failed to read defaultConfig: %d", result); return result; } float minRefreshRate; result = data.readFloat(&minRefreshRate); float primaryRefreshRateMin; result = data.readFloat(&primaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to read minRefreshRate: %d", result); ALOGE("setDesiredDisplayConfigSpecs: failed to read primaryRefreshRateMin: %d", result); return result; } float maxRefreshRate; result = data.readFloat(&maxRefreshRate); float primaryRefreshRateMax; result = data.readFloat(&primaryRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to read maxRefreshRate: %d", result); ALOGE("setDesiredDisplayConfigSpecs: failed to read primaryRefreshRateMax: %d", result); return result; } result = setDesiredDisplayConfigSpecs(displayToken, defaultConfig, minRefreshRate, maxRefreshRate); float appRequestRefreshRateMin; result = data.readFloat(&appRequestRefreshRateMin); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to read appRequestRefreshRateMin: %d", result); return result; } float appRequestRefreshRateMax; result = data.readFloat(&appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to read appRequestRefreshRateMax: %d", result); return result; } result = setDesiredDisplayConfigSpecs(displayToken, defaultConfig, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to call setDesiredDisplayConfigSpecs: " "%d", Loading @@ -1862,11 +1912,16 @@ status_t BnSurfaceComposer::onTransact( CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> displayToken = data.readStrongBinder(); int32_t defaultConfig; float minRefreshRate; float maxRefreshRate; float primaryRefreshRateMin; float primaryRefreshRateMax; float appRequestRefreshRateMin; float appRequestRefreshRateMax; status_t result = getDesiredDisplayConfigSpecs(displayToken, &defaultConfig, &minRefreshRate, &maxRefreshRate); status_t result = getDesiredDisplayConfigSpecs(displayToken, &defaultConfig, &primaryRefreshRateMin, &primaryRefreshRateMax, &appRequestRefreshRateMin, &appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to get getDesiredDisplayConfigSpecs: " "%d", Loading @@ -1879,14 +1934,28 @@ status_t BnSurfaceComposer::onTransact( ALOGE("getDesiredDisplayConfigSpecs: failed to write defaultConfig: %d", result); return result; } result = reply->writeFloat(minRefreshRate); result = reply->writeFloat(primaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write minRefreshRate: %d", result); ALOGE("getDesiredDisplayConfigSpecs: failed to write primaryRefreshRateMin: %d", result); return result; } result = reply->writeFloat(maxRefreshRate); result = reply->writeFloat(primaryRefreshRateMax); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write maxRefreshRate: %d", result); ALOGE("getDesiredDisplayConfigSpecs: failed to write primaryRefreshRateMax: %d", result); return result; } result = reply->writeFloat(appRequestRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write appRequestRefreshRateMin: %d", result); return result; } result = reply->writeFloat(appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write appRequestRefreshRateMax: %d", result); return result; } reply->writeInt32(result); Loading libs/gui/SurfaceComposerClient.cpp +16 −12 Original line number Diff line number Diff line Loading @@ -1698,22 +1698,26 @@ int SurfaceComposerClient::getActiveConfig(const sp<IBinder>& display) { status_t SurfaceComposerClient::setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float minRefreshRate, float maxRefreshRate) { return ComposerService::getComposerService()->setDesiredDisplayConfigSpecs(displayToken, defaultConfig, minRefreshRate, maxRefreshRate); float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, float appRequestRefreshRateMax) { return ComposerService::getComposerService() ->setDesiredDisplayConfigSpecs(displayToken, defaultConfig, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, appRequestRefreshRateMax); } status_t SurfaceComposerClient::getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, float* outMinRefreshRate, float* outMaxRefreshRate) { return ComposerService::getComposerService()->getDesiredDisplayConfigSpecs(displayToken, outDefaultConfig, outMinRefreshRate, outMaxRefreshRate); float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) { return ComposerService::getComposerService() ->getDesiredDisplayConfigSpecs(displayToken, outDefaultConfig, outPrimaryRefreshRateMin, outPrimaryRefreshRateMax, outAppRequestRefreshRateMin, outAppRequestRefreshRateMax); } status_t SurfaceComposerClient::getDisplayColorModes(const sp<IBinder>& display, Loading libs/gui/include/gui/ISurfaceComposer.h +25 −8 Original line number Diff line number Diff line Loading @@ -426,19 +426,36 @@ public: */ virtual status_t removeRegionSamplingListener(const sp<IRegionSamplingListener>& listener) = 0; /* * Sets the refresh rate boundaries for display configuration. * For all other parameters, default configuration is used. The index for the default is * corresponding to the configs returned from getDisplayConfigs(). /* Sets the refresh rate boundaries for the display. * * The primary refresh rate range represents display manager's general guidance on the display * configs we'll consider when switching refresh rates. Unless we get an explicit signal from an * app, we should stay within this range. * * The app request refresh rate range allows us to consider more display configs when switching * refresh rates. Although we should generally stay within the primary range, specific * considerations, such as layer frame rate settings specified via the setFrameRate() api, may * cause us to go outside the primary range. We never go outside the app request range. The app * request range will be greater than or equal to the primary refresh rate range, never smaller. * * defaultConfig is used to narrow the list of display configs SurfaceFlinger will consider * switching between. Only configs with a config group and resolution matching defaultConfig * will be considered for switching. The defaultConfig index corresponds to the list of configs * returned from getDisplayConfigs(). */ virtual status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float minRefreshRate, float maxRefreshRate) = 0; int32_t defaultConfig, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, float appRequestRefreshRateMax) = 0; virtual status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, float* outMinRefreshRate, float* outMaxRefreshRate) = 0; float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) = 0; /* * Gets whether brightness operations are supported on a display. * Loading libs/gui/include/gui/SurfaceComposerClient.h +10 −12 Original line number Diff line number Diff line Loading @@ -118,21 +118,19 @@ public: // Shorthand for getDisplayConfigs element at getActiveConfig index. static status_t getActiveDisplayConfig(const sp<IBinder>& display, DisplayConfig*); // Sets the refresh rate boundaries for display configuration. // For all other parameters, default configuration is used. The index for the default is // corresponting to the configs returned from getDisplayConfigs(). // Sets the refresh rate boundaries for the display. static status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float minRefreshRate, float maxRefreshRate); // Gets the refresh rate boundaries for display configuration. // For all other parameters, default configuration is used. The index for the default is // corresponting to the configs returned from getDisplayConfigs(). // The reason is passed in for telemetry tracking, and it corresponds to the list of all // the policy rules that were used. int32_t defaultConfig, 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, float* outMinRefreshRate, float* outMaxRefreshRate); float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax); // Gets the list of supported color modes for the given display static status_t getDisplayColorModes(const sp<IBinder>& display, Loading libs/gui/tests/Surface_test.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -835,14 +835,19 @@ public: return NO_ERROR; } status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& /*displayToken*/, int32_t /*defaultConfig*/, float /*minRefreshRate*/, float /*maxRefreshRate*/) { int32_t /*defaultConfig*/, float /*primaryRefreshRateMin*/, float /*primaryRefreshRateMax*/, float /*appRequestRefreshRateMin*/, float /*appRequestRefreshRateMax*/) { return NO_ERROR; } status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& /*displayToken*/, int32_t* /*outDefaultConfig*/, float* /*outMinRefreshRate*/, float* /*outMaxRefreshRate*/) override { float* /*outPrimaryRefreshRateMin*/, float* /*outPrimaryRefreshRateMax*/, float* /*outAppRequestRefreshRateMin*/, float* /*outAppRequestRefreshRateMax*/) override { return NO_ERROR; }; status_t notifyPowerHint(int32_t /*hintId*/) override { return NO_ERROR; } Loading Loading
libs/gui/ISurfaceComposer.cpp +99 −30 Original line number Diff line number Diff line Loading @@ -931,8 +931,11 @@ public: } virtual status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float minRefreshRate, float maxRefreshRate) { int32_t defaultConfig, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, float appRequestRefreshRateMax) { Parcel data, reply; status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); if (result != NO_ERROR) { Loading @@ -949,14 +952,26 @@ public: ALOGE("setDesiredDisplayConfigSpecs failed to write defaultConfig: %d", result); return result; } result = data.writeFloat(minRefreshRate); result = data.writeFloat(primaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write minRefreshRate: %d", result); ALOGE("setDesiredDisplayConfigSpecs failed to write primaryRefreshRateMin: %d", result); return result; } result = data.writeFloat(maxRefreshRate); result = data.writeFloat(primaryRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write maxRefreshRate: %d", result); ALOGE("setDesiredDisplayConfigSpecs failed to write primaryRefreshRateMax: %d", result); return result; } result = data.writeFloat(appRequestRefreshRateMin); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write appRequestRefreshRateMin: %d", result); return result; } result = data.writeFloat(appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs failed to write appRequestRefreshRateMax: %d", result); return result; } Loading @@ -971,9 +986,14 @@ public: virtual status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, float* outMinRefreshRate, float* outMaxRefreshRate) { if (!outDefaultConfig || !outMinRefreshRate || !outMaxRefreshRate) return BAD_VALUE; float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) { if (!outDefaultConfig || !outPrimaryRefreshRateMin || !outPrimaryRefreshRateMax || !outAppRequestRefreshRateMin || !outAppRequestRefreshRateMax) { return BAD_VALUE; } Parcel data, reply; status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); if (result != NO_ERROR) { Loading @@ -996,14 +1016,26 @@ public: ALOGE("getDesiredDisplayConfigSpecs failed to read defaultConfig: %d", result); return result; } result = reply.readFloat(outMinRefreshRate); result = reply.readFloat(outPrimaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read minRefreshRate: %d", result); ALOGE("getDesiredDisplayConfigSpecs failed to read primaryRefreshRateMin: %d", result); return result; } result = reply.readFloat(outMaxRefreshRate); result = reply.readFloat(outPrimaryRefreshRateMax); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read maxRefreshRate: %d", result); ALOGE("getDesiredDisplayConfigSpecs failed to read primaryRefreshRateMax: %d", result); return result; } result = reply.readFloat(outAppRequestRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read appRequestRefreshRateMin: %d", result); return result; } result = reply.readFloat(outAppRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs failed to read appRequestRefreshRateMax: %d", result); return result; } return reply.readInt32(); Loading Loading @@ -1835,20 +1867,38 @@ status_t BnSurfaceComposer::onTransact( ALOGE("setDesiredDisplayConfigSpecs: failed to read defaultConfig: %d", result); return result; } float minRefreshRate; result = data.readFloat(&minRefreshRate); float primaryRefreshRateMin; result = data.readFloat(&primaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to read minRefreshRate: %d", result); ALOGE("setDesiredDisplayConfigSpecs: failed to read primaryRefreshRateMin: %d", result); return result; } float maxRefreshRate; result = data.readFloat(&maxRefreshRate); float primaryRefreshRateMax; result = data.readFloat(&primaryRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to read maxRefreshRate: %d", result); ALOGE("setDesiredDisplayConfigSpecs: failed to read primaryRefreshRateMax: %d", result); return result; } result = setDesiredDisplayConfigSpecs(displayToken, defaultConfig, minRefreshRate, maxRefreshRate); float appRequestRefreshRateMin; result = data.readFloat(&appRequestRefreshRateMin); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to read appRequestRefreshRateMin: %d", result); return result; } float appRequestRefreshRateMax; result = data.readFloat(&appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to read appRequestRefreshRateMax: %d", result); return result; } result = setDesiredDisplayConfigSpecs(displayToken, defaultConfig, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("setDesiredDisplayConfigSpecs: failed to call setDesiredDisplayConfigSpecs: " "%d", Loading @@ -1862,11 +1912,16 @@ status_t BnSurfaceComposer::onTransact( CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> displayToken = data.readStrongBinder(); int32_t defaultConfig; float minRefreshRate; float maxRefreshRate; float primaryRefreshRateMin; float primaryRefreshRateMax; float appRequestRefreshRateMin; float appRequestRefreshRateMax; status_t result = getDesiredDisplayConfigSpecs(displayToken, &defaultConfig, &minRefreshRate, &maxRefreshRate); status_t result = getDesiredDisplayConfigSpecs(displayToken, &defaultConfig, &primaryRefreshRateMin, &primaryRefreshRateMax, &appRequestRefreshRateMin, &appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to get getDesiredDisplayConfigSpecs: " "%d", Loading @@ -1879,14 +1934,28 @@ status_t BnSurfaceComposer::onTransact( ALOGE("getDesiredDisplayConfigSpecs: failed to write defaultConfig: %d", result); return result; } result = reply->writeFloat(minRefreshRate); result = reply->writeFloat(primaryRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write minRefreshRate: %d", result); ALOGE("getDesiredDisplayConfigSpecs: failed to write primaryRefreshRateMin: %d", result); return result; } result = reply->writeFloat(maxRefreshRate); result = reply->writeFloat(primaryRefreshRateMax); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write maxRefreshRate: %d", result); ALOGE("getDesiredDisplayConfigSpecs: failed to write primaryRefreshRateMax: %d", result); return result; } result = reply->writeFloat(appRequestRefreshRateMin); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write appRequestRefreshRateMin: %d", result); return result; } result = reply->writeFloat(appRequestRefreshRateMax); if (result != NO_ERROR) { ALOGE("getDesiredDisplayConfigSpecs: failed to write appRequestRefreshRateMax: %d", result); return result; } reply->writeInt32(result); Loading
libs/gui/SurfaceComposerClient.cpp +16 −12 Original line number Diff line number Diff line Loading @@ -1698,22 +1698,26 @@ int SurfaceComposerClient::getActiveConfig(const sp<IBinder>& display) { status_t SurfaceComposerClient::setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float minRefreshRate, float maxRefreshRate) { return ComposerService::getComposerService()->setDesiredDisplayConfigSpecs(displayToken, defaultConfig, minRefreshRate, maxRefreshRate); float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, float appRequestRefreshRateMax) { return ComposerService::getComposerService() ->setDesiredDisplayConfigSpecs(displayToken, defaultConfig, primaryRefreshRateMin, primaryRefreshRateMax, appRequestRefreshRateMin, appRequestRefreshRateMax); } status_t SurfaceComposerClient::getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, float* outMinRefreshRate, float* outMaxRefreshRate) { return ComposerService::getComposerService()->getDesiredDisplayConfigSpecs(displayToken, outDefaultConfig, outMinRefreshRate, outMaxRefreshRate); float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) { return ComposerService::getComposerService() ->getDesiredDisplayConfigSpecs(displayToken, outDefaultConfig, outPrimaryRefreshRateMin, outPrimaryRefreshRateMax, outAppRequestRefreshRateMin, outAppRequestRefreshRateMax); } status_t SurfaceComposerClient::getDisplayColorModes(const sp<IBinder>& display, Loading
libs/gui/include/gui/ISurfaceComposer.h +25 −8 Original line number Diff line number Diff line Loading @@ -426,19 +426,36 @@ public: */ virtual status_t removeRegionSamplingListener(const sp<IRegionSamplingListener>& listener) = 0; /* * Sets the refresh rate boundaries for display configuration. * For all other parameters, default configuration is used. The index for the default is * corresponding to the configs returned from getDisplayConfigs(). /* Sets the refresh rate boundaries for the display. * * The primary refresh rate range represents display manager's general guidance on the display * configs we'll consider when switching refresh rates. Unless we get an explicit signal from an * app, we should stay within this range. * * The app request refresh rate range allows us to consider more display configs when switching * refresh rates. Although we should generally stay within the primary range, specific * considerations, such as layer frame rate settings specified via the setFrameRate() api, may * cause us to go outside the primary range. We never go outside the app request range. The app * request range will be greater than or equal to the primary refresh rate range, never smaller. * * defaultConfig is used to narrow the list of display configs SurfaceFlinger will consider * switching between. Only configs with a config group and resolution matching defaultConfig * will be considered for switching. The defaultConfig index corresponds to the list of configs * returned from getDisplayConfigs(). */ virtual status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float minRefreshRate, float maxRefreshRate) = 0; int32_t defaultConfig, float primaryRefreshRateMin, float primaryRefreshRateMax, float appRequestRefreshRateMin, float appRequestRefreshRateMax) = 0; virtual status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t* outDefaultConfig, float* outMinRefreshRate, float* outMaxRefreshRate) = 0; float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax) = 0; /* * Gets whether brightness operations are supported on a display. * Loading
libs/gui/include/gui/SurfaceComposerClient.h +10 −12 Original line number Diff line number Diff line Loading @@ -118,21 +118,19 @@ public: // Shorthand for getDisplayConfigs element at getActiveConfig index. static status_t getActiveDisplayConfig(const sp<IBinder>& display, DisplayConfig*); // Sets the refresh rate boundaries for display configuration. // For all other parameters, default configuration is used. The index for the default is // corresponting to the configs returned from getDisplayConfigs(). // Sets the refresh rate boundaries for the display. static status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& displayToken, int32_t defaultConfig, float minRefreshRate, float maxRefreshRate); // Gets the refresh rate boundaries for display configuration. // For all other parameters, default configuration is used. The index for the default is // corresponting to the configs returned from getDisplayConfigs(). // The reason is passed in for telemetry tracking, and it corresponds to the list of all // the policy rules that were used. int32_t defaultConfig, 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, float* outMinRefreshRate, float* outMaxRefreshRate); float* outPrimaryRefreshRateMin, float* outPrimaryRefreshRateMax, float* outAppRequestRefreshRateMin, float* outAppRequestRefreshRateMax); // Gets the list of supported color modes for the given display static status_t getDisplayColorModes(const sp<IBinder>& display, Loading
libs/gui/tests/Surface_test.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -835,14 +835,19 @@ public: return NO_ERROR; } status_t setDesiredDisplayConfigSpecs(const sp<IBinder>& /*displayToken*/, int32_t /*defaultConfig*/, float /*minRefreshRate*/, float /*maxRefreshRate*/) { int32_t /*defaultConfig*/, float /*primaryRefreshRateMin*/, float /*primaryRefreshRateMax*/, float /*appRequestRefreshRateMin*/, float /*appRequestRefreshRateMax*/) { return NO_ERROR; } status_t getDesiredDisplayConfigSpecs(const sp<IBinder>& /*displayToken*/, int32_t* /*outDefaultConfig*/, float* /*outMinRefreshRate*/, float* /*outMaxRefreshRate*/) override { float* /*outPrimaryRefreshRateMin*/, float* /*outPrimaryRefreshRateMax*/, float* /*outAppRequestRefreshRateMin*/, float* /*outAppRequestRefreshRateMax*/) override { return NO_ERROR; }; status_t notifyPowerHint(int32_t /*hintId*/) override { return NO_ERROR; } Loading