summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2017-05-04 00:14:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-05-04 00:14:50 +0000
commit40f0088f4568fb005c12d37d1deb023d55baac79 (patch)
treef954ebdbc634c9c4fc265b5d6fc2524b59d59095
parentf8af02fffa115431525460299dbe4e67ad030408 (diff)
parent4af98c3b231f9a68149c73698c5f58d064c6893a (diff)
downloadnative-40f0088f4568fb005c12d37d1deb023d55baac79.tar.gz
Merge "Add const specifier to SortLayersByZ comparator"android-wear-o-preview-4android-wear-o-preview-3android-o-preview-2
-rw-r--r--services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp5
-rw-r--r--services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp
index 617ea9fa2e..7f482892ff 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp
@@ -1993,9 +1993,8 @@ HWC2On1Adapter::Layer::Layer(Display& display)
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 962361ec6e..45922af736 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h
+++ b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h
@@ -123,7 +123,7 @@ private:
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 {