commit | 4af98c3b231f9a68149c73698c5f58d064c6893a | [log] [tgz] |
---|---|---|
author | Yi Kong <yikong@google.com> | Wed May 03 13:26:48 2017 -0700 |
committer | Yi Kong <yikong@google.com> | Wed May 03 21:57:35 2017 +0000 |
tree | 6bcfddcd6a65b4a958bf195e2b1a797bec544027 | |
parent | 1a1d34791e11ca76568c3d97c9d383b115bcdbc2 [diff] |
Add const specifier to SortLayersByZ comparator No functionality change. Test: build Bug: 37752547 Change-Id: I33ffccbd7bc67031680e3fe7e9263de5402a9cde
diff --git a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp index 617ea9f..7f48289 100644 --- a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp +++ b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp
@@ -1993,9 +1993,8 @@ mHasUnsupportedDataspace(false), 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/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h index 962361e..45922af 100644 --- a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h +++ b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h
@@ -123,7 +123,7 @@ class SortLayersByZ { public: bool operator()(const std::shared_ptr<Layer>& lhs, - const std::shared_ptr<Layer>& rhs); + const std::shared_ptr<Layer>& rhs) const; }; class DisplayContentsDeleter {