commit | a6a529236ea307088e522b3e661f74a0537c99b7 | [log] [tgz] |
---|---|---|
author | Dan Albert <danalbert@google.com> | Fri Jan 11 14:47:59 2019 -0800 |
committer | Dan Albert <danalbert@google.com> | Fri Jan 11 14:48:55 2019 -0800 |
tree | 1d15a1eab42f6952d1f54e35cd71097c8a9894c2 | |
parent | 15213e41755c0a3782e846bcd0db7ec582a28cea [diff] |
Fix comparator operator() definition. Comparators should be const. The libc++ update checks for this and rejects non-const comparators. Test: m Bug: None Change-Id: If2f76c020943b5bcb55803f0742990c9965afd6e
diff --git a/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp b/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp index 366d641..3d138f7 100644 --- a/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp +++ b/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp
@@ -1921,8 +1921,8 @@ mHwc1Id(0), mHasUnsupportedPlaneAlpha(false) {} -bool HWC2On1Adapter::SortLayersByZ::operator()( - const std::shared_ptr<Layer>& lhs, const std::shared_ptr<Layer>& rhs) { +bool HWC2On1Adapter::SortLayersByZ::operator()(const std::shared_ptr<Layer>& lhs, + const std::shared_ptr<Layer>& rhs) const { return lhs->getZ() < rhs->getZ(); }
diff --git a/graphics/composer/2.1/utils/hwc2on1adapter/include/hwc2on1adapter/HWC2On1Adapter.h b/graphics/composer/2.1/utils/hwc2on1adapter/include/hwc2on1adapter/HWC2On1Adapter.h index 3badfce..da771dc 100644 --- a/graphics/composer/2.1/utils/hwc2on1adapter/include/hwc2on1adapter/HWC2On1Adapter.h +++ b/graphics/composer/2.1/utils/hwc2on1adapter/include/hwc2on1adapter/HWC2On1Adapter.h
@@ -130,8 +130,8 @@ class SortLayersByZ { public: - bool operator()(const std::shared_ptr<Layer>& lhs, - const std::shared_ptr<Layer>& rhs); + bool operator()(const std::shared_ptr<Layer>& lhs, + const std::shared_ptr<Layer>& rhs) const; }; // The semantics of the fences returned by the device differ between