diff options
author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-12-20 08:18:25 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-12-20 08:18:25 -0800 |
commit | 6fecb59fc2644ed03c4c5633b54b1732a2992752 (patch) | |
tree | aefddeb98e33f4a8e01dc92a2832565f8809d019 /sdm/libs/hwc2/hwc_layers.cpp | |
parent | 2796e8c3e06e75939bd7636814c54cec2913a728 (diff) | |
parent | ae0570951d4ea251a83902bc8fc48e5fe089b08b (diff) | |
download | display-6fecb59fc2644ed03c4c5633b54b1732a2992752.tar.gz |
Merge "sdm: Add support for single buffer layers"
Diffstat (limited to 'sdm/libs/hwc2/hwc_layers.cpp')
-rw-r--r-- | sdm/libs/hwc2/hwc_layers.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sdm/libs/hwc2/hwc_layers.cpp b/sdm/libs/hwc2/hwc_layers.cpp index cd9ce7be..51384f93 100644 --- a/sdm/libs/hwc2/hwc_layers.cpp +++ b/sdm/libs/hwc2/hwc_layers.cpp @@ -772,6 +772,9 @@ DisplayError HWCLayer::SetMetaData(const private_handle_t *pvt_handle, Layer *la GetUBWCStatsFromMetaData(&cr_stats[0], &(layer_buffer->ubwc_crstats[0])); } // if (getMetaData) + single_buffer_ = false; + getMetaData(const_cast<private_handle_t *>(handle), GET_SINGLE_BUFFER_MODE, &single_buffer_); + return kErrorNone; } @@ -891,4 +894,19 @@ int32_t HWCLayer::PopReleaseFence(void) { return fence; } +bool HWCLayer::IsRotationPresent() { + return ((layer_->transform.rotation != 0.0f) || + layer_->transform.flip_horizontal || + layer_->transform.flip_vertical); +} + +bool HWCLayer::IsScalingPresent() { + uint32_t src_width = static_cast<uint32_t>(layer_->src_rect.right - layer_->src_rect.left); + uint32_t src_height = static_cast<uint32_t>(layer_->src_rect.bottom - layer_->src_rect.top); + uint32_t dst_width = static_cast<uint32_t>(layer_->dst_rect.right - layer_->dst_rect.left); + uint32_t dst_height = static_cast<uint32_t>(layer_->dst_rect.bottom - layer_->dst_rect.top); + + return ((src_width != dst_width) || (dst_height != src_height)); +} + } // namespace sdm |