Skip to content

Commit e71d968

Browse files
author
Hansong Zhang
committed
Revert submission
Based on Forrest run with earlier base build 6069142, the build with this submission failed apct/bluetooth/instrumentation_test Reason for revert: Break tests Change-Id: Ie35f3a85f02c7abb111ab15b063214c529c446fe
1 parent b8df034 commit e71d968

17 files changed

Lines changed: 1 addition & 479 deletions

File tree

libs/gui/ISurfaceComposer.cpp

Lines changed: 0 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -525,88 +525,6 @@ class BpSurfaceComposer : public BpInterface<ISurfaceComposer>
525525
return static_cast<status_t>(reply.readInt32());
526526
}
527527

528-
virtual status_t getAutoLowLatencyModeSupport(const sp<IBinder>& display,
529-
bool* outSupport) const {
530-
Parcel data, reply;
531-
data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
532-
status_t result = data.writeStrongBinder(display);
533-
if (result != NO_ERROR) {
534-
ALOGE("getAutoLowLatencyModeSupport failed to writeStrongBinder: %d", result);
535-
return result;
536-
}
537-
result = remote()->transact(BnSurfaceComposer::GET_AUTO_LOW_LATENCY_MODE_SUPPORT, data,
538-
&reply);
539-
if (result != NO_ERROR) {
540-
ALOGE("getAutoLowLatencyModeSupport failed to transact: %d", result);
541-
return result;
542-
}
543-
return reply.readBool(outSupport);
544-
}
545-
546-
virtual void setAutoLowLatencyMode(const sp<IBinder>& display, bool on) {
547-
Parcel data, reply;
548-
status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
549-
if (result != NO_ERROR) {
550-
ALOGE("setAutoLowLatencyMode failed to writeInterfaceToken: %d", result);
551-
return;
552-
}
553-
554-
result = data.writeStrongBinder(display);
555-
if (result != NO_ERROR) {
556-
ALOGE("setAutoLowLatencyMode failed to writeStrongBinder: %d", result);
557-
return;
558-
}
559-
result = data.writeBool(on);
560-
if (result != NO_ERROR) {
561-
ALOGE("setAutoLowLatencyMode failed to writeBool: %d", result);
562-
return;
563-
}
564-
result = remote()->transact(BnSurfaceComposer::SET_AUTO_LOW_LATENCY_MODE, data, &reply);
565-
if (result != NO_ERROR) {
566-
ALOGE("setAutoLowLatencyMode failed to transact: %d", result);
567-
return;
568-
}
569-
}
570-
571-
virtual status_t getGameContentTypeSupport(const sp<IBinder>& display, bool* outSupport) const {
572-
Parcel data, reply;
573-
data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
574-
status_t result = data.writeStrongBinder(display);
575-
if (result != NO_ERROR) {
576-
ALOGE("getGameContentTypeSupport failed to writeStrongBinder: %d", result);
577-
return result;
578-
}
579-
result = remote()->transact(BnSurfaceComposer::GET_GAME_CONTENT_TYPE_SUPPORT, data, &reply);
580-
if (result != NO_ERROR) {
581-
ALOGE("getGameContentTypeSupport failed to transact: %d", result);
582-
return result;
583-
}
584-
return reply.readBool(outSupport);
585-
}
586-
587-
virtual void setGameContentType(const sp<IBinder>& display, bool on) {
588-
Parcel data, reply;
589-
status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
590-
if (result != NO_ERROR) {
591-
ALOGE("setGameContentType failed to writeInterfaceToken: %d", result);
592-
return;
593-
}
594-
result = data.writeStrongBinder(display);
595-
if (result != NO_ERROR) {
596-
ALOGE("setGameContentType failed to writeStrongBinder: %d", result);
597-
return;
598-
}
599-
result = data.writeBool(on);
600-
if (result != NO_ERROR) {
601-
ALOGE("setGameContentType failed to writeBool: %d", result);
602-
return;
603-
}
604-
result = remote()->transact(BnSurfaceComposer::SET_GAME_CONTENT_TYPE, data, &reply);
605-
if (result != NO_ERROR) {
606-
ALOGE("setGameContentType failed to transact: %d", result);
607-
}
608-
}
609-
610528
virtual status_t clearAnimationFrameStats() {
611529
Parcel data, reply;
612530
status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
@@ -1489,75 +1407,6 @@ status_t BnSurfaceComposer::onTransact(
14891407
result = reply->writeInt32(result);
14901408
return result;
14911409
}
1492-
1493-
case GET_AUTO_LOW_LATENCY_MODE_SUPPORT: {
1494-
CHECK_INTERFACE(ISurfaceComposer, data, reply);
1495-
sp<IBinder> display = nullptr;
1496-
status_t result = data.readStrongBinder(&display);
1497-
if (result != NO_ERROR) {
1498-
ALOGE("getAutoLowLatencyModeSupport failed to readStrongBinder: %d", result);
1499-
return result;
1500-
}
1501-
bool supported = false;
1502-
result = getAutoLowLatencyModeSupport(display, &supported);
1503-
if (result == NO_ERROR) {
1504-
result = reply->writeBool(supported);
1505-
}
1506-
return result;
1507-
}
1508-
1509-
case SET_AUTO_LOW_LATENCY_MODE: {
1510-
CHECK_INTERFACE(ISurfaceComposer, data, reply);
1511-
sp<IBinder> display = nullptr;
1512-
status_t result = data.readStrongBinder(&display);
1513-
if (result != NO_ERROR) {
1514-
ALOGE("setAutoLowLatencyMode failed to readStrongBinder: %d", result);
1515-
return result;
1516-
}
1517-
bool setAllm = false;
1518-
result = data.readBool(&setAllm);
1519-
if (result != NO_ERROR) {
1520-
ALOGE("setAutoLowLatencyMode failed to readBool: %d", result);
1521-
return result;
1522-
}
1523-
setAutoLowLatencyMode(display, setAllm);
1524-
return result;
1525-
}
1526-
1527-
case GET_GAME_CONTENT_TYPE_SUPPORT: {
1528-
CHECK_INTERFACE(ISurfaceComposer, data, reply);
1529-
sp<IBinder> display = nullptr;
1530-
status_t result = data.readStrongBinder(&display);
1531-
if (result != NO_ERROR) {
1532-
ALOGE("getGameContentTypeSupport failed to readStrongBinder: %d", result);
1533-
return result;
1534-
}
1535-
bool supported = false;
1536-
result = getGameContentTypeSupport(display, &supported);
1537-
if (result == NO_ERROR) {
1538-
result = reply->writeBool(supported);
1539-
}
1540-
return result;
1541-
}
1542-
1543-
case SET_GAME_CONTENT_TYPE: {
1544-
CHECK_INTERFACE(ISurfaceComposer, data, reply);
1545-
sp<IBinder> display = nullptr;
1546-
status_t result = data.readStrongBinder(&display);
1547-
if (result != NO_ERROR) {
1548-
ALOGE("setGameContentType failed to readStrongBinder: %d", result);
1549-
return result;
1550-
}
1551-
bool setGameContentTypeOn = false;
1552-
result = data.readBool(&setGameContentTypeOn);
1553-
if (result != NO_ERROR) {
1554-
ALOGE("setGameContentType failed to readBool: %d", result);
1555-
return result;
1556-
}
1557-
setGameContentType(display, setGameContentTypeOn);
1558-
return result;
1559-
}
1560-
15611410
case CLEAR_ANIMATION_FRAME_STATS: {
15621411
CHECK_INTERFACE(ISurfaceComposer, data, reply);
15631412
status_t result = clearAnimationFrameStats();

libs/gui/SurfaceComposerClient.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,26 +1656,6 @@ status_t SurfaceComposerClient::setActiveColorMode(const sp<IBinder>& display,
16561656
return ComposerService::getComposerService()->setActiveColorMode(display, colorMode);
16571657
}
16581658

1659-
bool SurfaceComposerClient::getAutoLowLatencyModeSupport(const sp<IBinder>& display) {
1660-
bool supported = false;
1661-
ComposerService::getComposerService()->getAutoLowLatencyModeSupport(display, &supported);
1662-
return supported;
1663-
}
1664-
1665-
void SurfaceComposerClient::setAutoLowLatencyMode(const sp<IBinder>& display, bool on) {
1666-
ComposerService::getComposerService()->setAutoLowLatencyMode(display, on);
1667-
}
1668-
1669-
bool SurfaceComposerClient::getGameContentTypeSupport(const sp<IBinder>& display) {
1670-
bool supported = false;
1671-
ComposerService::getComposerService()->getGameContentTypeSupport(display, &supported);
1672-
return supported;
1673-
}
1674-
1675-
void SurfaceComposerClient::setGameContentType(const sp<IBinder>& display, bool on) {
1676-
ComposerService::getComposerService()->setGameContentType(display, on);
1677-
}
1678-
16791659
void SurfaceComposerClient::setDisplayPowerMode(const sp<IBinder>& token,
16801660
int mode) {
16811661
ComposerService::getComposerService()->setPowerMode(token, mode);

libs/gui/include/gui/ISurfaceComposer.h

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -194,37 +194,6 @@ class ISurfaceComposer: public IInterface {
194194
virtual status_t setActiveColorMode(const sp<IBinder>& display,
195195
ui::ColorMode colorMode) = 0;
196196

197-
/**
198-
* Returns true if the connected display reports support for HDMI 2.1 Auto
199-
* Low Latency Mode.
200-
* For more information, see the HDMI 2.1 specification.
201-
*/
202-
virtual status_t getAutoLowLatencyModeSupport(const sp<IBinder>& display,
203-
bool* outSupport) const = 0;
204-
205-
/**
206-
* Switches Auto Low Latency Mode on/off on the connected display, if it is
207-
* available. This should only be called if #getAutoLowLatencyMode returns
208-
* true.
209-
* For more information, see the HDMI 2.1 specification.
210-
*/
211-
virtual void setAutoLowLatencyMode(const sp<IBinder>& display, bool on) = 0;
212-
213-
/**
214-
* Returns true if the connected display reports support for Game Content Type.
215-
* For more information, see the HDMI 1.4 specification.
216-
*/
217-
virtual status_t getGameContentTypeSupport(const sp<IBinder>& display,
218-
bool* outSupport) const = 0;
219-
220-
/**
221-
* This will start sending infoframes to the connected display with
222-
* ContentType=Game (if on=true). This will switch the disply to Game mode.
223-
* This should only be called if #getGameContentTypeSupport returns true.
224-
* For more information, see the HDMI 1.4 specification.
225-
*/
226-
virtual void setGameContentType(const sp<IBinder>& display, bool on) = 0;
227-
228197
/**
229198
* Capture the specified screen. This requires READ_FRAME_BUFFER
230199
* permission. This function will fail if there is a secure window on
@@ -563,10 +532,6 @@ class BnSurfaceComposer: public BnInterface<ISurfaceComposer> {
563532
CAPTURE_SCREEN_BY_ID,
564533
NOTIFY_POWER_HINT,
565534
SET_GLOBAL_SHADOW_SETTINGS,
566-
GET_AUTO_LOW_LATENCY_MODE_SUPPORT,
567-
SET_AUTO_LOW_LATENCY_MODE,
568-
GET_GAME_CONTENT_TYPE_SUPPORT,
569-
SET_GAME_CONTENT_TYPE,
570535
// Always append new enum to the end.
571536
};
572537

libs/gui/include/gui/SurfaceComposerClient.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -160,21 +160,6 @@ class SurfaceComposerClient : public RefBase
160160
static status_t setActiveColorMode(const sp<IBinder>& display,
161161
ui::ColorMode colorMode);
162162

163-
// Reports whether the connected display supports Auto Low Latency Mode
164-
static bool getAutoLowLatencyModeSupport(const sp<IBinder>& display);
165-
166-
// Switches on/off Auto Low Latency Mode on the connected display. This should only be
167-
// called if the connected display supports Auto Low Latency Mode as reported by
168-
// #getAutoLowLatencyModeSupport
169-
static void setAutoLowLatencyMode(const sp<IBinder>& display, bool on);
170-
171-
// Reports whether the connected display supports Game content type
172-
static bool getGameContentTypeSupport(const sp<IBinder>& display);
173-
174-
// Turns Game mode on/off on the connected display. This should only be called
175-
// if the display supports Game content type, as reported by #getGameContentTypeSupport
176-
static void setGameContentType(const sp<IBinder>& display, bool on);
177-
178163
/* Triggers screen on/off or low power mode and waits for it to complete */
179164
static void setDisplayPowerMode(const sp<IBinder>& display, int mode);
180165

libs/gui/tests/Surface_test.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -750,16 +750,6 @@ class FakeSurfaceComposer : public ISurfaceComposer{
750750
bool /*captureSecureLayers*/) override {
751751
return NO_ERROR;
752752
}
753-
status_t getAutoLowLatencyModeSupport(const sp<IBinder>& /*display*/,
754-
bool* /*outSupport*/) const override {
755-
return NO_ERROR;
756-
}
757-
void setAutoLowLatencyMode(const sp<IBinder>& /*display*/, bool /*on*/) override {}
758-
status_t getGameContentTypeSupport(const sp<IBinder>& /*display*/,
759-
bool* /*outSupport*/) const override {
760-
return NO_ERROR;
761-
}
762-
void setGameContentType(const sp<IBinder>& /*display*/, bool /*on*/) override {}
763753
status_t captureScreen(uint64_t /*displayOrLayerStack*/, ui::Dataspace* /*outDataspace*/,
764754
sp<GraphicBuffer>* /*outBuffer*/) override {
765755
return NO_ERROR;

services/surfaceflinger/CompositionEngine/tests/MockHWComposer.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ class HWComposer : public android::HWComposer {
8686
MOCK_METHOD4(setActiveConfigWithConstraints,
8787
status_t(DisplayId, size_t, const HWC2::VsyncPeriodChangeConstraints&,
8888
HWC2::VsyncPeriodChangeTimeline*));
89-
MOCK_METHOD2(setAutoLowLatencyMode, status_t(DisplayId, bool));
90-
MOCK_METHOD2(getSupportedContentTypes, status_t(DisplayId, std::vector<HWC2::ContentType>*));
91-
MOCK_METHOD2(setContentType, status_t(DisplayId, HWC2::ContentType));
9289

9390
MOCK_CONST_METHOD1(dump, void(std::string&));
9491
MOCK_CONST_METHOD0(getComposer, android::Hwc2::Composer*());

services/surfaceflinger/DisplayHardware/ComposerHal.cpp

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,45 +1281,6 @@ V2_4::Error Composer::setActiveConfigWithConstraints(
12811281
return error;
12821282
}
12831283

1284-
V2_4::Error Composer::setAutoLowLatencyMode(Display display, bool on) {
1285-
using Error = V2_4::Error;
1286-
if (!mClient_2_4) {
1287-
return Error::UNSUPPORTED;
1288-
}
1289-
1290-
return mClient_2_4->setAutoLowLatencyMode(display, on);
1291-
}
1292-
1293-
V2_4::Error Composer::getSupportedContentTypes(
1294-
Display displayId, std::vector<IComposerClient::ContentType>* outSupportedContentTypes) {
1295-
using Error = V2_4::Error;
1296-
if (!mClient_2_4) {
1297-
return Error::UNSUPPORTED;
1298-
}
1299-
1300-
Error error = kDefaultError_2_4;
1301-
mClient_2_4->getSupportedContentTypes(displayId,
1302-
[&](const auto& tmpError,
1303-
const auto& tmpSupportedContentTypes) {
1304-
error = tmpError;
1305-
if (error != Error::NONE) {
1306-
return;
1307-
}
1308-
1309-
*outSupportedContentTypes = tmpSupportedContentTypes;
1310-
});
1311-
return error;
1312-
}
1313-
1314-
V2_4::Error Composer::setContentType(Display display, IComposerClient::ContentType contentType) {
1315-
using Error = V2_4::Error;
1316-
if (!mClient_2_4) {
1317-
return Error::UNSUPPORTED;
1318-
}
1319-
1320-
return mClient_2_4->setContentType(display, contentType);
1321-
}
1322-
13231284
CommandReader::~CommandReader()
13241285
{
13251286
resetData();

services/surfaceflinger/DisplayHardware/ComposerHal.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,6 @@ class Composer {
221221
Display display, Config config,
222222
const IComposerClient::VsyncPeriodChangeConstraints& vsyncPeriodChangeConstraints,
223223
VsyncPeriodChangeTimeline* outTimeline) = 0;
224-
225-
virtual V2_4::Error setAutoLowLatencyMode(Display displayId, bool on) = 0;
226-
virtual V2_4::Error getSupportedContentTypes(
227-
Display displayId,
228-
std::vector<IComposerClient::ContentType>* outSupportedContentTypes) = 0;
229-
virtual V2_4::Error setContentType(Display displayId,
230-
IComposerClient::ContentType contentType) = 0;
231224
};
232225

233226
namespace impl {
@@ -449,12 +442,6 @@ class Composer final : public Hwc2::Composer {
449442
Display display, Config config,
450443
const IComposerClient::VsyncPeriodChangeConstraints& vsyncPeriodChangeConstraints,
451444
VsyncPeriodChangeTimeline* outTimeline) override;
452-
V2_4::Error setAutoLowLatencyMode(Display displayId, bool on) override;
453-
V2_4::Error getSupportedContentTypes(
454-
Display displayId,
455-
std::vector<IComposerClient::ContentType>* outSupportedContentTypes) override;
456-
V2_4::Error setContentType(Display displayId,
457-
IComposerClient::ContentType contentType) override;
458445

459446
private:
460447
#if defined(USE_VR_COMPOSER) && USE_VR_COMPOSER

services/surfaceflinger/DisplayHardware/HWC2.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -799,26 +799,6 @@ Error Display::setDisplayBrightness(float brightness) const {
799799
return static_cast<Error>(intError);
800800
}
801801

802-
Error Display::setAutoLowLatencyMode(bool on) const {
803-
auto intError = mComposer.setAutoLowLatencyMode(mId, on);
804-
return static_cast<Error>(intError);
805-
}
806-
807-
Error Display::getSupportedContentTypes(std::vector<ContentType>* outSupportedContentTypes) const {
808-
std::vector<Hwc2::IComposerClient::ContentType> tmpSupportedContentTypes;
809-
auto intError = mComposer.getSupportedContentTypes(mId, &tmpSupportedContentTypes);
810-
for (Hwc2::IComposerClient::ContentType contentType : tmpSupportedContentTypes) {
811-
outSupportedContentTypes->push_back(static_cast<ContentType>(contentType));
812-
}
813-
return static_cast<Error>(intError);
814-
}
815-
816-
Error Display::setContentType(ContentType contentType) const {
817-
using Hwc2_ContentType = Hwc2::IComposerClient::ContentType;
818-
auto intError = mComposer.setContentType(mId, static_cast<Hwc2_ContentType>(contentType));
819-
return static_cast<Error>(intError);
820-
}
821-
822802
// For use by Device
823803

824804
void Display::setConnected(bool connected) {

0 commit comments

Comments
 (0)