drm_hwcomposer: Implement setContentType in hwc3
Internal ContentType and ContentType.aidl both match the HDMI 1.4 specification exactly. Change-Id: If345a794a10c967b7fdb513f9056de39c7260678 Signed-off-by: Sasha McIntosh <sashamcintosh@google.com>
This commit is contained in:
parent
dc619128b1
commit
95beff230b
2 changed files with 15 additions and 5 deletions
|
|
@ -73,9 +73,10 @@ enum PanelOrientation {
|
|||
};
|
||||
|
||||
/*
|
||||
* Content type to be used for HDMI infoframes.
|
||||
* Content type to be used for HDMI infoframes. Values match the HDMI 1.4
|
||||
* specification.
|
||||
*/
|
||||
enum class ContentType { kNoData, kGraphics, kPhoto, kCinema, kGame };
|
||||
enum class ContentType : int32_t { kNoData, kGraphics, kPhoto, kCinema, kGame };
|
||||
|
||||
struct QueuedConfigTiming {
|
||||
// In order for the new config to be applied, the client must send a new frame
|
||||
|
|
|
|||
|
|
@ -1361,10 +1361,19 @@ ndk::ScopedAStatus ComposerClient::setContentType(int64_t display_id,
|
|||
return ToBinderStatus(hwc3::Error::kBadDisplay);
|
||||
}
|
||||
|
||||
if (type == ContentType::NONE) {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
// ContentType.aidl and ::ContentType enum both match the HDMI 1.4 specification
|
||||
// exactly. Static cast is safe.
|
||||
switch (type) {
|
||||
case ContentType::NONE:
|
||||
case ContentType::GRAPHICS:
|
||||
case ContentType::PHOTO:
|
||||
case ContentType::CINEMA:
|
||||
case ContentType::GAME:
|
||||
display->SetContentType(static_cast<::ContentType>(type));
|
||||
return ndk::ScopedAStatus::ok();
|
||||
default:
|
||||
return ToBinderStatus(hwc3::Error::kBadParameter);
|
||||
}
|
||||
return ToBinderStatus(hwc3::Error::kUnsupported);
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus ComposerClient::setDisplayedContentSamplingEnabled(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue