summaryrefslogtreecommitdiff
path: root/libs/gui/ISurfaceComposer.cpp
diff options
context:
space:
mode:
author Ady Abraham <adyabr@google.com> 2018-11-01 13:43:32 -0700
committer Ady Abraham <adyabr@google.com> 2018-11-05 18:34:03 -0800
commit37965d4d225e333b70110c5715998eebed5eedd2 (patch)
treeb4a251c40e3a2276541c52c6a467ded883fb8bee /libs/gui/ISurfaceComposer.cpp
parent12c631b5872e534ea2a1b287f4a61066ae2ae0ee (diff)
ISurfaceComposer: rename isColorManagementUsed()
Rename isColorManagementUsed() to getColorManagement() to follow the convention in ISurfaceComposer. Test: adb shell /data/nativetest64/SurfaceFlinger_test/SurfaceFlinger_test --gtest_filter=LayerTransactionTest.SetColorTransformBasic Change-Id: I63f75a98dbd230375f215a109a725672353eceef
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
-rw-r--r--libs/gui/ISurfaceComposer.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index e66c0e5dd6..accf72c390 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -588,19 +588,16 @@ public:
return error;
}
- virtual bool isColorManagementUsed() const {
+ virtual status_t getColorManagement(bool* outGetColorManagement) const {
Parcel data, reply;
data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
- remote()->transact(BnSurfaceComposer::IS_COLOR_MANAGEMET_USED, data, &reply);
- int32_t result = 0;
- status_t err = reply.readInt32(&result);
- if (err != NO_ERROR) {
- ALOGE("ISurfaceComposer::isColorManagementUsed: error "
- "retrieving result: %s (%d)",
- strerror(-err), -err);
- return false;
+ remote()->transact(BnSurfaceComposer::GET_COLOR_MANAGEMENT, data, &reply);
+ bool result;
+ status_t err = reply.readBool(&result);
+ if (err == NO_ERROR) {
+ *outGetColorManagement = result;
}
- return result != 0;
+ return err;
}
};
@@ -945,11 +942,14 @@ status_t BnSurfaceComposer::onTransact(
}
return NO_ERROR;
}
- case IS_COLOR_MANAGEMET_USED: {
+ case GET_COLOR_MANAGEMENT: {
CHECK_INTERFACE(ISurfaceComposer, data, reply);
- int32_t result = isColorManagementUsed() ? 1 : 0;
- reply->writeInt32(result);
- return NO_ERROR;
+ bool result;
+ status_t error = getColorManagement(&result);
+ if (error == NO_ERROR) {
+ reply->writeBool(result);
+ }
+ return result;
}
default: {
return BBinder::onTransact(code, data, reply, flags);