diff options
author | John Stultz <john.stultz@linaro.org> | 2020-10-09 17:46:46 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-10-09 17:46:46 +0000 |
commit | 8288108b6db1781b0af88015c3f7dee302832475 (patch) | |
tree | cd680faf5b186c330fd86f76bf2179d8e3afb1ad /backend/BackendRCarDu.cpp | |
parent | b4d9b2545fc6ac254d4321a727997a063dedab5d (diff) | |
parent | 69da7879e9d7e5fdec3215be7938626624956b47 (diff) | |
download | drm_hwcomposer-8288108b6db1781b0af88015c3f7dee302832475.tar.gz |
Merge remote-tracking branch 'aosp/upstream-main' into HEAD am: 8e7afb9d2e am: 30a066b586 am: 709de7f5f7 am: 69da7879e9
Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/1443444
Change-Id: I739296a922f2fba873d833fa9fb3dc59bc53db3b
Diffstat (limited to 'backend/BackendRCarDu.cpp')
-rw-r--r-- | backend/BackendRCarDu.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/backend/BackendRCarDu.cpp b/backend/BackendRCarDu.cpp new file mode 100644 index 0000000..d52f0c3 --- /dev/null +++ b/backend/BackendRCarDu.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "BackendRCarDu.h" + +#include "BackendManager.h" +#include "drm_fourcc.h" + +namespace android { + +bool BackendRCarDu::IsClientLayer(DrmHwcTwo::HwcDisplay *display, + DrmHwcTwo::HwcLayer *layer) { + hwc_drm_bo_t bo; + + int ret = display->importer()->ConvertBoInfo(layer->buffer(), &bo); + if (ret) + return true; + + if (bo.format == DRM_FORMAT_ABGR8888) + return true; + + if (layer->RequireScalingOrPhasing()) + return true; + + return Backend::IsClientLayer(display, layer); +} + +REGISTER_BACKEND("rcar-du", BackendRCarDu); + +} // namespace android
\ No newline at end of file |