drm_hwcomposer: Add property that allows disabling of hardware scaling
Set `hwc.drm.scale_with_gpu` property to 1 in case composer hardware
do not have scaling support.
That will force layers that require scaling to be merged by GPU,
and allow other layers to be merged by DRM.
Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
diff --git a/include/resourcemanager.h b/include/resourcemanager.h
index f10af45..7a86828 100644
--- a/include/resourcemanager.h
+++ b/include/resourcemanager.h
@@ -40,6 +40,9 @@
int getDisplayCount() const {
return num_displays_;
}
+ bool ForcedScalingWithGpu() {
+ return scale_with_gpu_;
+ }
private:
int AddDrmDevice(std::string path);
@@ -48,6 +51,8 @@
std::vector<std::unique_ptr<DrmDevice>> drms_;
std::vector<std::shared_ptr<Importer>> importers_;
const gralloc_module_t *gralloc_;
+
+ bool scale_with_gpu_;
};
} // namespace android