Merge "Introduce DynamicDisplayInfo" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1b520a6d3f
@@ -27,14 +27,13 @@
|
||||
#include <gui/SurfaceComposerClient.h>
|
||||
#include <gui/SurfaceControl.h>
|
||||
|
||||
#include <ui/HdrCapabilities.h>
|
||||
#include <ui/DynamicDisplayInfo.h>
|
||||
|
||||
#include <utils/Timers.h>
|
||||
|
||||
using namespace android::hardware::configstore;
|
||||
using namespace android::hardware::configstore::V1_0;
|
||||
using namespace android;
|
||||
using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs;
|
||||
|
||||
using Transaction = SurfaceComposerClient::Transaction;
|
||||
|
||||
@@ -72,14 +71,13 @@ static bool getHdrSupport(const sp<SurfaceControl>& surfaceControl) {
|
||||
return false;
|
||||
}
|
||||
|
||||
HdrCapabilities hdrCapabilities;
|
||||
status_t err = client->getHdrCapabilities(display, &hdrCapabilities);
|
||||
if (err) {
|
||||
ui::DynamicDisplayInfo info;
|
||||
if (status_t err = client->getDynamicDisplayInfo(display, &info); err != NO_ERROR) {
|
||||
ALOGE("unable to get hdr capabilities");
|
||||
return false;
|
||||
return err;
|
||||
}
|
||||
|
||||
return !hdrCapabilities.getSupportedHdrTypes().empty();
|
||||
return !info.hdrCapabilities.getSupportedHdrTypes().empty();
|
||||
}
|
||||
|
||||
static bool isDataSpaceValid(const sp<SurfaceControl>& surfaceControl, ADataSpace dataSpace) {
|
||||
|
||||
Reference in New Issue
Block a user