From 9935abceea10df337969f08cce05b7c02bb1eb19 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Fri, 15 Feb 2013 19:33:43 -0800 Subject: [PATCH] Correct PatchCache comparison logic Change-Id: I3d0832505b5380bfa362863b39e09dd10f792582 --- libs/hwui/PatchCache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/hwui/PatchCache.cpp b/libs/hwui/PatchCache.cpp index f48f8572cbc25..62e38d3dbcbe3 100644 --- a/libs/hwui/PatchCache.cpp +++ b/libs/hwui/PatchCache.cpp @@ -51,10 +51,10 @@ int PatchCache::PatchDescription::compare( if (deltaInt != 0) return deltaInt; if (lhs.pixelWidth < rhs.pixelWidth) return -1; - if (lhs.pixelWidth > lhs.pixelWidth) return +1; + if (lhs.pixelWidth > rhs.pixelWidth) return +1; if (lhs.pixelHeight < rhs.pixelHeight) return -1; - if (lhs.pixelHeight > lhs.pixelHeight) return +1; + if (lhs.pixelHeight > rhs.pixelHeight) return +1; deltaInt = lhs.xCount - rhs.xCount; if (deltaInt != 0) return deltaInt;